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-issue-importer opened this issue Feb 7, 2018 · 11 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Feb 7, 2018

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 7, 2018

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.4 [ 10861 ]

Fix Version: Jaybird 4 [ 10441 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 29, 2018

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.5 [ 10873 ]

Fix Version: Jaybird 3.0.4 [ 10861 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 4, 2018

Commented by: @mrotteveel

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 25, 2018

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.6 [ 10883 ]

Fix Version: Jaybird 3.0.5 [ 10873 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 9, 2019

Commented by: @mrotteveel

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 9, 2019

Modified by: @mrotteveel

Link: This issue relate to JDBC575 [ JDBC575 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 6, 2019

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.6 [ 10883 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 20, 2019

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 20, 2019

Modified by: @mrotteveel

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

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 14, 2020

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