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

Failure in isc_service_start() [CORE1726] #2150

Closed
firebird-automations opened this issue Feb 4, 2008 · 14 comments
Closed

Failure in isc_service_start() [CORE1726] #2150

firebird-automations opened this issue Feb 4, 2008 · 14 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Mark Liermann (markl)

Attachments:
test.exe

When running IBPP test included with IBPP version 2.5.3.1 on Firebird 2.0.1.12981 Super Server the following error is displayed. If the same version of firebird is installed as a Classic Server, then the manage user functions are successful.

*** IBPP::SQLException ***
Context: Service::RemoveUser
Message: isc_service_start failed

SQL Message : -902
Unsuccessful execution caused by a system error that precludes
successful execution of subsequent statements

Engine Code : 335544344
Engine Message :
I/O error for file "C:\DBSRV\security2.fdb"
Error while trying to open file
The process cannot access the file because it is being used by another process.

Engine Code : 335544344

===================================================================================
SUPER SERVER - test log file :

IBPP Test Suite (Version 2.5.3.1)

Test 1 --- Checking Date/Time (no DB involved)
Now : Y=2008 M=2 D=4, 13:5:9
Test 2 --- Exercise empty database creation & connection
Sync Writes is enabled (Safety).
Use 'speed' command-line argument to test the other mode.
ODS Major 11
ODS Minor 0
Page Size 8192
Pages 140
Buffers 256
Sweep 5000
Reserve true
Test 3 --- Exercise basic DDL operations and IBPP::Exceptions
Test 4 --- Populate database and exercise Blobs and Arrays (100 rows)
Plan: PLAN (TEST NATURAL)
Press any key to continue . . .
Test 5 --- Cocktail of DML statements (100 rows)
Test 6 --- Service APIs
WI-V2.0.3.12981 Firebird 2.0
Shutdown...
Validate...
Restart...
Sweep...
Backup...
Restore...
Manage users
*** IBPP::SQLException ***
Context: Service::RemoveUser
Message: isc_service_start failed

SQL Message : -902
Unsuccessful execution caused by a system error that precludes
successful execution of subsequent statements

Engine Code : 335544344
Engine Message :
I/O error for file "C:\DBSRV\security2.fdb"
Error while trying to open file
The process cannot access the file because it is being used by another process.

Engine Code : 335544344
Test 7 --- Mass delete, AffectedRows() Statistics() and Counts()
Affected rows : 100
Fetches : 1093
Marks : 105
Reads : 68
Writes : 18
Inserts : 0
Updates : 0
Deletes : 100
ReadIdx : 89
ReadSeq : 171
Test 8 --- Events interface
Adding a trigger to the test database...
Registering 200 events (!)
Inserting 2 records, that should trigger 'INSERT' event...
Commit...
First immediate call to Dispatch()
Sleeping 2 sec...
Adding an event
Second call to Dispatch()
Inserting 3 records, that should trigger 'INSERT' event...
Third call to Dispatch (commit not done)...
*** Event INSERT triggered, count = 2 ***
Now committing (events should only trigger after commit)...
Series of 20 calls to Dispatch(),
with a 0.050 sec sleep after each
*** Event INSERT triggered, count = 3 ***

       Start new transaction, trigger the event, drop it then dispatch\.\.\.
       You should see NO event trigger \(else it would be a bug\)
       Series of 20 calls to Dispatch\(\),
       with a 0\.050 sec sleep after each

       Re\-registering a same event again\.\.\.
       You should see NO event trigger \(else it would be a bug\)

*** FAILED ***

==================================================================================
CLASSIC SERVER - test log file:

IBPP Test Suite (Version 2.5.3.1)

Test 1 --- Checking Date/Time (no DB involved)
Now : Y=2008 M=2 D=4, 13:3:49
Test 2 --- Exercise empty database creation & connection
Sync Writes is enabled (Safety).
Use 'speed' command-line argument to test the other mode.
ODS Major 11
ODS Minor 0
Page Size 8192
Pages 140
Buffers 256
Sweep 5000
Reserve true
Test 3 --- Exercise basic DDL operations and IBPP::Exceptions
Test 4 --- Populate database and exercise Blobs and Arrays (100 rows)
Plan: PLAN (TEST NATURAL)
Press any key to continue . . .
Test 5 --- Cocktail of DML statements (100 rows)
Test 6 --- Service APIs
WI-V2.0.3.12981 Firebird 2.0
Shutdown...
Validate...
Restart...
Sweep...
Backup...
Restore...
Manage users

       All users : SYSDBA, EPOCMAN
       Expected 2 users connected, found 1\.
       Connected users : SYSDBA

Test 7 --- Mass delete, AffectedRows() Statistics() and Counts()
Affected rows : 100
Fetches : 1100
Marks : 105
Reads : 77
Writes : 18
Inserts : 0
Updates : 0
Deletes : 100
ReadIdx : 89
ReadSeq : 171
Test 8 --- Events interface
Adding a trigger to the test database...
Registering 200 events (!)
Inserting 2 records, that should trigger 'INSERT' event...
Commit...
First immediate call to Dispatch()
Sleeping 2 sec...
Adding an event
Second call to Dispatch()
Inserting 3 records, that should trigger 'INSERT' event...
Third call to Dispatch (commit not done)...
*** Event INSERT triggered, count = 2 ***
Now committing (events should only trigger after commit)...
Series of 20 calls to Dispatch(),
with a 0.050 sec sleep after each
*** Event INSERT triggered, count = 3 ***

       Start new transaction, trigger the event, drop it then dispatch\.\.\.
       You should see NO event trigger \(else it would be a bug\)
       Series of 20 calls to Dispatch\(\),
       with a 0\.050 sec sleep after each

       Re\-registering a same event again\.\.\.
       You should see NO event trigger \(else it would be a bug\)

Commits: dbf6552 584e2f6 cf6b588 c3e1830 134bc0e

@firebird-automations
Copy link
Collaborator Author

Commented by: Mark Liermann (markl)

The following file, TEST.exe is the test sequence executable that I run.

test.exe scanned with AVG, certified virus free

The file is IBPP version 2.5.3.1
compiled using wxDevCpp 6.10.2 and GCC 3.4.5
no difference compiling with GCC 3.4.2

@firebird-automations
Copy link
Collaborator Author

Modified by: Mark Liermann (markl)

Attachment: test.exe [ 10770 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: Mark Liermann (markl)

Component: API / Client Library [ 10040 ]

environment: Windows XP sp2
IBPP Library version 2.5.3.1
--compiled with GCC 3.4.5

Firebird version WI-V2.0.3.12981 Firebird 2 Classic & Super Server installs
fresh install for each version prior to running the test included with IBPP

=>

Windows XP sp2
IBPP Library version 2.5.3.1
--compiled with GCC 3.4.5

Firebird version WI-V2.0.3.12981 Firebird 2 Classic & Super Server installs
fresh install for each version prior to running the test included with IBPP

Firebird installed to C:\DBSRV and a \data subdirectory created to process test data creation.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

The problem is caused by the too early execution of jrd.cpp::getUserInfo(). At this moment, dbb_filename is not set up yet, hence the recursive init() call creates another dbb instead of using an existing one. So we have two dbbs pointing to a single database file. Of course the second one fails in PIO, as SS locks the database file exclusively.

Previously is wasn't a problem because of quite late execution of SCL_init() which performed user validation.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

An amazing fact - after using security database in sevrices it was never closed till first database detach. And it was no matter, was services manager already detached at that moment or not. Therefore, if normal database was detached before service manager, this bug showed itself.

Current fix is not complete - an additional check in jrd.cpp is needed to always avoid such failures, but keeping buggy services behavior is also not OK.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

Fix Version: 2.5 Alpha 1 [ 10224 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

Target: 2.1 RC2, 2.0.4, 2.5 Alpha 1 [ 10250, 10211, 10224 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

In pre-2.5 versions I've applied partial fix for this problem, which should be enough for versions which will not contain new features in the future.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 2.1 RC2 [ 10250 ]

Fix Version: 2.0.4 [ 10211 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

summary: isc_service_start failed -- WI-V2.0.3.12981 => Failure in isc_service_start()

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

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