After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 556177 - Crash with truncated files in Addin database
Crash with truncated files in Addin database
Status: RESOLVED DUPLICATE of bug 540496
Product: tomboy
Classification: Applications
Component: General
0.12.x
Other Linux
: Normal critical
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-10-13 19:00 UTC by M. Kaatari
Modified: 2009-10-04 00:48 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
The "addins", and "addin-db-001" that caused the crash (2.48 KB, application/x-bzip)
2008-10-13 19:45 UTC, M. Kaatari
Details

Description M. Kaatari 2008-10-13 19:00:24 UTC
Each time I open up Tomboy I get this nasty crash, and if I open it in a terminal, I get a quite awful error spam that goes something like this;

[DEBUG]: NoteManager created with note path "/my/homedir/.tomboy".
[INFO]: Initializing Mono.Addins
Stack overflow in unmanaged: IP: 0xb7f05402, fault addr: 0xbf61bffc
Stack overflow: IP: 0x8113db9, fault addr: 0xbf613ff8
At Unmanaged
Stacktrace:

  at (wrapper managed-to-native) System.IO.MonoIO.Read (intptr,byte[],int,int,System.IO.MonoIOError&) <0x00004>
  at (wrapper managed-to-native) System.IO.MonoIO.Read (intptr,byte[],int,int,System.IO.MonoIOError&) <0xffffffff>
  at System.IO.FileStream.ReadData (intptr,byte[],int,int) <0x00028>
  at System.IO.FileStream.RefillBuffer () <0x00022>
  at System.IO.FileStream.ReadByte () <0x0007a>
  at Mono.Addins.Serialization.BinaryXmlReader.ReadNext () <0x0001f>
  at Mono.Addins.Serialization.BinaryXmlReader.Skip () <0x00049>
  at Mono.Addins.Serialization.BinaryXmlReader.Skip () <0x00055>
 
 ...... (Continues for about 360 000 lines)
  
  at Mono.Addins.Serialization.BinaryXmlReader.Skip () <0x00055>
  at Mono.Addins.Serialization.BinaryXmlReader.SkipToValue (string) <0x0007c>
  at Mono.Addins.Serialization.BinaryXmlReader.ReadStringValue (string) <0x0000e>
  at Mono.Addins.Database.FileDatabase.OpenFileForPath (string,string,Mono.Addins.Serialization.BinaryXmlTypeMap,bool,object&) <0x0007d>
  at Mono.Addins.Database.FileDatabase.ReadSharedObject (string,string,string,string,Mono.Addins.Serialization.BinaryXmlTypeMap,bool,string&) <0x00096>
  at Mono.Addins.Database.FileDatabase.ReadSharedObject (string,string,string,string,Mono.Addins.Serialization.BinaryXmlTypeMap,string&) <0x0001e>
  at Mono.Addins.Database.AddinScanFolderInfo.Read (Mono.Addins.Database.FileDatabase,string,string) <0x00057>
  at Mono.Addins.Database.AddinDatabase.GetFolderInfoForPath (Mono.Addins.IProgressStatus,string,Mono.Addins.Database.AddinScanFolderInfo&) <0x00035>
  at Mono.Addins.Database.AddinDatabase.GetFolderDomain (Mono.Addins.IProgressStatus,string) <0x00020>
  at Mono.Addins.AddinRegistry..ctor (string,string) <0x000b3>
  at Mono.Addins.AddinManager.Initialize (string) <0x000db>
  at Tomboy.AddinManager.InitializeMonoAddins () <0x00121>
  at Tomboy.AddinManager..ctor (string) <0x0005f>
  at Tomboy.NoteManager.CreateAddinManager () <0x00037>
  at Tomboy.NoteManager..ctor (string,string) <0x00091>
  at Tomboy.NoteManager..ctor (string) <0x0002a>
  at Tomboy.Tomboy.Main (string[]) <0x000fb>
  at (wrapper runtime-invoke) Tomboy.Tomboy.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	mono [0x817d3de]
	[0xb7f05440]
	/lib/tls/i686/cmov/libc.so.6(abort+0x188) [0xb7c9c248]
	mono [0x8143685]
	[0xb7f05440]
	mono [0x811947e]
	[0xb5c4fe4e]

	......

Don't have any real clue of what's causing it really, though I am running the beta version of Ubuntu 8.10 (Intrepid).
Comment 1 Sandy Armstrong 2008-10-13 19:20:49 UTC
Yuck.  Not sure what the problem is, but could you back up ~/.tomboy/addin-db-001 and ~/.tomboy/addins, then delete them, and then try starting Tomboy again?

If this fixes your problem, I'd be interested for you to zip up those directories and post them here (or email them to me).
Comment 2 M. Kaatari 2008-10-13 19:45:28 UTC
Created attachment 120527 [details]
The "addins", and "addin-db-001" that caused the crash

Seems removing mentioned directories fixed the problem. Though, I still find it curious what caused the borked data.
Comment 3 Sandy Armstrong 2008-10-13 23:38:56 UTC
(In reply to comment #2)
> Seems removing mentioned directories fixed the problem. Though, I still find it
> curious what caused the borked data.

Probably a weird Mono.Addins bug, but hopefully with your attachments I can reproduce and figure it out.
Comment 4 Greg Grossmeier 2008-12-16 21:19:24 UTC
Same thing reported in Launchpad: https://launchpad.net/bugs/287241

Reporter can not start Tomboy at all (after upgrading to Intrepid).

Pertinent backtrace:
at (wrapper managed-to-native) System.IO.MonoIO.Read (intptr,byte[],int,int,System.IO.MonoIOError&) <0x00004>
  at (wrapper managed-to-native) System.IO.MonoIO.Read (intptr,byte[],int,int,System.IO.MonoIOError&) <0xffffffff>
  at System.IO.FileStream.ReadData (intptr,byte[],int,int) <0x00028>
  at System.IO.FileStream.RefillBuffer () <0x00022>
  at System.IO.FileStream.ReadByte () <0x0007a>
  at Mono.Addins.Serialization.BinaryXmlReader.ReadNext () <0x0001f>
  at Mono.Addins.Serialization.BinaryXmlReader.Skip () <0x00049>
  at Mono.Addins.Serialization.BinaryXmlReader.Skip () <0x00055>
  at Mono.Addins.Serialization.BinaryXmlReader.Skip () <0x00055>
  at Mono.Addins.Serialization.BinaryXmlReader.Skip () <0x00055>
  at Mono.Addins.Serialization.BinaryXmlReader.Skip () <0x00055>


After removing only ~/.tomboy/addin-db-001 it now starts correctly.
Comment 5 Benjamin Podszun 2009-05-22 20:22:06 UTC
This is rather old (6 month) and we're going for a newer mono (maybe related) and Mono.Addins (more likely related) release.

Can anyone reproduce this bug with mono >= 1.9.x and Mono.Addins >= 0.4?
Comment 6 Klap-in 2009-06-12 11:05:58 UTC
Here tomboy crashes with same kind of errors.
(I have had some system stills and thus hard resets, so that may corrupted something..?)

When I look on synaptic, I guess that i am using: mono 2.0.1-4 and mono-addins 0.4-3

After backup and removing ~/.tomboy/addin-db-001 tomboy starts again.
Comment 7 Michael Fletcher 2009-06-16 16:03:21 UTC
I have replicated the problem.  The BinaryXmlSerializer component of Mono.Addins goes into a recursive loop if its files in addin-dir-data are truncated.  

If you read the code you can follow how the BinaryXmlSerializer will loop if you read an empty file.

You can replicate the error easily by truncating (to zero bytes) the files in addin-dir-data.

All of this fits really well with the users reported problem.  In my (limited) experience filesystems often truncate files when their is a problem with them.  There have also been a bunch of reports of similar problems with some versions of ext3 and a crash.

Its a mono bug.  Will create a bug shortly on this ...
Comment 8 Sandy Armstrong 2009-06-16 16:23:11 UTC
In Tomboy, we should implement a try/catch so that we can detect this problem and respond by taking a corrective action, like deleting addin-dir-data.
Comment 9 Sandy Armstrong 2009-06-16 16:24:09 UTC
Confirming, updating summary.
Comment 10 Michael Fletcher 2009-06-16 16:25:58 UTC
Opened this mono bug:

https://bugzilla.novell.com/show_bug.cgi?id=513612
Comment 11 Sandy Armstrong 2009-09-10 13:48:04 UTC
Three things:

 * I just closed bug #540496, of which this bug is really a dupe (whoops)
 * This bug should be "fixed" for most users since Tomboy 0.14.2, because we do not rebuild the add-in database unless you run Tomboy with --debug
 * Obviously, you can't handle a stack overflow exception with a try/catch, so I don't think there's much else we can do on the Tomboy side

Thanks a ton, Michael, for opening the Mono.Addins bug.  Let's focus on a fix in that package.  I'm closing this as a dupe of bug #540496.

*** This bug has been marked as a duplicate of bug 540496 ***