Bug #997

avatar

DatabaseFileLockedException thrown in Db4oMessageBuffer.InitDatabase()

Added by Martin Häckel 3420 days ago. Updated 3332 days ago.

Status:New Start:11/16/2014
Priority:Normal Due date:
Assigned to:avatarMirco Bauer % Done:

0%

Category:Engine
Target version:-
Complexity:

Found in Version:

0.11

Votes: 0

Description

[2014-11-16|21:17:17] -!- Öffnen des Gesprächverlaufs zum Schreiben fehlgeschlagen. Ihr Gesprächsverlauf wird nicht vorgehalten. Grund: Sharing violation on path /home/martin/.local/share/smuxi/buffers/martin/xmpp/jabber.ccc.de/jabber.ccc.de.db4o
[2014-11-16|21:17:17] -!- Öffnen des Gesprächverlaufs zum Schreiben fehlgeschlagen. Ihr Gesprächsverlauf wird nicht vorgehalten. Grund: Sharing violation on path /home/martin/.local/share/smuxi/buffers/martin/xmpp/jabber.ccc.de/contacts.db4o

I'm using 2 accounts at jabber.ccc.de, maybe this causing the issue?

.smuxi-server.log:

2014-11-16 21:17:17,390 [Threadpool worker] ERROR Smuxi.Engine.Db4oMessageBuffer - InitDatabase(): failed to open message database: /home/martin/.local/share/smuxi/buffers/martin/xmpp/jabber.ccc.de/jabber.ccc.de.db4o
Db4objects.Db4o.Ext.DatabaseFileLockedException: /home/martin/.local/share/smuxi/buffers/martin/xmpp/jabber.ccc.de/jabber.ccc.de.db4o ---> System.IO.IOException: Sharing violation on path /home/martin/.local/share/smuxi/buffers/martin/xmpp/jabber.ccc.de/jabber.ccc.de.db4o
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at Sharpen.IO.RandomAccessFile..ctor (System.String file, Boolean readOnly, Boolean lockFile) [0x00006] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/native/Sharpen/IO/RandomAccessFile.cs:22 
  at Db4objects.Db4o.IO.RandomAccessFileFactory.NewRandomAccessFile (System.String path, Boolean readOnly, Boolean lockFile) [0x00004] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/native/Db4objects.Db4o/IO/RandomAccessFileFactory.cs:18 
  --- End of inner exception stack trace ---
  at Db4objects.Db4o.IO.RandomAccessFileFactory.NewRandomAccessFile (System.String path, Boolean readOnly, Boolean lockFile) [0x00039] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/native/Db4objects.Db4o/IO/RandomAccessFileFactory.cs:30 
  at Db4objects.Db4o.IO.FileStorage+FileBin..ctor (Db4objects.Db4o.IO.BinConfiguration config) [0x0001e] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/IO/FileStorage.cs:56 
  at Db4objects.Db4o.IO.FileStorage.Open (Db4objects.Db4o.IO.BinConfiguration config) [0x00000] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/IO/FileStorage.cs:32 
  at Db4objects.Db4o.IO.StorageDecorator.Open (Db4objects.Db4o.IO.BinConfiguration config) [0x00000] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/IO/StorageDecorator.cs:31 
  at Db4objects.Db4o.IO.CachingStorage.Open (Db4objects.Db4o.IO.BinConfiguration config) [0x00000] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/IO/CachingStorage.cs:72 
  at Db4objects.Db4o.Internal.IoAdaptedObjectContainer.OpenImpl () [0x000a1] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Internal/IoAdaptedObjectContainer.cs:63 
  at Db4objects.Db4o.Internal.ObjectContainerBase+_IRunnable_129.Run () [0x00075] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Internal/ObjectContainerBase.cs:166 
  at Db4objects.Db4o.Foundation.DynamicVariable.With (System.Object value, IRunnable block) [0x00018] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Foundation/DynamicVariable.cs:63 
  at Db4objects.Db4o.Foundation.Environments.RunWith (IEnvironment environment, IRunnable runnable) [0x00000] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Foundation/Environments.cs:32 
  at Db4objects.Db4o.Internal.ObjectContainerBase.WithEnvironment (IRunnable runnable) [0x00000] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Internal/ObjectContainerBase.cs:193 
  at Db4objects.Db4o.Internal.ObjectContainerBase.Open () [0x00000] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Internal/ObjectContainerBase.cs:144 
  at Db4objects.Db4o.Internal.IoAdaptedObjectContainer..ctor (IConfiguration config, System.String fileName) [0x00019] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Internal/IoAdaptedObjectContainer.cs:35 
  at Db4objects.Db4o.Internal.ObjectContainerFactory.OpenObjectContainer (IEmbeddedConfiguration config, System.String databaseFileName) [0x00012] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Internal/ObjectContainerFactory.cs:19 
  at Db4objects.Db4o.Db4oEmbedded.OpenFile (IEmbeddedConfiguration config, System.String databaseFileName) [0x0000c] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Db4oEmbedded.cs:97 
  at Smuxi.Engine.Db4oMessageBuffer.OpenDatabase () [0x00014] in /tmp/buildd/smuxi-0.11~rc5/src/Engine/MessageBuffers/Db4oMessageBuffer.cs:399 
  at Smuxi.Engine.Db4oMessageBuffer.InitDatabase () [0x00006] in /tmp/buildd/smuxi-0.11~rc5/src/Engine/MessageBuffers/Db4oMessageBuffer.cs:334 
2014-11-16 21:17:17,396 [Threadpool worker] ERROR Smuxi.Engine.ChatModel - InitMessageBuffer(): Db4oMessageBuffer() threw exception, falling back to memory backend!
System.IO.IOException: Sharing violation on path /home/martin/.local/share/smuxi/buffers/martin/xmpp/jabber.ccc.de/jabber.ccc.de.db4o
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.File.OpenWrite (System.String path) [0x00000] in <filename unknown>:0 
  at Smuxi.Engine.Db4oMessageBuffer.FixDatabase (System.Exception ex) [0x0002d] in /tmp/buildd/smuxi-0.11~rc5/src/Engine/MessageBuffers/Db4oMessageBuffer.cs:433 
2014-11-16 21:17:17,441 [Threadpool worker] ERROR Smuxi.Engine.Db4oMessageBuffer - InitDatabase(): failed to open message database: /home/martin/.local/share/smuxi/buffers/martin/xmpp/jabber.ccc.de/contacts.db4o
Db4objects.Db4o.Ext.DatabaseFileLockedException: /home/martin/.local/share/smuxi/buffers/martin/xmpp/jabber.ccc.de/contacts.db4o ---> System.IO.IOException: Sharing violation on path /home/martin/.local/share/smuxi/buffers/martin/xmpp/jabber.ccc.de/contacts.db4o
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at Sharpen.IO.RandomAccessFile..ctor (System.String file, Boolean readOnly, Boolean lockFile) [0x00006] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/native/Sharpen/IO/RandomAccessFile.cs:22 
  at Db4objects.Db4o.IO.RandomAccessFileFactory.NewRandomAccessFile (System.String path, Boolean readOnly, Boolean lockFile) [0x00004] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/native/Db4objects.Db4o/IO/RandomAccessFileFactory.cs:18 
  --- End of inner exception stack trace ---
  at Db4objects.Db4o.IO.RandomAccessFileFactory.NewRandomAccessFile (System.String path, Boolean readOnly, Boolean lockFile) [0x00039] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/native/Db4objects.Db4o/IO/RandomAccessFileFactory.cs:30 
  at Db4objects.Db4o.IO.FileStorage+FileBin..ctor (Db4objects.Db4o.IO.BinConfiguration config) [0x0001e] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/IO/FileStorage.cs:56 
  at Db4objects.Db4o.IO.FileStorage.Open (Db4objects.Db4o.IO.BinConfiguration config) [0x00000] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/IO/FileStorage.cs:32 
  at Db4objects.Db4o.IO.StorageDecorator.Open (Db4objects.Db4o.IO.BinConfiguration config) [0x00000] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/IO/StorageDecorator.cs:31 
  at Db4objects.Db4o.IO.CachingStorage.Open (Db4objects.Db4o.IO.BinConfiguration config) [0x00000] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/IO/CachingStorage.cs:72 
  at Db4objects.Db4o.Internal.IoAdaptedObjectContainer.OpenImpl () [0x000a1] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Internal/IoAdaptedObjectContainer.cs:63 
  at Db4objects.Db4o.Internal.ObjectContainerBase+_IRunnable_129.Run () [0x00075] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Internal/ObjectContainerBase.cs:166 
  at Db4objects.Db4o.Foundation.DynamicVariable.With (System.Object value, IRunnable block) [0x00018] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Foundation/DynamicVariable.cs:63 
  at Db4objects.Db4o.Foundation.Environments.RunWith (IEnvironment environment, IRunnable runnable) [0x00000] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Foundation/Environments.cs:32 
  at Db4objects.Db4o.Internal.ObjectContainerBase.WithEnvironment (IRunnable runnable) [0x00000] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Internal/ObjectContainerBase.cs:193 
  at Db4objects.Db4o.Internal.ObjectContainerBase.Open () [0x00000] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Internal/ObjectContainerBase.cs:144 
  at Db4objects.Db4o.Internal.IoAdaptedObjectContainer..ctor (IConfiguration config, System.String fileName) [0x00019] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Internal/IoAdaptedObjectContainer.cs:35 
  at Db4objects.Db4o.Internal.ObjectContainerFactory.OpenObjectContainer (IEmbeddedConfiguration config, System.String databaseFileName) [0x00012] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Internal/ObjectContainerFactory.cs:19 
  at Db4objects.Db4o.Db4oEmbedded.OpenFile (IEmbeddedConfiguration config, System.String databaseFileName) [0x0000c] in /tmp/buildd/smuxi-0.11~rc5/lib/db4o-net/Db4objects.Db4o/Db4objects.Db4o/Db4oEmbedded.cs:97 
  at Smuxi.Engine.Db4oMessageBuffer.OpenDatabase () [0x00014] in /tmp/buildd/smuxi-0.11~rc5/src/Engine/MessageBuffers/Db4oMessageBuffer.cs:399 
  at Smuxi.Engine.Db4oMessageBuffer.InitDatabase () [0x00006] in /tmp/buildd/smuxi-0.11~rc5/src/Engine/MessageBuffers/Db4oMessageBuffer.cs:334 
2014-11-16 21:17:17,441 [Threadpool worker] ERROR Smuxi.Engine.ChatModel - InitMessageBuffer(): Db4oMessageBuffer() threw exception, falling back to memory backend!
System.IO.IOException: Sharing violation on path /home/martin/.local/share/smuxi/buffers/martin/xmpp/jabber.ccc.de/contacts.db4o
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.File.OpenWrite (System.String path) [0x00000] in <filename unknown>:0 
  at Smuxi.Engine.Db4oMessageBuffer.FixDatabase (System.Exception ex) [0x0002d] in /tmp/buildd/smuxi-0.11~rc5/src/Engine/MessageBuffers/Db4oMessageBuffer.cs:433

_

Smuxi
Vendor: Debian 0.11~rc5-1
Frontend: GNOME 0.11.0.0
Engine: 0.11.0.0


Related issues

related to Smuxi - Feature #981 Mark "Persistency Type" "Persistent (Db4o)" to be deprecated Closed 08/29/2014

History

Updated by Mirco Bauer 3420 days ago

avatar

The experimental db4o backend was never production ready. You should upgrade to the sqlite backend of Smuxi 0.12-dev.

Updated by Mirco Bauer 3420 days ago

avatar

Smuxi can deal with multiple connections to the same server/network but not with the on-disk chat history backed by db4o, the sqlite backend supports multiple reader and writers.

Updated by Mirco Bauer 3420 days ago

avatar
  • Subject changed from Öffnen des Gesprächverlaufs zum Schreiben fehlgeschlagen to DatabaseFileLockedException thrown in Db4oMessageBuffer.InitDatabase()
  • Category set to Engine

Updated by Martin Häckel 3414 days ago

avatar

sqlite <-> db4o: So, does this change, when I switch in the settings from "Volatil" to "Persistent" ?

I couldn't find a documentation, what's exactly the difference between the two settings. Also the different buffer line settings should be explained somewhere more detailed. It's a little bit confusing at the first view...

Updated by Mirco Bauer 3411 days ago

avatar

Martin Häckel wrote:

sqlite <-> db4o: So, does this change, when I switch in the settings from "Volatil" to "Persistent" ?

Yes Persistent uses db4o as backend and that threw the exceptions you have reported.

I couldn't find a documentation, what's exactly the difference between the two settings. Also the different buffer line settings should be explained somewhere more detailed. It's a little bit confusing at the first view...

I agree, I sometimes also forget what each setting means related to the buffers :-D

Updated by Mirco Bauer 3411 days ago

avatar
  • Assigned to set to Mirco Bauer

Updated by Mirco Bauer 3332 days ago

avatar

Martin Häckel wrote:

sqlite <-> db4o: So, does this change, when I switch in the settings from "Volatil" to "Persistent" ?

I couldn't find a documentation, what's exactly the difference between the two settings.

Smuxi's message buffers are now documented: https://smuxi.im/faq/usage/message-buffer-settings/

Also available in: Atom PDF