Project

General

Profile

Bug #621

reject / avoidance of client connection with multiple clients

Added by natlus over 12 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Quassel Core
Target version:
-
Start date:
03/14/2009
Due date:
% Done:

0%

Estimated time:
Version:
0.4.0+
OS:
Any

Description

When client A is connected to core and client B tries to connect, then A and B get disconnected (and cannot connect any more, with no given reason). Then a reconnect to IRC servers is caused.
After that, when B gave up to connect, A come on without difficulties.

Regarding the DB issue (see below), this seems appropriate to solved bug #595 but without core crash.

Affected: git branche since (at least) 2009 03 09.

2009-03-14 06:38:32 Info: Client XX.XXX.XXX.XXX initialized and authenticated successfully as "loc" (UserId: 1).
2009-03-14 08:27:32 Info: Client connected from YY.YYY.YYY.YYY
2009-03-14 08:27:33 Info: Client YY.YYY.YYY.YYY initialized and authenticated successfully as "darki" (UserId: 2).
2009-03-14 08:31:24 Error: unhandled Error in QSqlQuery!
2009-03-14 08:31:24 Error: last Query:
UPDATE buffer
SET lastseenmsgid = :lastseenmsgid
WHERE userid = :userid AND bufferid = :bufferid
2009-03-14 08:31:24 Error: executed Query:
UPDATE buffer
SET lastseenmsgid = ?
WHERE userid = ? AND bufferid = ?
2009-03-14 08:31:24 Error: bound Values: :bufferid=19, :lastseenmsgid=282110, :userid=2
2009-03-14 08:31:24 Error: Error Number: 5
2009-03-14 08:31:24 Error: Error Message: database is locked Unable to fetch row
2009-03-14 08:31:24 Error: Driver Message: Unable to fetch row
2009-03-14 08:31:24 Error: DB Message: database is locked

History

#1 Updated by EgS over 12 years ago

2009-03-14 08:31:24 Error: DB Message: database is locked

That indicates that your sqlite database file is opened by some other process.

Quassel itself uses mutual exclusion to prevent multiple threads from accessing the database at the same time.

It could be some 3rd party tool, the sqlite file could be opened by sqlite3 cli tool or by another core (which would be very bad).

#2 Updated by natlus over 12 years ago

Although this seems very appropriate, I can ensure you that this is not the case. I never ran another sqlite tool or something on that machine. And lsof says I am right - no other process holds an opened file descriptor to the DB file.

To refine my report from above: the locked DB issue does not seem to depend on a connections of several clients. Just one is enough to fire that error from time to time.

Maybe this could be a hint:
1. I can see the log message spread all over the log: "Warning: SignalProxy: Can't call write on a closed device"
2. lsof tells me quaselcore holds 4 file descriptors to the DB file (at the moment)
3. statically linked binary using QT4.5

#3 Updated by EgS over 12 years ago

  • Status changed from New to Resolved
  • Assignee set to EgS

Thanks for the feedback. I found some issues with SQLites implicit transactions (or to be more precise how implicit transactions release locks).
The following commit should fix the issue:

http://git.quassel-irc.org/?p=quassel.git;a=commit;h=9ba0c2918af0f5563fcf6c4e181190fdb0c84906

Please reopen the bug, if the error still occurs.

#4 Updated by yitsushi almost 12 years ago

I use the lastest linux binary... The core runing correctly but ( after random time ) when i try to sync i get this error:

2010-02-22 15:39:13 Info: Client connected from X.X.X.X
2010-02-22 15:40:17 Info: Client X.X.X.X initialized and authenticated successfully as "mj12" (UserId: 2).
2010-02-22 16:11:57 Warning: "no matching slot for sync call: BufferSyncer::requestSetMarkerLine (objectName=""). Params are:" (QVariant(BufferId, ) ,  QVariant(MsgId, ) )
2010-02-22 16:16:06 Error: unhandled Error in QSqlQuery!
2010-02-22 16:16:06 Error:                   last Query: UPDATE bufferSET lastseenmsgid = :lastseenmsgidWHERE userid = :userid AND bufferid = :bufferid 
2010-02-22 16:16:06 Error:               executed Query: UPDATE bufferSET lastseenmsgid = ?WHERE userid = ? AND bufferid = ?
2010-02-22 16:16:06 Error:                 bound Values: :bufferid=171, :lastseenmsgid=216751, :userid=1
2010-02-22 16:16:06 Error:                 Error Number: 5
2010-02-22 16:16:06 Error:                Error Message: database is locked Unable to fetch row
2010-02-22 16:16:06 Error:               Driver Message: Unable to fetch row
2010-02-22 16:16:06 Error:                   DB Message: database is locked
2010-02-22 16:17:09 Info: Client connected from Y.Y.Y.Y

And i'm the 'Userid = 1'...

I know it's a solved problem, but i get this error.
/* In my server i haven't got any qt4 and other X libs... I try to compile it from source (only core), but it's need the libs =( */

thx: Yitsushi

Also available in: Atom PDF