Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction hangs when multiple threads execute same procedure very frequently [PYFB46] #64

Closed
firebird-automations opened this issue Jan 3, 2015 · 3 comments

Comments

@firebird-automations
Copy link

Submitted by: Rajko Thon (rthon)

Attachments:
fdb_test.zip

For a database stress test we run a python script which spawns multiple threads with multiple connections per thread.
After some short time all threads stop working (hang).
See attached python script which reproduces the error reliably.
The issue seems to occur for multiple threads only. One thread alone is working fine.
A similar program using freepascal does not have any problem with the same database.
So we think it is a problem in the python driver which also only occurs under high load.

For 4 threads: See faulthandler traceback-output on Linux after: kill -USR1 <pid>.
Surprisingly one thread suddenly seems to jump from __XSQLDA2Tuple into the destructor.
The subsequent close seems to block all other threads.

Faulthandler output:

Thread 0x00007f3039020700 (most recent call first):
File "/usr/local/lib/python3.4/dist-packages/fdb/fbcore.py", line 3028 in _close
File "/usr/local/lib/python3.4/dist-packages/fdb/fbcore.py", line 3149 in __del__
File "/usr/local/lib/python3.4/dist-packages/fdb/fbcore.py", line 2383 in __XSQLDA2Tuple
File "/usr/local/lib/python3.4/dist-packages/fdb/fbcore.py", line 3070 in _execute
File "/usr/local/lib/python3.4/dist-packages/fdb/fbcore.py", line 3353 in execute
File "http://fbcall.py", line 70 in run
File "/usr/lib/python3.4/threading.py", line 920 in _bootstrap_inner
File "/usr/lib/python3.4/threading.py", line 888 in _bootstrap

Thread 0x00007f3039821700 (most recent call first):
File "/usr/local/lib/python3.4/dist-packages/fdb/fbcore.py", line 3062 in _execute
File "/usr/local/lib/python3.4/dist-packages/fdb/fbcore.py", line 3353 in execute
File "http://fbcall.py", line 70 in run
File "/usr/lib/python3.4/threading.py", line 920 in _bootstrap_inner
File "/usr/lib/python3.4/threading.py", line 888 in _bootstrap

Thread 0x00007f303a022700 (most recent call first):
File "/usr/local/lib/python3.4/dist-packages/fdb/fbcore.py", line 3062 in _execute
File "/usr/local/lib/python3.4/dist-packages/fdb/fbcore.py", line 3353 in execute
File "http://fbcall.py", line 70 in run
File "/usr/lib/python3.4/threading.py", line 920 in _bootstrap_inner
File "/usr/lib/python3.4/threading.py", line 888 in _bootstrap

Thread 0x00007f303a823700 (most recent call first):
File "/usr/local/lib/python3.4/dist-packages/fdb/fbcore.py", line 3062 in _execute
File "/usr/local/lib/python3.4/dist-packages/fdb/fbcore.py", line 3353 in execute
File "http://fbcall.py", line 70 in run
File "/usr/lib/python3.4/threading.py", line 920 in _bootstrap_inner
File "/usr/lib/python3.4/threading.py", line 888 in _bootstrap

Current thread 0x00007f303eaa2700 (most recent call first):
File "/usr/lib/python3.4/threading.py", line 1076 in _wait_for_tstate_lock
File "/usr/lib/python3.4/threading.py", line 1060 in join
File "http://fbcall.py", line 226 in <module>

@firebird-automations
Copy link
Author

Modified by: Rajko Thon (rthon)

Attachment: fdb_test.zip [ 12658 ]

@firebird-automations
Copy link
Author

Commented by: @pcisar

Cannot reproduce with 1.4.6

@firebird-automations
Copy link
Author

Modified by: @pcisar

status: Open [ 1 ] => Closed [ 6 ]

resolution: Cannot Reproduce [ 5 ]

Fix Version: 1.4.6 [ 10690 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants