Stephen R. van den Berg wrote:
This is in a heavy multithreaded application:
I can still explore more structures, have the session still open.
It appears to be undeterministic. I.e. sometimes the problem occurs after a few seconds after application start, sometimes it takes more than 10 minutes before it hits.
The test application in this case is a database filled with about 10 thousand records of 200 bytes each on average. Then I run 10 threads querying the same database on the same single filedescriptor using the pgsql driver. The pgsql driver is just fine with this, but Pike sometimes segfaults. Do note that the pgsql driver does not contain any C-modules.
By querying the whole database in 10 simultaneous threads, you get a wonderfully chaotic interleaved datastream from the database to Pike which takes (on average) more than 10 seconds of runtime until the whole dataset has been transferred.
Due to scheduling at the database side, the actual interleave order of the data for all streams/threads is largely unpredictable.