On Sat, Aug 14, 2010 at 10:38:27AM +0530, Balbir Singh wrote:
> >> I have the python wrapper working to a large degree
> >>
> >
> > cool!
> >
> >> 1. Please provide input if it works at your end
> >
> > hmmm...I'm getting a Segmentation fault, which is coming from the inner
> > read stats loop. If I comment out the inner loop, I get a correct
> > listing of the directories.
> >
> > Haven't been able to narrow it down more than that yet...using libcgroup
> > libcgroup-0.36.2-2.fc15.i686. However, my python pkg might be outdated
> > i'm using: Python 2.6.4. I'll re-test after upgrading.
> >
>
> Could you please narrow down using gdb and see where the dump is
> coming from. Are you suggesting that ret, p =
> cgroup_read_stats_next(p, cg_stat) in python code is causing the
> problem? python 2.6.4 is good, 2.7 would require movement to the
> capsule module in python. What version of swig are you using?
>
> Balbir
Hi,
so the output from the unmodified script is:
"
$ ./try.py
Directory /
:
Segmentation fault (core dumped)
"
running gdb on the resulting core:
Core was generated by `/usr/bin/python ./try.py'.
Program terminated with signal 11, Segmentation fault.
#0 0x002c31b8 in _IO_getdelim (lineptr=0xbf9fb8dc, n=0xbf9fb8d8,
delimiter=10, fp=0xb776fb78) at iogetdelim.c:58
58 _IO_acquire_lock (fp);
(gdb) bt
#0 0x002c31b8 in _IO_getdelim (lineptr=0xbf9fb8dc, n=0xbf9fb8d8,
delimiter=10, fp=0xb776fb78) at iogetdelim.c:58
#1 0x00761b33 in getline (fp=<value optimized out>,
cgroup_stat=0xa0c6950) at /usr/include/bits/stdio.h:118
#2 cg_read_stat (fp=<value optimized out>, cgroup_stat=0xa0c6950) at
api.c:2786
#3 0x00765f65 in cgroup_read_stats_next (handle=0xbf9fb944,
cgroup_stat=0xa0c6950) at api.c:2836
#4 0x001999cf in ?? ()
#5 0xbf9fb944 in ?? ()
#6 0x0061f85a in PyCFunction_Call (func=0xb7728c4c, arg=0xb776682c,
kw=0x0) at /usr/src/debug/Python-2.7/Objects/methodobject.c:81
#7 0x00682247 in call_function (f=0xa00ba84, throwflag=0) at
/usr/src/debug/Python-2.7/Python/ceval.c:4071
#8 PyEval_EvalFrameEx (f=0xa00ba84, throwflag=0) at
/usr/src/debug/Python-2.7/Python/ceval.c:2721
#9 0x00684130 in PyEval_EvalCodeEx (co=0xb775dad0, globals=0xb779f35c,
locals=0xb779f35c, args=0x0, argcount=0, kws=0x0, kwcount=0,
defs=0x0, defcount=0, closure=0x0) at
/usr/src/debug/Python-2.7/Python/ceval.c:3311
#10 0x00684284 in PyEval_EvalCode (co=0xb775dad0, globals=0xb779f35c,
locals=0xb779f35c) at /usr/src/debug/Python-2.7/Python/ceval.c:670
#11 0x0069f69c in run_mod (mod=<value optimized out>, filename=<value
optimized out>, globals=0xb779f35c, locals=0xb779f35c,
flags=0xbf9fbd3c, arena=0xa051fe0) at
/usr/src/debug/Python-2.7/Python/pythonrun.c:1346
#12 0x006a05e3 in PyRun_FileExFlags (fp=0xa00ba78, filename=0xbf9fc5a1
"./try.py", start=257, globals=0xb779f35c, locals=0xb779f35c,
closeit=1, flags=0xbf9fbd3c) at
/usr/src/debug/Python-2.7/Python/pythonrun.c:1332
#13 0x006a12ac in PyRun_SimpleFileExFlags (fp=0xa00ba78,
filename=0xbf9fc5a1 "./try.py", closeit=1, flags=0xbf9fbd3c)
at /usr/src/debug/Python-2.7/Python/pythonrun.c:936
#14 0x006a1e62 in PyRun_AnyFileExFlags (fp=0xa00ba78,
filename=0xbf9fc5a1 "./try.py", closeit=1, flags=0xbf9fbd3c)
at /usr/src/debug/Python-2.7/Python/pythonrun.c:740
#15 0x006b3c14 in Py_Main (argc=2, argv=0xbf9fbe34) at
/usr/src/debug/Python-2.7/Modules/main.c:599
#16 0x080485c8 in main (argc=2, argv=0xbf9fbe34) at
/usr/src/debug/Python-2.7/Modules/python.c:23
Let me know what additional information I can provide. I did update this
system to Python 2.7, but I was seeing the same crash with the previous
2.6.4. I'm using SWIG Version 2.0.0
thanks,
-Jason
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel