[pybsddb] DB read problem from thread
anurag uniyal
anuraguniyal at yahoo.com
Tue Apr 1 06:13:36 CEST 2008
In my application I am trying to access(read) a DB thru a thread while my main thread is adding data to it and it gives following error(s)
bsddb._db.DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- PANIC: Permission denied')
and sometimes
bsddb._db.DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- PANIC: fatal region error detected; run recovery')
sometimes
bsddb._db.DBInvalidArgError: (22, 'Invalid argument -- DB_LOCK->lock_put: Lock is no longer valid')
sometimes pure seg fault.
Program received signal SIGSEGV, Segmentation fault.
0xb7c1b845 in __bam_adjust () from /usr/lib/libdb-4.4.so
and some time memory usage keeps on increasing and cpu is 100%
it crashes with memory error.
This doesn't happen always, almost 1 in 10 cases.
If i use simple python threaded function instead of threading class, it works.
I have attached a simple script which tries to replicate the scenario.
Do anybody has a clue what I am doing wrong here?
I suppose bsddb3 DB can be accessed from mutiple threads?
or do I need to specifically set DB_THREAD flag? though with db.DB_THREAD it hangs on some mutex?
Thanks a lot
Anurag
Forgot the famous last words? Access your message archive online at http://in.messenger.yahoo.com/webmessengerpromo.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20080401/68e73511/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: crash_simthreading_test.py
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20080401/68e73511/attachment.pl>
More information about the pybsddb
mailing list