[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strange issue with Mutable Dictionary
From: |
Sebastian Reitenbach |
Subject: |
Re: strange issue with Mutable Dictionary |
Date: |
Mon, 19 Mar 2018 22:38:47 +0100 |
User-agent: |
SOGoMail 4.0.0 |
Hi,
so just updated pantomime and gnumail to latest svn. Otherwise have packages
installed,
latest releases of all gnustep. I'm on OpenBSD amd64, 6.3, everything built
with clang.
Now entering my inbox I get:
read_unsinged_int: EOF
read_unsinged_int: EOF
read_unsinged_int: EOF
Program received signal SIGBUS, Bus error.
0x00000467ec5a20f4 in objc_msgSend_fpret () from /usr/local/lib/libobjc2.so.1.1
(gdb) bt
#0 0x00000467ec5a20f4 in objc_msgSend_fpret () from
/usr/local/lib/libobjc2.so.1.1
#1 0x00000468886624de in -[CWFolder allMessages] (self=0x4686ec9f008,
_cmd=0x468889774b8 <.objc_selector_list+192>) at CWFolder.m:201
#2 0x000004688866297c in -[CWFolder count] (self=0x4686ec9f008,
_cmd=0x46888979d70 <.objc_selector_list+592>) at CWFolder.m:284
#3 0x0000046888667089 in -[CWIMAPFolder prefetch] (self=0x4686ec9f008,
_cmd=0x4684b12d040 <.objc_selector_list+2736>) at CWIMAPFolder.m:183
#4 0x000004684ab14bd6 in -[TaskManager folderOpenCompleted:]
(self=0x4685c65b448, _cmd=0x4688897d068 <.objc_selector_list+1792>,
theNotification=0x468c63921c8) at TaskManager.m:1747
#5 0x000004682d6fc81b in -[NSObject performSelector:withObject:]
(self=0x4685c65b448, _cmd=0x4688897cd28 <.objc_selector_list+960>,
aSelector=0x4688897d068 <.objc_selector_list+1792>, anObject=0x468c63921c8) at
NSObject.m:2000
#6 0x0000046888678318 in -[CWIMAPStore(Private) _parseSELECT]
(self=0x46821d91c08, _cmd=0x4688897d018 <.objc_selector_list+1712>) at
CWIMAPStore.m:2897
#7 0x0000046888675f1a in -[CWIMAPStore(Private) _parseOK] (self=0x46821d91c08,
_cmd=0x4688897caa8 <.objc_selector_list+320>) at CWIMAPStore.m:2575
#8 0x000004688866ad97 in -[CWIMAPStore updateRead] (self=0x46821d91c08,
_cmd=0x4688899ed28 <.objc_selector_list+368>) at CWIMAPStore.m:660
#9 0x00000468886abf99 in -[CWService receivedEvent:type:extra:forMode:]
(self=0x46821d91c08, _cmd=0x4682df935a8 <.objc_selector_list+32>, theData=0xa,
theType=ET_RDESC, theExtra=0xa, theMode=0x4682df23f28 <.objc_str>) at
CWService.m:654
#10 0x000004682d862e35 in -[GSRunLoopCtxt pollUntil:within:]
(self=0x468b84f9708, _cmd=0x4682df252e8 <.objc_selector_list+1232>,
milliseconds=405, contexts=0x4687fa69108) at GSRunLoopCtxt.m:600
#11 0x000004682d747867 in -[NSRunLoop acceptInputForMode:beforeDate:]
(self=0x46829cd0e88, _cmd=0x4682df24fe8 <.objc_selector_list+464>,
mode=0x4682df23f28 <.objc_str>, limit_date=0x4689e5dd148) at NSRunLoop.m:1224
#12 0x000004682d747e34 in -[NSRunLoop runMode:beforeDate:] (self=0x46829cd0e88,
_cmd=0x467d307f060 <.objc_selector_list+224>, mode=0x4682df23f28 <.objc_str>,
date=0x468a8be6b68) at NSRunLoop.m:1304
#13 0x00000467d25763e7 in -[GSDisplayServer(EventOps)
getEventMatchingMask:beforeDate:inMode:dequeue:] (self=0x46857cc6808,
_cmd=0x467d713afd8 <.objc_selector_list+496>, mask=4294967295,
limit=0x468a8be6b68, mode=0x4682df23f28 <.objc_str>, flag=1 '\001') at
GSDisplayServer.m:1040
#14 0x00000467d6e3f4e4 in -[XGServer(X11Ops)
getEventMatchingMask:beforeDate:inMode:dequeue:] (self=0x46857cc6808,
_cmd=0x467d2f18f08 <.objc_selector_list+3248>, mask=4294967295,
limit=0x468a8be6b68, mode=0x4682df23f28 <.objc_str>, flag=1 '\001') at
XGServerEvent.m:2575
#15 0x00000467d22fb15c in DPSGetEvent (ctxt=0x46857cc6808, mask=4294967295,
limit=0x468a8be6b68, mode=0x4682df23f28 <.objc_str>) at
../Headers/Additions/GNUstepGUI/GSDisplayServer.h:200
#16 0x00000467d22fbf7c in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] (self=0x467f680b108,
_cmd=0x467d2f19528 <.objc_selector_list+4816>, mask=4294967295,
expiration=0x468a8be6b68, mode=0x4682df23f28 <.objc_str>, flag=1 '\001') at
NSApplication.m:2178
#17 0x00000467d22fa01c in -[NSApplication run] (self=0x467f680b108,
_cmd=0x467d2f04a30 <.objc_selector_list+144>) at NSApplication.m:1553
#18 0x00000467d22cd888 in NSApplicationMain (argc=1, argv=0x7f7ffffe08c8) at
Functions.m:91
#19 0x00000465cda0065a in gnustep_base_user_main (argc=1, argv=0x7f7ffffe08c8,
env=0x7f7ffffe08d8) at GNUMail_main.m:41
#20 0x000004682d72bd3a in main (argc=1, argv=0x7f7ffffe08c8,
env=0x7f7ffffe08d8) at NSProcessInfo.m:1002
#21 0x00000465cda00456 in _start ()
(gdb) frame 1
#1 0x00000468886624de in -[CWFolder allMessages] (self=0x4686ec9f008,
_cmd=0x468889774b8 <.objc_selector_list+192>) at CWFolder.m:201
201 if ([[aMessage flags] contain: PantomimeDeleted])
(gdb) list
196 {
197 [_allVisibleMessages addObject: aMessage];
198 }
199 else
200 {
201 if ([[aMessage flags] contain: PantomimeDeleted])
202 {
203 // Do nothing
204 continue;
205 }
(gdb) print aMessage
$1 = (struct CWMessage *) 0x467f6f8ad88
(gdb) po aMessage
Program received signal SIGBUS, Bus error.
0x00000467ec5a20f4 in objc_msgSend_fpret () from /usr/local/lib/libobjc2.so.1.1
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(_NSPrintForDebugger) will be abandoned.
When the function is done executing, GDB will silently stop.
(gdb)
then on a second try I got this double free again, that I usually see:
read_unsinged_int: EOF
read_unsinged_int: EOF
read_unsinged_int: EOF
GNUMail(32653) in free(): chunk is already free 0x8cd71005e00
Program received signal SIGABRT, Aborted.
thrkill () at -:3
3 -: No such file or directory.
(gdb) bt
#0 thrkill () at -:3
#1 0x000008cd3bed0d2e in _libc_abort () at /usr/src/lib/libc/stdlib/abort.c:51
#2 0x000008cd3be8f4b9 in wrterror (d=0x8cd72753b90, msg=0x8cd3c025b89 "chunk
is already free %p") at /usr/src/lib/libc/stdlib/malloc.c:288
#3 0x000008cd3be92305 in find_chunknum (d=0x0, info=<optimized out>, ptr=0x0,
check=-85688) at /usr/src/lib/libc/stdlib/malloc.c:1040
#4 0x000008cd3be8fa4c in ofree (argpool=<optimized out>, p=<optimized out>,
clear=0, check=0, argsz=0) at /usr/src/lib/libc/stdlib/malloc.c:1356
#5 0x000008cd3be8f599 in free (ptr=0x8cd71005e00) at
/usr/src/lib/libc/stdlib/malloc.c:1416
#6 0x000008ccb4b92f09 in default_free (zone=0x8ccb530cb28 <default_zone>,
ptr=0x8cd71005e00) at NSZone.m:150
#7 0x000008ccb4b92d16 in NSZoneFree (zone=0x8ccb530cb28 <default_zone>,
ptr=0x8cd71005e00) at NSZone.m:1792
#8 0x000008ccb49fe691 in -[NSDataMalloc dealloc] (self=0x8cd0600d208,
_cmd=0x8cd1ed321a8 <.objc_selector_list>) at NSData.m:3326
#9 0x000008cd1eb1701a in release (obj=0x8cd0600d208) at
/home/ports/pobj/amd64/gnustep-libobjc2-1.8.1/libobjc2-1.8.1/arc.m:212
#10 0x000008cd1eb16e50 in emptyPool (tls=0x8cc95c196e0, stop=0x8cd35a16f30) at
/home/ports/pobj/amd64/gnustep-libobjc2-1.8.1/libobjc2-1.8.1/arc.m:115
#11 0x000008cd1eb16cd1 in objc_autoreleasePoolPop (pool=0x8cd35a16f30) at
/home/ports/pobj/amd64/gnustep-libobjc2-1.8.1/libobjc2-1.8.1/arc.m:358
#12 0x000008ccb49afde3 in -[NSAutoreleasePool emptyPool] (self=0x8cce9c10ec8,
_cmd=0x8ccb52742d0 <.objc_selector_list+48>) at NSAutoreleasePool.m:245
#13 0x000008ccb49aff8c in -[NSAutoreleasePool dealloc] (self=0x8cce9c10ec8,
_cmd=0x8ccb52742f0 <.objc_selector_list+80>) at NSAutoreleasePool.m:571
#14 0x000008ccb49afeea in -[NSAutoreleasePool release] (self=0x8cce9c10ec8,
_cmd=0x8cce5eb2aa8 <.objc_selector_list+144>) at NSAutoreleasePool.m:558
#15 0x000008cce5b9f7f3 in -[CWIMAPCacheManager readMessagesInRange:]
(self=0x8cce6942288, _cmd=0x8cce5eb2b28 <.objc_selector_list+272>,
theRange=...) at CWIMAPCacheManager.m:220
#16 0x000008cce5b9f1b3 in -[CWIMAPCacheManager readAllMessages]
(self=0x8cce6942288, _cmd=0x8cd0df2dc50 <.objc_selector_list+656>) at
CWIMAPCacheManager.m:134
#17 0x000008cd0d945aa1 in -[MailboxManagerController(Private)
_openIMAPFolderWithName:store:sender:] (self=0x8cce3f5d408, _cmd=0x8cd0df2de60
<.objc_selector_list+1184>, theFolderName=0x933a14fb0000002c,
theStore=0x8cd29263b08, theSender=0x8cd38a32808) at
MailboxManagerController.m:3116
#18 0x000008cd0d93b117 in -[MailboxManagerController open:]
(self=0x8cce3f5d408, _cmd=0x8cd0df2e4d0 <.objc_selector_list+2832>,
sender=0x8cd38a32808) at MailboxManagerController.m:1158
#19 0x000008cd0d936ec8 in -[MailboxManagerController
outlineViewSelectionDidChange:] (self=0x8cce3f5d408, _cmd=0x8cd3090ee50
<.objc_selector_list+2944>, theNotification=0x8cd4099bfc8) at
MailboxManagerController.m:565
#20 0x000008ccb4aaa81b in -[NSObject performSelector:withObject:]
(self=0x8cce3f5d408, _cmd=0x8ccb52b3a40 <.objc_selector_list+448>,
aSelector=0x8cd3090ee50 <.objc_selector_list+2944>, anObject=0x8cd4099bfc8) at
NSObject.m:2000
#21 0x000008ccb4a95335 in -[NSNotificationCenter _postAndRelease:]
(self=0x8ccadc39d88, _cmd=0x8ccb52b38f0 <.objc_selector_list+112>,
notification=0x8cd4099bfc8) at NSNotificationCenter.m:1198
#22 0x000008ccb4a95af4 in -[NSNotificationCenter
postNotificationName:object:userInfo:] (self=0x8ccadc39d88, _cmd=0x8ccb52b39e0
<.objc_selector_list+352>, name=0x8cd309d21e0 <.objc_str.343>,
object=0x8cd38a32808, info=0x0) at NSNotificationCenter.m:1258
#23 0x000008ccb4a959c7 in -[NSNotificationCenter postNotificationName:object:]
(self=0x8ccadc39d88, _cmd=0x8cd3090e430 <.objc_selector_list+352>,
name=0x8cd309d21e0 <.objc_str.343>, object=0x8cd38a32808) at
NSNotificationCenter.m:1238
#24 0x000008cd2fd7e43d in -[NSOutlineView(NotificationRequestMethods)
_postSelectionDidChangeNotification] (self=0x8cd38a32808, _cmd=0x8cd30977500
<.objc_selector_list+3872>) at NSOutlineView.m:1742
#25 0x000008cd2fe0a282 in -[NSTableView mouseDown:] (self=0x8cd38a32808,
_cmd=0x8cd3090ed60 <.objc_selector_list+2704>, theEvent=0x8cd728c0908) at
NSTableView.m:3943
#26 0x000008cd2fd7a463 in -[NSOutlineView mouseDown:] (self=0x8cd38a32808,
_cmd=0x8cd309b3180 <.objc_selector_list+2576>, theEvent=0x8cd728c0908) at
NSOutlineView.m:871
#27 0x000008cd2fe99596 in -[NSWindow sendEvent:] (self=0x8cd86c07c08,
_cmd=0x8cd308593c8 <.objc_selector_list+368>, theEvent=0x8cd728c0908) at
NSWindow.m:3929
#28 0x000008cd2fc3cd4d in -[NSApplication sendEvent:] (self=0x8cd3d183608,
_cmd=0x8cd308593c8 <.objc_selector_list+368>, theEvent=0x8cd728c0908) at
NSApplication.m:2124
#29 0x000008cd2fc3b06d in -[NSApplication run] (self=0x8cd3d183608,
_cmd=0x8cd30845a30 <.objc_selector_list+144>) at NSApplication.m:1562
#30 0x000008cd2fc0e888 in NSApplicationMain (argc=1, argv=0x7f7ffffed338) at
Functions.m:91
#31 0x000008ca8c80065a in gnustep_base_user_main (argc=1, argv=0x7f7ffffed338,
env=0x7f7ffffed348) at GNUMail_main.m:41
#32 0x000008ccb4ad9d3a in main (argc=1, argv=0x7f7ffffed338,
env=0x7f7ffffed348) at NSProcessInfo.m:1002
#33 0x000008ca8c800456 in _start ()
sebastian
Am Samstag, März 17, 2018 23:45 CET, Riccardo Mottola <address@hidden> schrieb:
> Hi Yavor,
>
> On 2018-03-16 21:49:13 +0100 Yavor Doganov <address@hidden> wrote:
>
> > В Fri, 16 Mar 2018 14:57:53 +0100, Riccardo Mottola написа:
> >
> >> The crashes happen either when the pool is released in line 224 and
> >> NSData or in the setter of one of the properties, as the first stack
> >> or with a crash at line 181, which is still inside this method.
> >
> > You haven't posted a backtrace. I assume you cannot reproduce?
>
> no unfortunately not, I do not get this error on any of my machines. I have a
> couple of other GNUMail issues, but not this one.
> I hope Sebastian can post some of the traces here in the ML
>
> >> I Don't see at a glance a gross error in CWImapCacheManager -
> >
> > Hmm, this is perhaps the buggiest part of the library, or at least the
> > most fragile. I remember ~15 years ago Ludo was advising users to
> > just delete the cache if something goes wrong.
>
> Yes, it is delicate and very low-level code
>
> > A shot in the dark, but maybe there are some type mismatches or broken
> > pointer arithmetic (or both) here or in the io.c function definitions.
> > I would suggest uncommenting these NSLog statements (or converting
> > them permanently to the appropriate NSDebug*Log) to see what's going
> > on. Don't forget to adjust the specifiers for the expected types.
>
> In the past two days I worked with Fred on code cleanup. I found some dubious
> casts and endianness swaps, but the new code is generally equivalent to the
> old code, just better readable. My hope is that it at least helps finding the
> bug better, it does no harm at my place and is even faster :)
>
> > If the crashes occur on a 64-bit machine, it would probably help to
> > verify if they are reproducible on 32-bit.
>
> I forgot to ask that Sebastian. However since I cannot reproduce the issue
> myself, it is inconvenient. I do access my own mail account both from 32bit
> and 64bit systems and it works.
> However, it may be a specific mail message that causes issue (I have been
> working the past two months on a lot of internal parsing improvements, there
> is a lot of tricky code when parsing message headers like Sender and
> Subject). I literally went into my rich "trash" folder and "sent" folder and
> checked many messages to find strange parsing differences. Now GNUMail
> (thanks to pantomime) more reliably displays information from most standard
> mailers including nicknames, quotes, foreign characters as well as Cyrillic
> and Chinese names (this time Spam messages proved useful!!!)
> Furthermore each mail server has its own specialities. All these fixes I
> attempted are the reason why I asked Sebastian for a test!
>
> Riccardo
>
>
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/gnustep-dev