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
Firebird crashes when UDF (Delphi?) gets loaded and unloaded frequently [CORE5562] #5829
Comments
Commented by: Alexander Muylaert-Gelein (gonline) attached fast.dll => 64bit dll |
Modified by: Alexander Muylaert-Gelein (gonline)Attachment: all.zip [ 13133 ] |
Commented by: @ibaseru You forgot And, you also forgot to specify BTW, I could understand your request, if you had ready working UDF on 2.5, and it causes crash on 3.0. But if you created this especially for 3.0, who can guarantee that Delphi 64 compiler does not have bugs? |
Commented by: Alexander Muylaert-Gelein (gonline) Hi Sorry, no, only forgot ismt in the example. I've been debugging 3 days on this and was able to bring it down to this tiny example. We are porting our code from 2.5 to 3 and both the d64 compiler and the original dll didn't have this behavior. kind regards alexander |
Commented by: Alexander Muylaert-Gelein (gonline) Hi This dll DOES set the IsMultithreaded to true. But results are the same. Also... there isn't much memory allocation hapening at all. All the function does is return. I also tested FastMM, but that also suffered from the same problems. Same dll under 2.5x has no problems. kind regards |
Modified by: Alexander Muylaert-Gelein (gonline)Attachment: Fast.zip [ 13134 ] |
Commented by: Alexander Muylaert-Gelein (gonline) Two more remarks 1. it doesn't seem to be so much a problem when you always open the "same" database. It happens most when you open many different fdb files in random or. kind regards a |
Commented by: Alexander Muylaert-Gelein (gonline) structure to recreate database |
Modified by: Alexander Muylaert-Gelein (gonline)Attachment: structure.sql [ 13135 ] |
Commented by: Alexander Muylaert-Gelein (gonline) And some basic c# code on how to call the udf.
|
Modified by: @hvladassignee: Vlad Khorsun [ hvlad ] |
Commented by: Alexander Muylaert-Gelein (gonline) Hi, Sorry for the additional two issues. I had some issues getting it comitted. it don't think the wifi is excellent here in the hotel in Sotchi. kind regards Alexander |
Commented by: @hvlad Alexander, please, provide app in binary form. |
Commented by: Alexander Muylaert-Gelein (gonline) Hi Vlad Please find attached windows binary in udfcrash thanks Alexander |
Modified by: Alexander Muylaert-Gelein (gonline)Attachment: UdfCrash.zip [ 13136 ] Attachment: WpfApp1.zip [ 13137 ] |
Commented by: @hvlad Thanks, i reproduced it. |
Modified by: @AlexPeshkoffassignee: Vlad Khorsun [ hvlad ] => Alexander Peshkov [ alexpeshkoff ] |
Modified by: @AlexPeshkoffstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 4.0 Alpha 1 [ 10731 ] Fix Version: 3.0.3 [ 10810 ] |
Modified by: @mrotteveel |
Modified by: @mrotteveel |
Commented by: Alexander Muylaert-Gelein (gonline) Great and fast fix guys Any idea when 3.0.3 is due? thanks Alexander |
Commented by: @dyemanov August-September, I believe. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Cannot be tested Test Specifics: [Platform (Windows/Linux) specific] |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Alexander Muylaert-Gelein (gonline)
Is duplicated by CORE5560
Is duplicated by CORE5561
Attachments:
all.zip
Fast.zip
structure.sql
UdfCrash.zip
WpfApp1.zip
Engine crashes when you frequently load and unload UDF dll in firebird. Especially when you're accessing multiple databases.
To reproduce
1. Copy the fast.dll to the udf folder.
2. copy multiple versions of the test.fdb to "d:\1\test.Fdb", "d:\2\test.fdb" ... "d:\10\test.fdb"
3. Launch firebird
4. Run the attached app. Or basically, Open a connection, execute the UDF function, close the connection.
Do this with multiple threads on multiple databases. The firebird process will crashes within 10 minutes with an access violation.
Workaround is to open another database that uses the udf. As long as the dll stays in memory, no crashes. As soon as it is unloaded, you have a fair chance that it crashes.
Commits: b80624c 68aa9c1
The text was updated successfully, but these errors were encountered: