Ubuntu

Kopete intenal sqlite database fails when stored on NFS

Reported by Kyle Gordon on 2007-10-03
4
Affects Status Importance Assigned to Milestone
kdenetwork (Ubuntu)
Wishlist
Unassigned

Bug Description

Binary package hint: kopete

When Kopete stores its internal sqlite database, it chooses to do so on ~ This is problematic when NFS homedirs are in use (and is also why Amarok recommends a MySQL database when NFS homedirs are used)

When running on such a system, the following output is extremely prevalent...

kopete: ERROR: [QStringList StatisticsDB::query(const QString&, QStringList*, bool)] [CollectionDB] sqlite3_compile error:
kopete: ERROR: database is locked
kopete: ERROR: on query: INSERT INTO contactstatus (metacontactid, status, datetimebegin, datetimeend) VALUES('{9489cf6d-2e58-471f-838d-95702062ba69}', 'Away', '1191438713', '1191439636');
kopete: ERROR: [QStringList StatisticsDB::query(const QString&, QStringList*, bool)] [CollectionDB] sqlite3_compile error:
kopete: ERROR: database is locked
kopete: ERROR: on query: INSERT INTO contactstatus (metacontactid, status, datetimebegin, datetimeend) VALUES('{9489cf6d-2e58-471f-838d-95702062ba69}', 'Offline', '1191439636', '1191439659');

This happens for every contact, for every event, on every account. Quite a lot :-)

Regards

Kyle

Michael Chang (thenewme91) wrote :

The SQLite database is used by the "Statistics Plugin"; you can turn it on and off by going to Settings -> Configure Plugins...

From what I can tell the Statistics plugin records when contacts were last seen online (and perhaps other similar things I haven't noticed yet).

According to the SQLite FAQ, SQLite doesn't work well over NFS. (http://www.sqlite.org/faq.html)
"SQLite uses reader/writer locks to control access to the database. <snip> But use caution: this locking mechanism might not work correctly if the database file is kept on an NFS filesystem. This is because fcntl() file locking is broken on many NFS implementations. You should *avoid putting SQLite database files on NFS* if multiple processes might try to access the file at the same time." (emphasis added)

As far as I can tell, the messages don't cause problems if you have one Kopete running at any given time, although if you launch kopete from a Terminal (emulator, or xterm, or uxterm or konsole or whatever you call it) it can be kind of annoying.

Kyle Gordon (kylegordon) wrote :

Hi Michael,

Many thanks for the hint. I'll turn off statistics.

It would be good if the plugin could detect nfsv3 use (somehow!). Apparently sqlite locking will work correctly on nfsv4 systems.

Regards

Kyle

As the bug comes from nfsv3, a simple solution would be to conflict with older packages of nfs.

Daniel T Chen (crimsun) on 2008-10-28
Changed in kopete:
importance: Undecided → Wishlist
status: New → Confirmed
affects: kopete (Ubuntu) → kdenetwork (Ubuntu)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers