bug-gnustep
[Top][All Lists]
Advanced

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

[bug #39092] NSLock deadlock even in trivial GSWeb application


From: Graham Lee
Subject: [bug #39092] NSLock deadlock even in trivial GSWeb application
Date: Tue, 28 May 2013 06:19:09 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/536.29.13 (KHTML, like Gecko) Version/6.0.4 Safari/536.29.13

URL:
  <http://savannah.gnu.org/bugs/?39092>

                 Summary: NSLock deadlock even in trivial GSWeb application
                 Project: GNUstep
            Submitted by: leeg
            Submitted on: Tue 28 May 2013 06:19:08 AM GMT
                Category: gsweb
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

I'm using gsweb from svn r36269, though with the patches in #39087 and #39088
applied so that it will build on my platform (apple-apple-apple, Mac OS X
10.8.3).

Even a blank app with empty Application and Session classes will deadlock.
I've found that a reliable way to trigger the deadlock is on session timeout,
so I've set that to five seconds in the attached project. Steps to reproduce:

1> build and launch app
2> navigate to direct connect URL in browser
3> wait for session timeout

The backtrace in this particular situation is reproduced below, though in
other situations the deadlock is triggered elsewhere. In one example, the
thread handling a direct action request deadlocks in -[WOApplication
pageWithName:inContext:].


midgard:EmptyApp leeg$ gdb EmptyApp.gswa/Contents/MacOS/EmptyApp 
GNU gdb 6.3.50-20050815 (Apple version gdb-1824) (Wed Feb  6 22:51:23 UTC
2013)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared
libraries .......... done

(gdb) break _NSLockError
Breakpoint 1 at 0x72b020c478740f
(gdb) run
Starting program:
/Users/leeg/Documents/GNUstep/EmptyApp/EmptyApp.gswa/Contents/MacOS/EmptyApp 
Reading symbols for shared libraries
+++++++++............................................................................................................................................
done
Reading symbols for shared libraries . done
2013-05-28 07:07:53.402 EmptyApp[1090:f0b] host address '::1'
2013-05-28 07:07:53.404 EmptyApp[1090:f0b] cPortn '9001'
2013-05-28 07:07:53.405 EmptyApp[1090:f0b] Thread XX Waiting for connections
on localhost:9001.
2013-05-28 07:07:53.407 EmptyApp[1090:f0b] Application running. To use direct
connect enter
http://localhost:9001/WebObjects/EmptyApp.woa/0/
in your web Browser.
Please make sure that this port is only reachable in a trusted network.
2013-05-28 07:08:10.833 EmptyApp[1090:f0b] *** -[NSLock lock]: deadlock
(<NSLock: 0x101c0d320> '(null)')

Breakpoint 1, 0x00007fff8931f40f in _NSLockError ()
(gdb) bt
#0  0x00007fff8931f40f in _NSLockError ()
#1  0x00007fff89242c86 in -[NSLock lock] ()
#2  0x0000000100027b85 in -[WOApplication _discountTerminatedSession]
(self=0x101c0d170, _cmd=0x100098ae7) at GSWApplication.m:1314
#3  0x000000010004d646 in -[WOSession terminate] (self=0x101832c70,
_cmd=<value temporarily unavailable, due to optimizations>) at
GSWSession.m:523
#4  0x000000010001ee0c in -[WOSessionTimeOutManager handleTimer:]
(self=0x101829640, _cmd=<value temporarily unavailable, due to optimizations>,
aTimer=0xa1a1a1a1) at GSWSessionTimeOutManager.m:186
#5  0x00007fff89263af3 in __NSFireTimer ()
#6  0x00007fff88e41804 in
__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#7  0x00007fff88e4131d in __CFRunLoopDoTimer ()
#8  0x00007fff88e26ad9 in __CFRunLoopRun ()
#9  0x00007fff88e260e2 in CFRunLoopRunSpecific ()
#10 0x00007fff8928af5e in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] ()
#11 0x0000000100028e38 in -[WOApplication run] (self=0x101c0d170, _cmd=<value
temporarily unavailable, due to optimizations>) at GSWApplication.m:1977
#12 0x00000001000251c6 in GSWApplicationMainReal (applicationClassName=<value
temporarily unavailable, due to optimizations>, argc=<value temporarily
unavailable, due to optimizations>, argv=<value temporarily unavailable, due
to optimizations>) at GSWApplication.m:208
#13 0x0000000100000e8a in main (argc=42057728, argv=0x7fff00000001) at
EmptyApp_main.m:11




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 28 May 2013 06:19:08 AM GMT  Name: EmptyApp.tar.bz2  Size: 1kB   By:
leeg

<http://savannah.gnu.org/bugs/download.php?file_id=28194>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?39092>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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