discuss-gnustep
[Top][All Lists]
Advanced

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

Re: some debugging help needed


From: Fred Kiefer
Subject: Re: some debugging help needed
Date: Tue, 09 Feb 2010 22:46:15 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.5) Gecko/20091130 SUSE/3.0.0-1.1.1 Thunderbird/3.0

You session object gets release by an autorelease pool. This information
wont help you track down your problem. From the code sniplets I would
guess that the session should be kept alive by the sessionStore. You
could inspect that code, whether it retains the session correctly. If it
does then another trick will be needed. You can define retain and
release method on session (just let them call the super implementation)
and set breakpoints in both methods. This may result in too much
information, but could lead to the clue on who is releasing this object.

Hope this helps
Fred

Am 09.02.2010 22:20, schrieb Sebastian Reitenbach:
> still trying to fix problems when running OGo linked against
> gnustep-base. Thanks to Richard
> at the Fosdem, I now know how to track down segfaults/exceptions due to
> multiple releases of an object
> using the enableDoubleReleaseCheck and how to interpret the outcome.
> .
> That was already very helpful. However, I still have a problem, where it
> seems an already deallocated
> object is accessed.
> In the OGo menu, I can enter any category, like contacts, calendar, ...
> also the news. However, when
> I leave the news, (whatever I click, also within the news page), I get
> the following exception:
> 
> 
> 
> Feb 09 21:51:32 ogo-webui-5.5 [12774]: [WARN] LSWImapMails could not
> determine context object!
> Feb 09 21:51:32 ogo-webui-5.5 [12774]: [WARN] LSWImapMails missing
> session for component!
> Feb 09 21:51:32 ogo-webui-5.5 [12774]: [WARN] LSWImapMails could not
> determine context object!
> Feb 09 21:51:32 ogo-webui-5.5 [12774]: [WARN] LSWImapMails missing
> session for component!
> ^C[New process 12774]
> ^C
> Program received signal SIGINT, Interrupt.
> 0x0d935bf5 in poll () from /usr/lib/libc.so.51.0
> (gdb) break raise
> [0] cancel
> [1] all
> [2] -[NSException raise] at NSException.m:831
> [3] raise at /usr/src/lib/libc/gen/raise.c:37
>> 2
> Breakpoint 1 at 0x4aea46d: file NSException.m, line 831.
> (gdb) c
> Continuing.
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to process 12774, thread 0x8a85f000]
> 0x02fd40f8 in objc_msg_lookup (receiver=0x88a3d808, op=0x28d804b0) at
> sarray.h:230
> 230     sarray.h: No such file or directory.
>        in sarray.h
> (gdb) bt
> #0  0x02fd40f8 in objc_msg_lookup (receiver=0x88a3d808, op=0x28d804b0)
> at sarray.h:230
> #1  0x08d830e2 in -[WOApplication restoreSessionWithID:inContext:]
> (self=0x842f6308, _cmd=0x28d92830, _sid=0x7c07ec28, _ctx=0x7e3a9008)
>    at WOApplication.m:588
> #2  0x08dc0f51 in -[WORequestHandler handleRequest:] (self=0x8707ea48,
> _cmd=0x28d81548, _request=0x7cb8bb88) at WORequestHandler.m:193
> #3  0x08d87bd1 in -[WOCoreApplication dispatchRequest:usingHandler:]
> (self=0x842f6308, _cmd=0x28d81580, _request=0x7cb8bb88, handler=0x8707ea48)
>    at WOCoreApplication.m:704
> #4  0x08d87eb7 in -[WOCoreApplication dispatchRequest:]
> (self=0x842f6308, _cmd=0x3c0060c8, _request=0x7cb8bb88) at
> WOCoreApplication.m:734
> #5  0x1c00676f in -[OpenGroupware dispatchRequest:] (self=0x842f6308,
> _cmd=0x28db1510, _request=0x7cb8bb88) at OpenGroupware.m:829
> #6  0x08e1b32e in -[WOHttpTransaction _run] (self=0x7c987c08,
> _cmd=0x28db1528) at WOHttpTransaction.m:546
> #7  0x08e1b4b9 in -[WOHttpTransaction run] (self=0x7c987c08,
> _cmd=0x28db0888) at WOHttpTransaction.m:599
> #8  0x08e179e8 in -[WOHttpAdaptor runConnection:] (self=0x836a3dc8,
> _cmd=0x28db08d8, _socket=0x7c39f0c8) at WOHttpAdaptor.m:403
> #9  0x08e17bde in -[WOHttpAdaptor _handleAcceptedConnection:]
> (self=0x836a3dc8, _cmd=0x28db08e0, _connection=0x7c39f0c8) at
> WOHttpAdaptor.m:437
> #10 0x08e182ee in -[WOHttpAdaptor _handleConnection:] (self=0x836a3dc8,
> _cmd=0x28db0968, connection=0x7c39f0c8) at WOHttpAdaptor.m:548
> #11 0x08e185c3 in -[WOHttpAdaptor acceptConnection:] (self=0x836a3dc8,
> _cmd=0x28db0868, _notification=0x7c2895e8) at WOHttpAdaptor.m:604
> #12 0x04b1e0b0 in -[NSNotificationCenter _postAndRelease:]
> (self=0x82eb6ca8, _cmd=0x24b1b0a8, notification=0x7c2895e8) at
> NSNotificationCenter.m:1070
> #13 0x04b1e577 in -[NSNotificationCenter
> postNotificationName:object:userInfo:] (self=0x82eb6ca8,
> _cmd=0x24b1b0b0, name=0x23fbea84,
>    object=0x836a3a48, info=0x0) at NSNotificationCenter.m:1129
> #14 0x04b1e4a4 in -[NSNotificationCenter postNotificationName:object:]
> (self=0x82eb6ca8, _cmd=0x23fc0f88, name=0x23fbea84, object=0x836a3a48)
>    at NSNotificationCenter.m:1109
> #15 0x03fda031 in -[NSObject(FileObjectWatcher)
> receivedEvent:type:extra:forMode:] (self=0x836a3a48, _cmd=0x24b4a2b8,
> _fdData=0xa, _type=ET_RDESC,
>    _extra=0xa, _mode=0x24b251bc) at NSRunLoop+FileObjects.m:57
> #16 0x04bf39d6 in -[GSRunLoopCtxt pollUntil:within:] (self=0x819b4608,
> _cmd=0x24b250b0, milliseconds=29991, contexts=0x843d2fe8)
>    at GSRunLoopCtxt.m:598
> #17 0x04b5db5e in -[NSRunLoop acceptInputForMode:beforeDate:]
> (self=0x843d2f28, _cmd=0x24b250d8, mode=0x24b251bc, limit_date=0x7c2893c8)
>    at NSRunLoop.m:1174
> #18 0x04b5df80 in -[NSRunLoop runMode:beforeDate:] (self=0x843d2f28,
> _cmd=0x28d814b8, mode=0x24b251bc, date=0x7c067248) at NSRunLoop.m:1249
> #19 0x08d875de in -[WOCoreApplication run] (self=0x842f6308,
> _cmd=0x28d8c8f0) at WOCoreApplication.m:576
> #20 0x08dadbf2 in WOApplicationMain (_appClassName=0x3c005654, argc=7,
> argv=0xcfbf8430) at WOApplicationMain.m:42
> ---Type <return> to continue, or q <return> to quit---q
> Quit
> (gdb) frame 1
> #1  0x08d830e2 in -[WOApplication restoreSessionWithID:inContext:]
> (self=0x842f6308, _cmd=0x28d92830, _sid=0x7c07ec28, _ctx=0x7e3a9008)
>    at WOApplication.m:588
> 588           if ([session isNotNull]) {
> Current language:  auto; currently objective-c
> (gdb) list
> 583         if ((store = [self sessionStore]) == nil) {
> 584           [self errorWithFormat:@"missing session store ..."];
> 585         }
> 586         else {
> 587           session = [store restoreSessionWithID:_sid request:[_ctx
> request]];
> 588           if ([session isNotNull]) {
> 589             [_ctx setSession:session];
> 590             [session _awakeWithContext:_ctx];
> 591           }
> 592           else {
> (gdb) print *session
> $1 = {isa = 0xdeadface, wosLanguages = 0x83ffca08, isTerminating = 0
> '\000', wosLock = 0x0, wosSessionId = 0x7c289f08, wosVariables =
> 0x89ceeb88,
>  wosTimeOut = 3600, wosDefaultEditingContext = 0x0, wosFlags =
> {storesIDsInURLs = 1 '\001', storesIDsInCookies = 1 '\001', isAwake = 0
> '\000'},
>  pageCache = {entries = 0x7c291800, index = 0, size = 30},
> permanentPageCache = {entries = 0x7c291200, index = 0, size = 30},
> application = 0x0,
>  context = 0x0}
> (gdb)
> 
> 
> after some more research, I figured out that the isa = 0xdeadface points
> to an already deallocated object. After some more debugging, I figured out,
> the deallocated object is a OGoSession. Therefore I put a breakpoint to
> -[OGoSession dealloc] in order to figure out where it is dellocated.
> Restarting OGo, and then entering the News menu, the program stops at
> that breakpoint:
> 127.0.0.1 - - [09/Feb/2010:21:59:41 GMT] "POST
> /OpenGroupware.woa/x/login?da=&o=1265749110 HTTP/1.1" 200 5735/122
> 64.461 37988 84% -
> 127.0.0.1 - - [09/Feb/2010:21:59:47 GMT] "GET
> /OpenGroupware.woa/x/dock?woinst=8294&wosid=20662066014B71CC7F&cid=0044b71cc7d7fbd1808&page=SkyNews
> HTTP/1.1" 200 5007/0 0.996 38067 86% -
> [Switching to process 8294, thread 0x8aff6c00]
> 
> Breakpoint 1, -[OGoSession dealloc] (self=0x8b602c08, _cmd=0x212b88c0)
> at OGoSession.m:328
> 328       [[NSNotificationCenter defaultCenter]
> Current language:  auto; currently objective-c
> (gdb) bt
> #0  -[OGoSession dealloc] (self=0x8b602c08, _cmd=0x212b88c0) at
> OGoSession.m:328
> #1  0x012c4b0a in -[NSObject release] (self=0x8b602c08, _cmd=0x2129ff70)
> at NSObject.m:2036
> #2  0x0123c62f in -[NSAutoreleasePool emptyPool] (self=0x80a30bc8,
> _cmd=0x2129ffd0) at NSAutoreleasePool.m:427
> #3  0x0123c484 in -[NSAutoreleasePool dealloc] (self=0x80a30bc8,
> _cmd=0x2129ffc8) at NSAutoreleasePool.m:329
> #4  0x0123c43f in -[NSAutoreleasePool release] (self=0x80a30bc8,
> _cmd=0x212bffa8) at NSAutoreleasePool.m:322
> #5  0x012f8c13 in -[NSRunLoop acceptInputForMode:beforeDate:]
> (self=0x7fbd0e88, _cmd=0x212c00d8, mode=0x212c01bc, limit_date=0x7f077aa8)
>    at NSRunLoop.m:1200
> #6  0x012f8f80 in -[NSRunLoop runMode:beforeDate:] (self=0x7fbd0e88,
> _cmd=0x226464b8, mode=0x212c01bc, date=0x7f077aa8) at NSRunLoop.m:1249
> #7  0x0264c5de in -[WOCoreApplication run] (self=0x845e7a08,
> _cmd=0x226518f0) at WOCoreApplication.m:576
> #8  0x02672bf2 in WOApplicationMain (_appClassName=0x3c005654, argc=7,
> argv=0xcfbc2410) at WOApplicationMain.m:42
> #9  0x0268f8cf in WOWatchDogApplicationMain (appName=0x3c005654, argc=7,
> argv=0xcfbc2410) at WOWatchDogApplicationMain.m:1017
> #10 0x1c001db0 in gnustep_base_user_main (argc=7, argv=0xcfbc2410,
> env=0xcfbc2430) at main.m:33
> #11 0x012e78b0 in main (argc=7, argv=0xcfbc2410, env=0xcfbc2430) at
> NSProcessInfo.m:921
> #12 0x1c001c0c in ___start ()
> #13 0x1c001b5f in _start ()
> #14 0x00000000 in ?? ()
> 
> The first part in the backtrace where sth. is released is in
> NSRunLoop.m, frame 5:
> (gdb) frame 5
> #5  0x012f8c13 in -[NSRunLoop acceptInputForMode:beforeDate:]
> (self=0x7fbd0e88, _cmd=0x212c00d8, mode=0x212c01bc, limit_date=0x7f077aa8)
>    at NSRunLoop.m:1200
> 1200      RELEASE(arp);
> (gdb) list
> 1195          [context endPoll];
> 1196          [_contextStack removeObjectIdenticalTo: context];
> 1197          [localException raise];
> 1198        }
> 1199      NS_ENDHANDLER
> 1200      RELEASE(arp);
> 1201    }
> 1202
> 1203    /**
> 1204     * Calls -limitDateForMode: to determine if a timeout occurs
> before the
> 
> But I guess there is probably not the problem ;)
> 
> I wonder how I could track down the release of the session? What could
> cause calling [OGoSession dealloc] when
> entering the News page in ogo, but not when I enter sth. else. Any hint
> where to set a breakpoint or anything would be great.





reply via email to

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