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

Deadlock in event cancellation with fbclient 3.0.0.31839 [JDBC397] #439

Closed
firebird-automations opened this issue May 16, 2015 · 6 comments

Comments

@firebird-automations
Copy link

Submitted by: @mrotteveel

Event cancellation with fbclient 3.0.0.31839 has a deadlock. cancelEvent obtains a lock on the eventhandle, the native call to isc_cancel_events triggers the callback on a separate thread, this callback also attempts to obtain a lock on the eventhandle. It looks like isc_cancel_events won't return until the callback is done so it won't release the lock.

Removing the synchronization in the callback fixes the problem, but investigation is needed to see if a more fine-grained form of locking is needed.

Commits: a4e0dae

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 3.0 [ 10440 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Version: Jaybird 3.0 [ 10440 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Component: JNI/JNA layer [ 10051 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Removed synchronization on the event handle. Made the callback synchronize on itself since it is possible that two callbacks are triggered at once (see also JDBC398 and CORE4795). No further synchronization is needed, as the other parts needing the buffer are not called at the time when the event is queued.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

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