Edgewall Software
Modify

Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#13704 closed defect (cantfix)

Minor error doing a repository resync

Reported by: pbobbenb@… Owned by:
Priority: normal Milestone: not applicable
Component: version control Version: 1.6
Severity: normal Keywords: svn114
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Hi!

I'm having a minor issue doing a trac-admin repository resync. I'm using Python 3.9.18, SVN 1.14.3 and Trac 1.6 on macOS 10.14.6.

It always stops at revision 1934 (of 2215) with this error message:

sudo trac-admin /Users/trac repository resync "*"

Återsynkroniserar historik för arkivet (default)...

Fatal Python error: none_dealloc: deallocating None
Python runtime state: initialized
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/cmd.py", line 214, in onecmd
    func = getattr(self, 'do_' + cmd)
AttributeError: 'TracAdmin' object has no attribute 'do_repository'

During handling of the above exception, another exception occurred:

StopIteration
zsh: abort      sudo trac-admin /Users/trac repository resync "*"

Doing a repository sync, rather than a resync, it continues the sync and finishes, and everything seems to be working just fine. Not sure what the issue might be and I'm not sure when it started since it was a while ago since I did a resync…

Attachments (1)

backtrace-py3.11.log (13.0 KB ) - added by Jun Omae 3 months ago.

Download all attachments as: .zip

Change History (8)

in reply to:  description comment:1 by Jun Omae, 3 months ago

Thanks for the reporting!

I'm using Python 3.9.18, SVN 1.14.3 and Trac 1.6 on macOS 10.14.6. …

Fatal Python error: none_dealloc: deallocating None
Python runtime state: initialized

It seems to be caused by something wrong in Subversion Python bindings.

How did you install Subversion 1.14.3?

Could you please provide stacktrace of the error from your trac.log, and backtrace of the error using lldb if possible?

comment:2 by Jun Omae, 3 months ago

Component: admin/consoleversion control
Keywords: svn114 added
Milestone: 1.6.1

comment:3 by Jun Omae, 3 months ago

Okay. Rereproduced with Python 3.9, 3.10 and 3.11 on Ubuntu 20.04, however not reproduced with Python 3.12.

attachment:backtrace-py3.11.log

Resyncing repository history for (default)...
Fatal Python error: none_dealloc: deallocating None: bug likely caused by a refcount error in a C extension
Python runtime state: initialized

Current thread 0x00007f5010846740 (most recent call first):
  File "/home/jun66j5/venv/trac1.6-py3.11-svn1.14.3/lib/python3.11/site-packages/trac/versioncontrol/cache.py", line 297 in insert_changeset
  File "/home/jun66j5/venv/trac1.6-py3.11-svn1.14.3/lib/python3.11/site-packages/trac/versioncontrol/cache.py", line 188 in sync
  File "/home/jun66j5/venv/trac1.6-py3.11-svn1.14.3/lib/python3.11/site-packages/trac/versioncontrol/admin.py", line 150 in _sync
  File "/home/jun66j5/venv/trac1.6-py3.11-svn1.14.3/lib/python3.11/site-packages/trac/versioncontrol/admin.py", line 168 in _do_resync
  File "/home/jun66j5/venv/trac1.6-py3.11-svn1.14.3/lib/python3.11/site-packages/trac/admin/api.py", line 127 in execute_command
  File "/home/jun66j5/venv/trac1.6-py3.11-svn1.14.3/lib/python3.11/site-packages/trac/admin/console.py", line 246 in default
  File "/usr/lib/python3.11/cmd.py", line 216 in onecmd
  File "/home/jun66j5/venv/trac1.6-py3.11-svn1.14.3/lib/python3.11/site-packages/trac/admin/console.py", line 81 in onecmd
  File "/home/jun66j5/venv/trac1.6-py3.11-svn1.14.3/lib/python3.11/site-packages/trac/admin/console.py", line 515 in _run
  File "/home/jun66j5/venv/trac1.6-py3.11-svn1.14.3/lib/python3.11/site-packages/trac/admin/console.py", line 530 in run
  File "/home/jun66j5/venv/trac1.6-py3.11-svn1.14.3/lib/python3.11/site-packages/trac/admin/console.py", line 537 in <module>
  File "<frozen runpy>", line 88 in _run_code
  File "<frozen runpy>", line 198 in _run_module_as_main

Extension modules: markupsafe._speedups, libsvn._fs, libsvn._core, libsvn._delta, libsvn._diff, libsvn._repos (total: 6)

by Jun Omae, 3 months ago

Attachment: backtrace-py3.11.log added

comment:4 by Jun Omae, 3 months ago

Workaround is to downgrade Subversion to 1.14.2.

comment:5 by Jun Omae, 3 months ago

Milestone: 1.6.1not applicable
Resolution: cantfix
Status: newclosed

The following patch fixes the root cause in Subversion 1.14.3. I'll push the patch to Subversion repository later. Also, Trac has no workaround for the issue.

  • subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

    old new  
    23212321     in Python.  */
    23222322  if (result == Py_None)
    23232323    {
    2324       Py_DECREF(result);
    2325 
    23262324      *handler = svn_delta_noop_window_handler;
    23272325      *h_baton = NULL;
    23282326    }

comment:6 by pbobbenb@…, 3 months ago

I installed Subversion by compiling it myself.

Great that you could pinpoint the issue, thanks for the help!

comment:7 by Jun Omae, 3 months ago

The revised patch has been committed in r1915338 and can be retrieved from:

svn diff -c1915338 https://svn.apache.org/repos/asf/subversion/branches/1.14.x/

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.