Interestingly, the program does not crash when run under valgrind.
It does produce this error:
==13337== Invalid write of size 1
==13337== at 0x1B90583D: memcpy (in /usr/lib/valgrind/
vgpreload_memcheck.so)
==13337== by 0x1BFD1204: H5V_memcpyvv (H5V.c:1316)
==13337== Address 0x1D3CCEDF is 11959 bytes inside a block of size
200000 free'd
==13337== at 0x1B9048AC: free (in /usr/lib/valgrind/
vgpreload_memcheck.so)
==13337== by 0x1B96B10C: PyObject_Free (obmalloc.c:798)
==13337== by 0x1B96AB9A: PyMem_Free (object.c:1958)
==13337== by 0x1BD7A359: memory_dealloc (memorymodule.c:71)
==13337== by 0x1B91D61E: _ndarray_dealloc (_ndarraymodule.c:448)
==13337== by 0x1B977A6D: subtype_dealloc (typeobject.c:703)
==13337== by 0x1B964D59: insertdict (dictobject.c:397)
==13337== by 0x1B9650A7: PyDict_SetItem (dictobject.c:551)
==13337== by 0x1B96A1F4: PyObject_GenericSetAttr (object.c:1370)
==13337== by 0x1B969D09: PyObject_SetAttr (object.c:1123)
==13337== by 0x1B998D38: PyEval_EvalFrame (ceval.c:1761)
==13337== by 0x1B99BD0B: fast_function (ceval.c:3640)
==13337==
Looks like Python is checking to see if it needs to free something
that has already been free'd by the hdf5 libraries. I am not sure
how to track this down, you might have to set a breakpoint on that
memcpy call and see where pytables is for a few calls. Usually
valgrind magically points out the bug for this kind of thing, but you
are not so lucky...
Russel
On Apr 25, 2006, at 4:40 PM, Andrew Straw wrote:
The following code fails on data files I created yesterday using
pytables (IIRC a daily snapshot just prior to the 1.3 release --
it's called "1.3beta2"). The h5* tools seem to work (e.g. h5ls,
h5dump and so on). The segfault occurs with pytables 1.2.3, 1.3,
and today's svn current as of now.
I've put a copy of a small (940 KB) example at http://
mosca.caltech.edu/outgoing/DATA20060424_185459.h5
The code that fails is:
import tables
results = tables.openFile('DATA20060424_185459.h5')
for row in results.root.data2d:
print '1'
The segfault happens when trying to get the iterator from the Table
class. (The print statement is never reached.)
It's possible I've got something screwy on my system, but I'm not
sure what. Any help would be appreciated.
Cheers!
Andrew
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your
job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?
cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users