discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSRecursiveLock hangs


From: Marc Brünink
Subject: NSRecursiveLock hangs
Date: Wed, 24 Jan 2007 21:21:08 +0100

Hi all,

some time ago I mentioned that I have problems with NSRecursiveLock in one of my applications. Finally I found the time to drive to our customer and get a stack trace (they do not have an internet connection for security reasons *sigh*)

However here's the stack:

#0  0xfe1c0090 in __lwp_park () from /lib/libc.so.1
#1  0xfe1b85ec in mutex_lock_queue () from /lib/libc.so.1
#2 0xfea8c8bc in __objc_mutex_lock (mutex=0x781c8) at ../gcc/gthr-posix.h:95
#3  0xfea8c060 in objc_mutex_lock (mutex=0x781c8)
    at /usr/share/src/gcc-3.4.4/libobjc/thr.c:326
#4 0xfe99fa18 in -[NSRecursiveLock lock] (self=0x17cf60, _cmd=0xfebeb550)
    at NSLock.m:655
#5  0xfea315f0 in GSUserDefaultsDictionaryRepresentation ()
    at NSUserDefaults.m:1967
#6 0xfe96cb5c in -[NSDictionary writeToFile:atomically:] (self=0x1979e58,
    _cmd=0xfebeb878, path=0x17d2e0, useAuxiliaryFile=1 '\001')
    at NSDictionary.m:932
#7 0xfea2fcdc in -[NSUserDefaults writeDefaults:oldData:] (self=0x181800,
    _cmd=0xfebeb8d0, defaults=0x1979e58, oldData=0x19455c8)
    at NSUserDefaults.m:1568
#8  0xfea301e8 in -[NSUserDefaults synchronize] (self=0x181800,
    _cmd=0xfef326e4) at NSUserDefaults.m:1648
#9 0xfeec869c in -[FBTableView powerdown] (self=0xdadb38, _cmd=0xfe683d88)
    at FBTableView.m:67
#10 0xfe9b79d4 in -[NSObject performSelector:] (self=0xdadb38,
    _cmd=0xfe683d80, aSelector=0xfe683d88) at NSObject.m:1762
#11 0xfe62a530 in -[GSMarkupTagObject shutdown] (self=0x920790,
    _cmd=0xfe683970) at GSMarkupTagObject.m:286
---Type <return> to continue, or q <return> to quit---
#12 0xfe627ca4 in -[GSMarkupTagControl shutdown] (self=0x920790,
    _cmd=0xfe690308) at GSMarkupTagControl.m:23
#13 0xfe9b79d4 in -[NSObject performSelector:] (self=0x920790,
    _cmd=0xfe690310, aSelector=0xfe690308) at NSObject.m:1762
#14 0xfe63f2d8 in -[GSMarkupCarrier shutdown] (self=0xa3cb30, _cmd=0xfe690318)
    at GSMarkupCarrier.m:23
#15 0xfe63f328 in -[GSMarkupCarrier dealloc] (self=0xa3cb30, _cmd=0xfebdb7e4)
    at GSMarkupCarrier.m:31
#16 0xfe9b7dec in -[NSObject release] (self=0xa3cb30, _cmd=0xfe5bd160)
    at NSObject.m:1843
#17 0xfe4e0428 in -[FBMarkupController dealloc] (self=0xaa08c0,
    _cmd=0xfebdb7e4) at FBMarkupController.m:14
#18 0xfe9b7dec in -[NSObject release] (self=0xaa08c0, _cmd=0xfebe10a0)
    at NSObject.m:1843
#19 0xfe9e483c in -[GSTimedPerformer dealloc] (self=0xb36570, _cmd=0xfebdb7e4)
    at NSRunLoop.m:165
#20 0xfe9b7dec in -[NSObject release] (self=0xb36570, _cmd=0xfebe5da8)
    at NSObject.m:1843
#21 0xfea11cc0 in -[NSTimer invalidate] (self=0x874838, _cmd=0xfebe5d58)
    at NSTimer.m:269
#22 0xfea11b44 in -[NSTimer fire] (self=0x874838, _cmd=0xfebe11e0)
    at NSTimer.m:233
#23 0xfe9e66b8 in -[NSRunLoop limitDateForMode:] (self=0x2b33b0,
---Type <return> to continue, or q <return> to quit---
    _cmd=0xfebe1248, mode=0x874838) at NSRunLoop.m:826
#24 0xfe9e7398 in -[NSRunLoop runMode:beforeDate:] (self=0x2b33b0,
    _cmd=0xff2fb4b4, mode=0xfebe12f0, date=0x2b4300) at NSRunLoop.m:1018
#25 0xff1b3ad8 in -[GSDisplayServer(EventOps) getEventMatchingMask:beforeDate:inMode:dequeue:] (self=0x29fba8, _cmd=0x5600, mask=4294967295, limit=0x2b4300,
    mode=0xfebe12f0, flag=1 '\001') at GSDisplayServer.m:877
#26 0xfdb36ffc in -[XGServer(X11Ops) getEventMatchingMask:beforeDate:inMode:dequeue:] (self=0x29fba8, _cmd=0xff2c207c, mask=4294967295, limit=0x2b4300,
    mode=0xfebe12f0, flag=1 '\001') at XGServerEvent.m:1989
#27 0xff069de8 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (self=0x1bde60, _cmd=0xff2c22cc, mask=4294967295, expiration=0x2b4300,
    mode=0xfebe12f0, flag=1 '\001') at GSDisplayServer.h:179
#28 0xff0687b4 in -[NSApplication run] (self=0x1bde60, _cmd=0xff2bfa34)
    at NSApplication.m:1362
#29 0xff05946c in NSApplicationMain (argc=-13895988, argv=0xffbff824)
    at Functions.m:72
#30 0x00028964 in main (argc=1, argv=0xffbff824, env=0xffbff82c)
    at SmartClient_main.m:46

It's pretty interesting, because it hangs in GSUserDefaultsDictionaryRepresentation() at [classLock lock]. So somehow I do produce a deadlock in my application. The really annoying thing is that GSUserDefaultsDictionaryRepresentation() is called from [NSCalendarDate descriptionWithLocale:.....]. So It's called from all threads all the time. I'm stucked and I do not have any idea how to track this down. Any genius ideas? The worst thing is it is not reproducable (as with all *evil* race conditions... :-)


Thanks
Marc





reply via email to

[Prev in Thread] Current Thread [Next in Thread]