Menu

#187 XDarwin crash closing window (xwrits)

open
nobody
None
5
2002-05-18
2002-05-18
Ben Hines
No

1. Install "xwrits" from fink. (it's in unstable, or you can get from http://www.lcdf.org/xwrits/\)

2. Perform the xwrits stress test:
xwrits t=0 b=:2 f fla=:.5 m=:.31 max=100 -i

3. Wait a bit till you have a bunch of windows. :)

4. Control-c in the the terminal where you started xwrits.

5. Close an xwrits window.

RESULT: XDarwin crashes:

Date/Time: 2002-05-18 00:02:56 -0700
OS Version: 10.1.4 (Build 5Q125)
Host: lsanca1-ar8-022-141.lsanca1.dsl-verizon.net

Command: XDarwin
PID: 6687

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_INVALID_ADDRESS (0x0001) at 0xd78592ae

Thread 0 Crashed:
#0 0x706bab88 in objc_msgSend
#1 0x70162ee8 in CFRelease
#2 0x70c1ca7c in -[NSWindow dealloc]
#3 0x0026e440 in -[XWindow dealloc]
#4 0x70dfb6fc in deallocMethodApplierFunc
#5 0x7017423c in CFArrayApplyFunction
#6 0x70cb8d54 in -[NSApplication _processSynchronizedDeallocation]
#7 0x70bce9e0 in handleMessagePortMessage
#8 0x701a4894 in __CFMessagePortPerform
#9 0x7018f3b0 in __CFRunLoopDoSource1
#10 0x7017c1e0 in __CFRunLoopRun
#11 0x701b7100 in CFRunLoopRunSpecific
#12 0x7017b8e0 in CFRunLoopRunInMode
#13 0x7312d8f4 in RunEventLoopInModeUntilEventArrives
#14 0x73140794 in ReceiveNextEventCommon
#15 0x731715ec in BlockUntilNextEventMatchingListInMode
#16 0x70bd70b8 in _DPSNextEvent
#17 0x70bfe5d8 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#18 0x70c23468 in -[NSApplication run]
#19 0x70c91ed0 in NSApplicationMain
#20 0x00002550 in DarwinHandleGUI
#21 0x000026c8 in main
#22 0x00002310 in _start
#23 0x00002150 in start

Thread 1:
#0 0x7003f4c8 in semaphore_wait_signal_trap
#1 0x7003f2c8 in _pthread_cond_wait
#2 0x70816bc4 in -[NSRecursiveLock lock]
#3 0x70ba0f94 in _NSAppKitLock
#4 0x70c4a52c in _NSAppKitObjectDeallocationCallback
#5 0x70bb7314 in -[NSWindow release]
#6 0x00273b10 in AquaDestroyWindow
#7 0x002749e8 in AquaGlueDestroyFrame
#8 0x002786ec in RootlessUnrealizeWindow
#9 0x000163b8 in UnrealizeTree
#10 0x00016604 in UnmapWindow
#11 0x00012f80 in DeleteWindow
#12 0x00023f9c in FreeClientResources
#13 0x00022290 in CloseDownClient
#14 0x0001b7a8 in Dispatch
#15 0x00002cec in main
#16 0x00270744 in -[Xserver run]
#17 0x70842358 in forkThreadForFunction
#18 0x7002054c in _pthread_body

**********

Date/Time: 2002-05-18 00:05:54 -0700
OS Version: 10.1.4 (Build 5Q125)
Host: lsanca1-ar8-022-141.lsanca1.dsl-verizon.net

Command: XDarwin
PID: 29372

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_INVALID_ADDRESS (0x0001) at 0x046c4000

Thread 0:
#0 0x70000978 in mach_msg_overwrite_trap
#1 0x70005ac4 in mach_msg
#2 0x7017bf98 in __CFRunLoopRun
#3 0x701b7100 in CFRunLoopRunSpecific
#4 0x7017b8e0 in CFRunLoopRunInMode
#5 0x7312d8f4 in RunEventLoopInModeUntilEventArrives
#6 0x73140808 in ReceiveNextEventCommon
#7 0x731715ec in BlockUntilNextEventMatchingListInMode
#8 0x70bd70b8 in _DPSNextEvent
#9 0x70bfe5d8 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#10 0x70c23468 in -[NSApplication run]
#11 0x70c91ed0 in NSApplicationMain
#12 0x00002550 in DarwinHandleGUI
#13 0x000026c8 in main
#14 0x00002310 in _start
#15 0x00002150 in start

Thread 1 Crashed:
#0 0x0026d80c in -[XView eraseFromShapeBits:count:]
#1 0x0026d6c4 in -[XView reshapeRects:count:]
#2 0x0026e4e8 in -[XWindow reshapeRects:count:]
#3 0x0027482c in AquaReshapeWindow
#4 0x00274d38 in AquaGlueReshapeFrame
#5 0x00277a54 in RootlessReallySetShape
#6 0x00277cac in RootlessRedisplay
#7 0x00277e38 in RootlessRedisplayScreen
#8 0x002772bc in RootlessBlockHandler
#9 0x00024d84 in BlockHandler
#10 0x0003b69c in WaitForSomething
#11 0x0001b644 in Dispatch
#12 0x00002cec in main
#13 0x00270744 in -[Xserver run]
#14 0x70842358 in forkThreadForFunction
#15 0x7002054c in _pthread_body

Discussion

  • Ben Hines

    Ben Hines - 2002-05-18

    Logged In: YES
    user_id=125034

    version: xdarwin 1.1/Xfree 4.2. Dual G4 800, OSX 10.1.4.

     
  • Ben Hines

    Ben Hines - 2002-05-18

    Logged In: YES
    user_id=125034

    This is very easy to reproduce with the "oroborosx" verison of xdarwin. With the regular xdarwin, the windows vanish faster so there isn't time to click them after having closed the app. I did manage to do this, though:

    2002-05-18 00:24:24.610 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.630 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.650 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.670 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.690 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.710 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.730 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.750 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.770 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.790 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.810 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.830 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.850 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.870 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.890 XDarwin[29576] Bad write to event pipe.
    2002-05-18 00:24:24.910 XDarwin[29576] Bad write to event pipe.
    <many many of these>

     
  • Ben Hines

    Ben Hines - 2002-05-18

    Logged In: YES
    user_id=125034

    And now after the bad event pipe, I attempted to "quit" XDarwin. It is rainbow cursored. The sample report:

    Analysis of sampling pid 29576 every 5 milliseconds
    Call graph:
    1000 Thread_0f03
    952 start
    952 _start
    952 main
    952 DarwinHandleGUI
    952 NSApplicationMain
    952 -[NSApplication run]
    952 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
    952 _DPSNextEvent
    952 BlockUntilNextEventMatchingListInMode
    952 ReceiveNextEventCommon
    952 RunEventLoopInModeUntilEventArrives
    952 CFRunLoopRunInMode
    952 CFRunLoopRunSpecific
    952 __CFRunLoopRun
    952 __CFRunLoopDoTimer
    952 __NSFireTimer
    952 -[NSInvocation invoke]
    952 objc_msgSendv
    952 -[NSApplication _terminateSendShould:]
    952 -[NSApplication terminate:]
    952 -[NSNotificationCenter postNotificationName:object:]
    952 -[NSNotificationCenter postNotificationName:object:userInfo:flags:]
    952 _CFNotificationCenterPostNotification
    952 _CFNotificationCenterPostLocalNotification
    952 _postNotification
    952 _nsNotificationCenterCallBack
    952 -[Xserver applicationWillTerminate:]
    952 -[NSRecursiveLock lock]
    952 _pthread_cond_wait
    952 semaphore_wait_signal_trap
    952 semaphore_wait_signal_trap [STACK TOP]
    47 _sigtramp
    47 _sigtramp [STACK TOP]
    1 _pthread_cond_wait
    1 _sigtramp
    1 _sigtramp [STACK TOP]
    1000 Thread_1003
    1000 _pthread_body
    1000 forkThreadForFunction
    1000 -[Xserver run]
    1000 main
    1000 Dispatch
    1000 ProcDestroyWindow
    1000 FreeResource
    1000 DeleteWindow
    1000 UnmapWindow
    1000 DeliverEvents
    896 DeliverEventsToWindow
    632 TryClientEvents
    632 TryClientEvents [STACK TOP]
    264 DeliverEventsToWindow [STACK TOP]
    104 TryClientEvents
    104 TryClientEvents [STACK TOP]
    1000 Thread_1103
    1000 _pthread_body
    1000 forkThreadForFunction
    1000 -[NSUIHeartBeat _heartBeatThread:]
    1000 -[NSConditionLock lockWhenCondition:]
    1000 _pthread_cond_wait
    1000 semaphore_wait_signal_trap
    1000 semaphore_wait_signal_trap [STACK TOP]

    Total number in stack (recursive counted multiple, when >=5):

    Sort by top of stack, same collapsed (when >= 5):
    semaphore_wait_signal_trap [STACK TOP] 1952
    TryClientEvents [STACK TOP] 736
    DeliverEventsToWindow [STACK TOP] 264
    _sigtramp [STACK TOP] 48

     
  • Greg Parker

    Greg Parker - 2002-05-21

    Logged In: YES
    user_id=37183

    These three crashes are all quite different. It looks like this program is a good stress test for XDarwin, and I'll start using it for general testing :-)

    The first crash looks like thread-unsafety in AppKit. AppKit's thread safety is improved in Jaguar, so hopefully this will go away. The second crash looks like a bug in XDarwin's drawing or shaping code. The third hang (with "Bad write to event pipe") is probably the X server getting stuck in an infinite loop and might be a general XFree86 bug.

     

Log in to post a comment.