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

Creating external function (udf) to not existing dll - and then procedure with it - crash server [CORE4172] #4498

Closed
firebird-automations opened this issue Aug 7, 2013 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @livius2

I do all by flamerobin

1. Create 2 databases - i use 16KB pages WIN1250 - but i suppose not the case
and connect only for first db

2.
then create external function to not existed dll on HDD

DECLARE EXTERNAL FUNCTION LICZ_XXX
integer
RETURNS integer BY VALUE
ENTRY_POINT 'LICZ_XXX'
MODULE_NAME 'XXX_UDF';

commit;

3. then try to create procedure with this udf

SET TERM ^ ;

CREATE PROCEDURE bbb
( ccc integer )
RETURNS
( ddd integer )
AS
BEGIN
ddd = LICZ_XXX(ccc);
suspend;
END^

SET TERM ; ^

try commit

*** IBPP::SQLException ***
Context: Transaction::Commit

SQL Message : -104
can't format message 13:896 -- message file C:\WINDOWS\system32\firebird.msg not found

Engine Code : 335544343
Engine Message :
invalid request BLR at offset 40
function LICZ_XXX is not defined
module name or entrypoint could not be found

4.
aboce is ok and now
rollback transaction;

5. try to connect to second db - FB crashes

VIRTUALXP-28174 Wed Aug 07 08:28:05 2013
Database: C:\DOCUMENTS AND SETTINGS\XPMUSER\PULPIT\KBSQLSTAT\DWA.FDB
Allocated 57516 page buffers of 65536 requested

VIRTUALXP-28174 Wed Aug 07 08:28:05 2013
Operating system call _beginthreadex failed. Error code 8

VIRTUALXP-28174 Wed Aug 07 08:28:05 2013
Database: C:\DOCUMENTS AND SETTINGS\XPMUSER\PULPIT\KBSQLSTAT\DWA.FDB
internal Firebird consistency check (cannot start cache writer thread)

VIRTUALXP-28174 Wed Aug 07 08:28:05 2013
"C:\Program Files\Firebird\Firebird_3_0\firebird.exe": terminated abnormally (4294967295)

VIRTUALXP-28174 Wed Aug 07 08:28:05 2013
Shutting down the server with 1 active connection(s) to 1 database(s), 0 active service(s)

@firebird-automations
Copy link
Collaborator Author

Commented by: @livius2

Server not only "crash" it stop responding to any other request - only killing fbserver process from task manager restore it to life

above steeps are reproducible on other machines

@firebird-automations
Copy link
Collaborator Author

Commented by: @livius2

I test this with current snapshot (30643) and this looks like fixed issue

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 2 [ 10560 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

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

No branches or pull requests

1 participant