GNOME Bugzilla – Bug 556177
Crash with truncated files in Addin database
Last modified: 2009-10-04 00:48:03 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).
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).
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.
(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.
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.
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?
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.
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 ...
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.
Confirming, updating summary.
Opened this mono bug: https://bugzilla.novell.com/show_bug.cgi?id=513612
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 ***