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

CLONE -Lost Connection with Firebird Server [CORE1622] #2043

Closed
firebird-automations opened this issue Nov 29, 2007 · 10 comments
Closed

CLONE -Lost Connection with Firebird Server [CORE1622] #2043

firebird-automations opened this issue Nov 29, 2007 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Rajesh H Thampi (rthampi)

It happens during both the GBAK resore process directly on the server (so no network connection, just a localhost network connection) and a when executing long query or long procedure (on my client)
For example on a 400000 records table, i launch en update on all records, but i always get a :

Unable to complete network request to host "IP address".
Error reading data from the connection.

I get a similar error while inserting many records:

Unable to complete network request to host "IP address".
Error writing data to the connection.

@firebird-automations
Copy link
Collaborator Author

Commented by: Rajesh H Thampi (rthampi)

Using Firebird 2.0.1 and 2.0.3 Classic Server
I have a table with 1,30,000 rows. With 3 fields as Primary key (group_id (int), po_wd(int),word(varchar(50))) and the Index is created on one of those fields (namely Word).
The DB is blazing fast for SELECT queries.
In one portion of my code I'm connecting to the DB, doing a select query and disconnecting. This is being done 80,000 times from my code in a loop. The speed at which it gets the results back are really great.
BUT out of 80,000 when it hits (vaguely) around 300. The code crashes giving this error.
_______________________________________________________
terminate called after throwing an instance of 'ibpp_internals::SQLExceptionImpl'
what(): *** IBPP::SQLException ***
Context: Database::Connect
Message: isc_attach_database failed

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

Engine Code : 335544721
Engine Message :
Unable to complete network request to host "localhost".
Failed to establish a connection.
Connection refused
_______________________________________________________

This error happens when it tries to open a new connection to the Database.
When encountered with this error what I did was catch the error from the connect command (with try catch) and let it sleep for 50 seconds. Then attempting to open another connection is successful. But after a few rows more (30 or so) it will fail again and go into the sleep before trying another time.

I'm thinking cause it didn't flush the earlier data about the connections even though I have disconnected the connection. I tried using forcedwrite = ON. But then I found the bug CORE1476 (ForcedWrites do not work on Linux) and I'm on a Linux machine. So this is kind of a dead lock situation. Any solution to this???

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Server crashed. Getting core dump and providing here backtrace for it can help to fix the bug.

In order to avoid problems with non-working FW, mount filesystem with your database in sync mode.

@firebird-automations
Copy link
Collaborator Author

Commented by: Rajesh H Thampi (rthampi)

I'm using a release version and not the debug version Hence my log file is not too descriptive. Sorry about that. Here is what I got.

firebird.log
----------------------------------
<system name> (Client) Thu Nov 29 20:49:20 2007
INET/inet_error: read errno = 104

<system name> (Client) Thu Nov 29 20:49:22 2007
INET/inet_error: connect errno = 111
----------------------------------

I tried setting ForcedWrite=On in firebird.conf and mounted the HDD as sync. No luck. Its still failing.

@firebird-automations
Copy link
Collaborator Author

Modified by: Rajesh H Thampi (rthampi)

Version: 2.0.3 [ 10200 ]

Version: 2.0.2 [ 10130 ]

Version: 2.0.1 [ 10090 ]

environment: Server : Linux Ubuntu 6.10 Edgy
Client : Windows XP SP2
Firebird 2.0 RC5 (compiled form cvs source)

=>

Server : Linux Fedora Core 5, RedHat 9
Firebird 2.0.x Release Version

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Rajesh, if you are using standard SF binaries, it's not required to have DEV_BUILD version of firebird to get rather useful core dump. Please pay attention - this is NOT firebird.log, this is dump of fbserver process which may be done by OS in case of fault happening in the process.

Please also download debugger symbols from SF and untar them. After getting core dumps do:
gdb /opt/firebird/bin/.debug/fb_inet_server /tmp/core
(or how would it be called on your linux). In gdb do backtrace
(gdb) bt
and send all gdb output to me. Be ready to do some more tests in gdb - keep your core file!

If you are not familiar with getting core dumps, please contact me provately, peshkoff at mail dot ru.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Rajesh, can you continue working on an issue?
In case of no reply I'll have to mark it as non-reproduced.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

No reply from the author of an item for 2 weeks.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Cannot Reproduce [ 5 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 13530 ] => Firebird [ 14040 ]

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