A Tuesday 14 October 2008, g escrigué:
> Hello,
> I am trying to track down a problem I'm having with pytables
> segfaulting. The basic application involves a python thread that
> asynchronously posts data to a Queue, and then another thread reads
> data from the Queue and writes it to an H5 file. The main thread
> opens a new H5 file, then closes it after a few seconds of data has
> been written, then repeats opening and closing like this forever. I
> have flags in place to ensure that the writing thread does not write
> to the h5 file while it's in the process of being closed. However, I
> am still getting seg faults when closing the h5 file. Specifically I
> have traced it to closing the data Table. I have found that if I add
> the lines
> import gc
> gc.collect()
> the seg faulting seems to go away, but I imagine this is just hiding
> the problem.
[snip]

I'd need more details on how your different threads are doing the I/O (a 
code snippet reproducing the problem would be very useful).

Having said that, my guess is that you are fighting the metadata cache 
(either in HDF5 or PyTables, I don't know for sure).  I strongly 
encourage users to completely encapsulate all the I/O operations in one 
single thread as the safest way to workaround thread-related problems.

At any rate, if you can provide some code, I'll be happy to have a more 
in-deep look at this.

Cheers,

-- 
Francesc Alted
Freelance developer
Tel +34-964-282-249

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to