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
Server crashes during prepare or throws incorrect parsing error if the remotely passed SQL query is empty [CORE3554] #3910
Comments
Modified by: Gregori Arjona (garjona)description: In several of our servers we detected regular blocks, we have set to record drwatson memory dumps and found that every time an error occurs in the same line of code during the GDS_DSQL_PREPARE. C:\src\Firebird-2.1.4.18393-0\src\dsql\dsql.cpp line 1373 if (!length) { Whe can attach "user.dmp" and "drwtsn32.log" => In several of our servers we detected regular crashes of firebird, 1 or 2 times a day, we have set to record drwatson memory dumps and found that every time an error occurs is in the same line of code during the GDS_DSQL_PREPARE. C:\src\Firebird-2.1.4.18393-0\src\dsql\dsql.cpp line 1373 if (!length) { Whe can attach "user.dmp" and "drwtsn32.log" |
Modified by: Gregori Arjona (garjona)Attachment: drwtsn32.log [ 11974 ] |
Modified by: Gregori Arjona (garjona)environment: Windows 2003, Firebird 2.1.4.18393 win32, Firebird odbc 2.0.0.148/2.0.0.151. => Windows 2003 standard edition 4gb RAM |
Commented by: @dyemanov What was the fbclient.dll version used to connect the server? Was a connection local or remote (TCP)? |
Commented by: Gregori Arjona (garjona) - fbclient.dll version 2.1.4.18393 I'm trying to upload a memory dump on an external server, because the file is too large. Here is: |
Commented by: @dyemanov Also, SuperServer or Classic? |
Commented by: Gregori Arjona (garjona) Sorry, SuperServer version. |
Commented by: @dyemanov I confirm the problem. |
Commented by: @dyemanov Well, we can surely fix the server to not crash. But I'm not sure it will magically resolve your issues, as the actual problem lies on the client side. Your application either passes the empty SQL text to prepare, or passes a "too long" SQL text (64KB or 128KB etc) so its length becomes zero as a result of conversion into USHORT (unsigned 16-bit integer) which represents the supported SQL text length. |
Commented by: Gregori Arjona (garjona) Ok, do you think the problem may be related to the ODBC drivers?, because I am sure that my application does not send empty or too big, SQL queries. If so, then i ask for help to the developer of the ODBC drivers. Thank you very much, Dmitry. |
Commented by: @dyemanov Honestly, I don't know. You could start with the call tracing enabled (in the ODBC settings) and find out the last statements before the server crashes. It might give some ideas for further searching. Or you might try the next (tomorrow's) snapshot build of v2.1.5 which would have the crash supposedly fixed and test it in the field. If I'm right, you'll get the proper error reported and this could be enough to have the reason debugged on your side by adding the error logging into the application. |
Modified by: @dyemanovVersion: 2.5.0 [ 10221 ] Version: 2.0.6 [ 10303 ] Version: 3.0 Initial [ 10301 ] Version: 1.5.6 [ 10225 ] Version: 2.1.3 [ 10302 ] Version: 2.1.2 [ 10270 ] Version: 2.0.5 [ 10222 ] Version: 2.1.1 [ 10223 ] Version: 2.0.4 [ 10211 ] Version: 2.1.0 [ 10041 ] summary: Lot of crashes during sql_prepare with Access violation - code c0000005 error => Server crashes during prepare or throws incorrect parsing error if the remotely passed SQL query is empty |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Modified by: @dyemanovFix Version: 2.1.5 [ 10420 ] |
Modified by: @dyemanovstatus: Open [ 1 ] => In Progress [ 3 ] |
Commented by: Gregori Arjona (garjona) Hello Dmitry. Now i'm testing the snapshot build of v2.1.5 and the server does not crash, but on another server i have a diferent problem, the server crashes in a diferent way, i post the link to the server memory dump, can you have a look ? or i need to create a new issue. http://www.tempfiles.net/download/201107/203954/user_dmp_15072011.html Thank you very much |
Commented by: @dyemanov What is the FB version/build on that another server? 2.1.4.18393 or some snapshot build? |
Commented by: Gregori Arjona (garjona) It's Firebird 2.1.4.18393. This server also suffers from the same problem of errors during prepare, but this new error occurs more times a day. |
Modified by: @dyemanovstatus: In Progress [ 3 ] => Open [ 1 ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovstatus: Closed [ 6 ] => Closed [ 6 ] QA Status: Done successfully Test Details: Test was made only for 3.0 because 2.5 allows to pass in ES much longer string than 32K. |
Submitted by: Gregori Arjona (garjona)
Attachments:
drwtsn32.log
In several of our servers we detected regular crashes of firebird, 1 or 2 times a day, we have set to record drwatson memory dumps and found that every time an error occurs is in the same line of code during the GDS_DSQL_PREPARE.
C:\src\Firebird-2.1.4.18393-0\src\dsql\dsql.cpp
line 1373
if (!length) {
length = strlen(string); <----- firebird crashes here.
}
Whe can attach "user.dmp" and "drwtsn32.log"
Commits: ac96c3a 23241eb acb020f
====== Test Details ======
Test was made only for 3.0 because 2.5 allows to pass in ES much longer string than 32K.
The text was updated successfully, but these errors were encountered: