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

Jaybird should explicitly call fb_shutdown() on VM exit when using Firebird Embedded [JDBC519] #555

Closed
firebird-automations opened this issue Feb 7, 2018 · 11 comments

Comments

@firebird-automations
Copy link

Submitted by: @mrotteveel

Relate to JDBC575

If the JVM exits and there are still connections open using Firebird Embedded, then the exit may produce an access violation (0xc0000005 error). The root cause is that the fbembed.dll/fbclient.dll will call fb_shutdown() itself, but one of the other libraries (eg fbintl.dll) may already have been unloaded.

To prevent this, Jaybird should register a shutdown hook that explicitly calls fb_shutdown for any of the native libries loaded (but especially for embedded).

See also "Crash Firebird 2.5.8 Embedded with Firebird http://Ado.net provider." on Firebird-devel.

Commits: 2dcfde6 7e65ee0

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.4 [ 10861 ]

Fix Version: Jaybird 4 [ 10441 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.5 [ 10873 ]

Fix Version: Jaybird 3.0.4 [ 10861 ] =>

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Calling fb_shutdown on JVM exit is not good enough, for web applications that might introduce memory leaks on undeploy.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.6 [ 10883 ]

Fix Version: Jaybird 3.0.5 [ 10873 ] =>

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

See #21 for an issue related to not shutting down.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Link: This issue relate to JDBC575 [ JDBC575 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.6 [ 10883 ] =>

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Implemented cleanup handling of native libraries both on JVM exit and on servlet destroy if the driver is loaded from a WAR. Feature can be disabled using system property org.firebirdsql.nativeResourceShutdownDisabled set to true (eg -Dorg.firebirdsql.nativeResourceShutdownDisabled=true on Java command line).

@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