htt
p://pysvn.tigris.org/issues/show_bug.cgi?id=89
Issue #|89
Summary|client.info2() Segmentation Fault
Component|pysvn
Version|current
Platform|PC
OS/Version|Linux
URL|
Status|NEW
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P1
Subcomponent|extension
Assigned to|barryscott
Reported by|misterpete
------- Additional comments from misterpete tigris.org Thu Apr 10 21:33:01 -0700 2008 -------
If I try to call client.info2(foo) on a path 'foo' that is
missing a
subversion controlled subdirectory 'bar' (or the bar/.svn
dir within it) I get a
seg fault.
client.status(foo) and client.info(foo) work fine and if I
restore the
subdirectory bar or non-recursively update the parent
directory foo to a
revision before bar existed then info2(foo) works fine.
Missing files don't
pose a problem. client.status(foo) just reports bar as
missing as it should.
Details follow
python 2.5.1 (also tested 2.4.3, 2.4.4)
pysvn 1.5.3 (also tested 1.5.2)
subversion 1.4.4
Ubuntu 6.06 kernel 2.6.18.8
> mkdir /trunk/foo/bar
> svn add /trunk/foo/bar
> svn commit /trunk/foo/bar -m "new bar
directory"
> rm -rf /trunk/foo/bar/.svn
# (same results if I remove bar entirely)
> python
>>> import pysvn
>>> client = pysvn.Client()
>>> client.info2("/trunk/foo")
Segmentation fault
I wrote a small test script pysvnTestBroken and ran it
through gdb and it
looks like the problem manifests itself in the
InfoReceiveBaton destructor.
In this case the checked out path 'foo' was missing a
subdirectory 'bar' that
had been committed to svn as in the example above.
===pysvnTestBroken==========================================
=====
#!/usr/bin/python
import pysvn
client = pysvn.Client()
path = "/work/pysvnTestCase/python/foo"
print 'calling client.info2("%s")' % path
client.info2(path)
============================================================
=====
$ gdb /vol/apps/python-2.4.4/bin/python
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are
welcome to change it and/or distribute copies of it under
certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show
warranty" for details.
This GDB was configured as
"i486-linux-gnu"...Using host libthread_db
library
"/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) r pysvnTestBroken
Starting program: /vol/apps/python-2.4.4/bin/python
pysvnTestBroken
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1211332928 (LWP 2290)]
calling
client.info2("/work/pysvnTestCase/python/foo")
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211332928 (LWP 2290)]
PyErr_Fetch (p_type=0xbfcf6098, p_value=0xbfcf6098,
p_traceback=0xbfcf6098) at
Python/errors.c:210
210 Python/errors.c: No such file or directory.
in Python/errors.c
(gdb) bt
#0 PyErr_Fetch (p_type=0xbfcf6098, p_value=0xbfcf6098,
p_traceback=0xbfcf6098)
at Python/errors.c:210
#1 0x08060e6e in instance_dealloc (inst=0xb7c5826c) at
Objects/classobject.c:654
#2 0x0808716c in tupledealloc (op=0xb7c5444c) at
Objects/tupleobject.c:169
#3 0x0806d00c in list_dealloc (op=0xb7c50fec) at
Objects/listobject.c:264
#4 0xb7c0b72a in Py::_XDECREF () from
/vol/apps/python-2.4.4/lib/python2.4/site-packages/pysvn/_py
svn_2_4.so
#5 0xb7b813ca in Py::Object::release () from
/vol/apps/python-2.4.4/lib/python2.4/site-packages/pysvn/_py
svn_2_4.so
#6 0xb7b81759 in Py::Object::~Object () from
/vol/apps/python-2.4.4/lib/python2.4/site-packages/pysvn/_py
svn_2_4.so
#7 0xb7b82095 in Py::SeqBase<Py::Object>::~SeqBase ()
from
/vol/apps/python-2.4.4/lib/python2.4/site-packages/pysvn/_py
svn_2_4.so
#8 0xb7b82541 in Py::List::~List () from
/vol/apps/python-2.4.4/lib/python2.4/site-packages/pysvn/_py
svn_2_4.so
#9 0xb7bcf136 in InfoReceiveBaton::~InfoReceiveBaton ()
from
/vol/apps/python-2.4.4/lib/python2.4/site-packages/pysvn/_py
svn_2_4.so
#10 0xb7bbdb2e in pysvn_client::cmd_info2 () from
/vol/apps/python-2.4.4/lib/python2.4/site-packages/pysvn/_py
svn_2_4.so
#11 0xb7bd341f in
Py::PythonExtension<pysvn_client>::method_keyword_call
_handler
() from
/vol/apps/python-2.4.4/lib/python2.4/site-packages/pysvn/_py
svn_2_4.so
#12 0x080b5cf5 in PyEval_EvalFrame (f=0x81421ac) at
Python/ceval.c:3568
#13 0x080b744f in PyEval_EvalCodeEx (co=0xb7cc09e0,
globals=0xb7ca0824,
locals=0xb7ca0824, args=0x0, argcount=0, kws=0x0, kwcount=0,
defs=0x0,
defcount=0, closure=0x0)
at Python/ceval.c:2741
#14 0x080b7695 in PyEval_EvalCode (co=0xbfcf6098,
globals=0xbfcf6098,
locals=0xbfcf6098) at Python/ceval.c:484
#15 0x080d8f6c in PyRun_FileExFlags (fp=0x8140008,
filename=0xbfcf847a
"pysvnTestBroken", start=-1076928360,
globals=0xbfcf6098, locals=0xbfcf6098,
closeit=1, flags=0xbfcf6714)
at Python/pythonrun.c:1285
#16 0x080d920c in PyRun_SimpleFileExFlags (fp=<value
optimized out>,
filename=0xbfcf847a "pysvnTestBroken", closeit=1,
flags=0xbfcf6714) at
Python/pythonrun.c:869
#17 0x08055ab3 in Py_Main (argc=1, argv=0xbfcf67b4) at
Modules/main.c:493
#18 0xb7cddea2 in __libc_start_main () from
/lib/tls/i686/cmov/libc.so.6
#19 0x08054f21 in _start () at
../sysdeps/i386/elf/start.S:119
(gdb)
============================================================
=================
Thank you for looking into this matter.
-MisterPete
------------------------------------------------------------
---------
To unsubscribe, e-mail: issues-unsubscribe pysvn.tigris.org
For additional commands, e-mail: issues-help pysvn.tigris.org
|