Bug 701862

Summary: Adding a file using pysvn causes segfault and keeps repo lock
Product: [Fedora] Fedora EPEL Reporter: andred
Component: pysvnAssignee: Caitlyn O'Hanna <ravenoak>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: el5CC: ravenoak, sgallagh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-21 00:33:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description andred 2011-05-04 05:34:13 UTC
Description of problem:
When attempting to svn add a file to a subversion repository using PySVN the pysvn.Client will cause a segmentation fault


Version-Release number of selected component (if applicable):
Name       : pysvn
Arch       : x86_64
Version    : 1.6.2
Release    : 1.el5
Size       : 1.2 M
Repo       : installed
Summary    : Pythonic style bindings for Subversion
URL        : http://pysvn.tigris.org/
License    : ASL 1.1
Description: Pythonic style bindings for Subversion


How reproducible:
Every time

Steps to Reproduce:
1. cd svn_repo_dir
2. touch new_test_file
3. load a python console   `python`
4. Run the following code

 import pysvn
 client = pysvn.Client()
 client.add( "new_test_file" )

Actual results:
segmentation fault (core dumped)  python

SVN checkout is also locked.

Expected results:
File is added to svn repository and no interruption of Python interpreter


Additional info:

I have marked this bug as Urgent as it is blocking out build and release system. It would be possible to work around this issue by performing a custom installation of pysvn however I would prefer to avoid this.

This issue appears to be due to the update of subversion in 5.6 and PySVN may not have been updated to match.

Fails on both i386 and x86_64.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00002aaab17d8777 in ?? () from /usr/lib64/libapr-1.so.0
#2  0x00002aaab17d883b in apr_hash_get () from /usr/lib64/libapr-1.so.0
#3  0x00002aaab131826b in svn_io_detect_mimetype2 () from /usr/lib64/libsvn_subr-1.so.0
#4  0x00002aaab010ef49 in svn_client__get_auto_props () from /usr/lib64/libsvn_client-1.so.0
#5  0x00002aaab010f196 in ?? () from /usr/lib64/libsvn_client-1.so.0
#6  0x00002aaab010f844 in svn_client_add4 () from /usr/lib64/libsvn_client-1.so.0
#7  0x00002aaab011ebfd in svn_client_add3 () from /usr/lib64/libsvn_client-1.so.0
#8  0x00002aaaafe8731c in pysvn_client::cmd_add(Py::Tuple const&, Py::Dict const&) () from /usr/lib64/python2.4/site-packages/pysvn/_pysvn.so
#9  0x00002aaaafe72155 in Py::PythonExtension<pysvn_client>::method_keyword_call_handler(_object*, _object*, _object*) () from /usr/lib64/python2.4/site-packages/pysvn/_pysvn.so
#10 0x0000003e2a49639a in PyEval_EvalFrame () from /usr/lib64/libpython2.4.so.1.0
#11 0x0000003e2a495e46 in PyEval_EvalFrame () from /usr/lib64/libpython2.4.so.1.0
#12 0x0000003e2a4972c5 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.4.so.1.0
#13 0x0000003e2a495a1f in PyEval_EvalFrame () from /usr/lib64/libpython2.4.so.1.0
#14 0x0000003e2a495e46 in PyEval_EvalFrame () from /usr/lib64/libpython2.4.so.1.0
#15 0x0000003e2a495e46 in PyEval_EvalFrame () from /usr/lib64/libpython2.4.so.1.0
#16 0x0000003e2a4972c5 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.4.so.1.0
#17 0x0000003e2a495a1f in PyEval_EvalFrame () from /usr/lib64/libpython2.4.so.1.0
#18 0x0000003e2a495e46 in PyEval_EvalFrame () from /usr/lib64/libpython2.4.so.1.0
#19 0x0000003e2a4972c5 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.4.so.1.0
#20 0x0000003e2a495a1f in PyEval_EvalFrame () from /usr/lib64/libpython2.4.so.1.0
#21 0x0000003e2a4972c5 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.4.so.1.0
#22 0x0000003e2a495a1f in PyEval_EvalFrame () from /usr/lib64/libpython2.4.so.1.0
#23 0x0000003e2a4972c5 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.4.so.1.0
#24 0x0000003e2a495a1f in PyEval_EvalFrame () from /usr/lib64/libpython2.4.so.1.0
#25 0x0000003e2a4972c5 in PyEval_EvalCodeEx () from /usr/lib64/libpython2.4.so.1.0
#26 0x0000003e2a497312 in PyEval_EvalCode () from /usr/lib64/libpython2.4.so.1.0
#27 0x0000003e2a4b39f9 in ?? () from /usr/lib64/libpython2.4.so.1.0
#28 0x0000003e2a4b4ea8 in PyRun_SimpleFileExFlags () from /usr/lib64/libpython2.4.so.1.0
#29 0x0000003e2a4bb33d in Py_Main () from /usr/lib64/libpython2.4.so.1.0
#30 0x0000003e2941d994 in __libc_start_main () from /lib64/libc.so.6
#31 0x0000000000400629 in _start ()

Comment 1 andred 2012-12-04 02:42:44 UTC
This issue still appears to be occurring under 5.8.

Comment 2 Stephen Gallagher 2012-12-12 13:26:30 UTC
This is going to be a bigger effort than it sounds. In order to support subversion 1.6.11, we need to update to the 1.7.6 release of pysvn. However, that release does not build on python 2.4.

This is going to require rebuilding this package and all of its dependencies using python26. That's going to take a while.

Comment 3 andred 2012-12-13 04:43:34 UTC
I have been able to successfully rebuild pysvn-1.6.2-1.el5 (ie: the current version in epel) from the source RPMS against subversion 1.6.11. This didn't require any upgrade of PySVN, it was simply re-linking the existing pysvn srpm against the updated svn libraries. This is how I've been working around this issue for the last year and a half.

I just hit the issue again in 5.8 because of some new machine installations in our network that were pulling from epel, rather than the locally regenerated rpm.

Comment 4 Stephen Gallagher 2012-12-17 21:02:17 UTC
Thanks for the hint. The pysvn website implied strongly that we would need to upgrade to pysvn 1.7.x to support subversion 1.6.x. However, if a simple rebuild is sufficient, I'm all for it.

I'm building it now: http://koji.fedoraproject.org/koji/taskinfo?taskID=4798039

Once it's done, I'll submit it as an update. Please test it thoroughly. The 1.6.2 tarball does not include proper test baselines for subversion 1.6.x, so I can't be entirely sure it works.

Comment 5 Fedora Update System 2012-12-17 21:15:57 UTC
pysvn-1.6.2-3.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/pysvn-1.6.2-3.el5

Comment 6 Fedora Update System 2012-12-18 01:17:50 UTC
Package pysvn-1.6.2-3.el5:
* should fix your issue,
* was pushed to the Fedora EPEL 5 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing pysvn-1.6.2-3.el5'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-13782/pysvn-1.6.2-3.el5
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-12-21 00:33:36 UTC
pysvn-1.6.2-3.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.