[Xquartz-dev] [XQuartz] #241: xquarz uses 100% of CPU when not focused

Christof Wolf ch.wolf at hfph.mwn.de
Sat Apr 11 10:11:30 PDT 2009


On Saturday 11 April 2009, XQuartz wrote:
> #241: xquarz uses 100% of CPU when not focused
> ------------------------------+--------------------------------------------
>- Reporter:  knussear@…        |       Owner:  jeremyhu@…
>      Type:  usability         |      Status:  new
>  Priority:  major             |   Milestone:  2.4.0
> Component:  xserver           |     Version:  2.3.2 (xserver-1.4)
>  Keywords:                    |
> ------------------------------+--------------------------------------------
>-
>
> Comment(by jeremyhu@…):
>
>  Well then you are hitting a different bug.  Please open a new report and
>  provide a sample of the running process in this configuration and your
>  org.x.X11 preferences.  The code that Chris narrowed this down to is
>  commented out, so this is probably something else.  What is showing up in
>  Activity Monitor? (answer in your new bug)

Jeremy,

Happy Easter :-) but bad news, I can confirm the same thing. No problem till 
2.3.3_rc3 but with rc 4 and 5 my Wacom tablet again causes the problem. here 
is the sample of X11.

Sampling process 7869 for 3 seconds with 1 millisecond of run time between 
samples
Sampling completed, processing symbols...
Analysis of sampling X11.bin (pid 7869) every 1 millisecond
Call graph:
    1677 Thread_2503
      1677 start
        1677 main
          1677 mach_msg_server
            1677 mach_startup_server
              1677 _Xstart_x11_server
                1677 do_start_x11_server
                  1677 server_main
                    1677 X11ApplicationMain
                      1677 -[NSApplication run]
                        1676 -[NSApplication 
nextEventMatchingMask:untilDate:inMode:dequeue:]
                          1676 _DPSNextEvent
                            1668 BlockUntilNextEventMatchingListInMode
                              1668 ReceiveNextEventCommon
                                1667 RunCurrentEventLoopInMode
                                  1667 CFRunLoopRunInMode
                                    1667 CFRunLoopRunSpecific
                                      1618 mach_msg
                                        1618 mach_msg_trap
                                          1618 mach_msg_trap
                                      24 0xffffffff
                                        24 _sigtramp
                                          24 _sigtramp
                                      20 __CFMachPortPerform
                                        20 
PullEventsFromWindowServerOnConnection(unsigned int, unsigned char)
                                          19 CGEventCreateNextEvent
                                            19 CGSGetNextEventRecordInternal
                                              19 snarfEvents
                                                12 _CGSGetPortStreamInline
                                                  12 mach_msg
                                                    12 mach_msg_trap
                                                      12 mach_msg_trap
                                                7 
CGSDispatchDatagramsFromStream
                                                  6 CGSDecodeEventRecord
                                                    6 
CGEventCreateFromDataAndSource
                                                      2 malloc
                                                        2 malloc_zone_malloc
                                                          2 szone_malloc
                                                            2 
large_and_huge_malloc
                                                              1 
large_and_huge_malloc
                                                              1 mmap
                                                                1 mmap
                                                      1 
CGEventCreateFromDataAndSource
                                                      1 CGSClearEventOfLength
                                                        1 
CGSClearEventOfLength
                                                      1 CGTypeCreateInstance
                                                        1 
CGTypeCreateInstanceWithAllocator
                                                          1 
_CFRuntimeCreateInstance
                                                            1 
_CFRuntimeCreateInstance
                                                      1 free
                                                        1 munmap$UNIX2003
                                                          1 munmap$UNIX2003
                                                  1 CGSReadPortStream
                                                    1 CGSReadPortStream
                                          1 
ConvertPlatformEventRecordAndPostWithOptions(__CGEvent*, _CGSEventRecord 
const*, short, unsigned char, unsigned char)
                                            1 PostEventToQueueInternal
                                              1 _NotifyEventLoopObservers
                                                1 KeyEventPostedObserver
                                                  1 KeyEventPostedObserver
                                      5 __CFRunLoopDoObservers
                                        5 _handleWindowsNeedUpdateNote
                                          5 -[NSApplication updateWindows]
                                            4 -[NSNotificationCenter 
postNotificationName:object:]
                                              2 -[NSNotificationCenter 
postNotificationName:object:]
                                              1 -[NSConcreteNotification 
recycle]
                                                1 -[NSObject release]
                                                  1 __CFDoExternRefOperation
                                                    1 CFBagContainsValue
                                                      1 __CFBagFindBuckets1a
                                                        1 __CFBagFindBuckets1a
                                              1 objc_msgSend
                                                1 objc_msgSend
                                            1 __spin_lock
                                              1 __spin_lock
                                1 ReceiveNextEventCommon
                            7 SendEventToEventTarget
                              7 
SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, 
HandlerCallRec*)
                                7 DispatchEventToHandlers(EventTargetRec*, 
OpaqueEventRef*, HandlerCallRec*)
                                  7 
ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, 
void*)
                                    7 FindWindowAndPartFromMouseEvent
                                      7 FindWindow
                                        7 FindWindowOfClass
                                          7 FindWindowCommon(Point, 
OpaqueWindowPtr**, short*)
                                            7 FindPlatformWindow
                                              6 CGSFindWindowAndOwner
                                                6 _CGSFindWindow
                                                  5 mach_msg
                                                    5 mach_msg_trap
                                                      5 mach_msg_trap
                                                  1 0xffffffff
                                                    1 _sigtramp
                                                      1 _sigtramp
                                              1 CoreDragGetCurrentDrag
                                                1 CoreDragGetCurrentDrag
                            1 _DPSNextEvent
                        1 NSPopAutoreleasePool
                          1 NSPopAutoreleasePool
    1677 Thread_2603
      1677 thread_start
        1677 _pthread_start
          1677 CAPThread::Entry(CAPThread*)
            1677 HALRunLoop::OwnThread(void*)
              1677 CFRunLoopRunInMode
                1677 CFRunLoopRunSpecific
                  1677 mach_msg
                    1677 mach_msg_trap
                      1677 mach_msg_trap
    1677 Thread_2703
      1677 thread_start
        1677 _pthread_start
          1677 server_thread
            1677 dix_main
              1677 Dispatch
                1511 select$DARWIN_EXTSN
                  1511 select$DARWIN_EXTSN
                159 WaitForSomething
                  71 BlockHandler
                    58 QuartzBlockHandler
                      30 NSPopAutoreleasePool
                        17 NSPopAutoreleasePool
                        5 objc_assign_strongCast
                          5 objc_assign_strongCast
                        4 _CFExecutableLinkedOnOrAfter
                          4 _CFExecutableLinkedOnOrAfter
                        2 NSClassFromObject
                          1 -[NSObject class]
                            1 -[NSObject class]
                          1 NSClassFromObject
                        1 +[NSObject self]
                          1 +[NSObject self]
                        1 object_getClass
                          1 object_getClass
                      10 -[NSAutoreleasePool init]
                        7 -[NSAutoreleasePool initWithCapacity:]
                          3 NSPushAutoreleasePool
                            2 NSPushAutoreleasePool
                            1 objc_assign_strongCast
                              1 objc_assign_strongCast
                          1 -[NSAutoreleasePool initWithCapacity:]
                          1 NSClassFromObject
                            1 object_getClass
                              1 object_getClass
                          1 dyld_stub_pthread_getspecific
                            1 dyld_stub_pthread_getspecific
                          1 pthread_getspecific
                            1 pthread_getspecific
                        2 dyld_stub_pthread_getspecific
                          2 dyld_stub_pthread_getspecific
                        1 objc_msgSend
                          1 objc_msgSend
                      10 objc_msgSend
                        10 objc_msgSend
                      4 +[NSObject alloc]
                        1 +[NSAutoreleasePool allocWithZone:]
                          1 +[NSAutoreleasePool allocWithZone:]
                        1 dyld_stub_objc_msgSend
                          1 dyld_stub_objc_msgSend
                        1 dyld_stub_pthread_getspecific
                          1 dyld_stub_pthread_getspecific
                        1 objc_msgSend
                          1 objc_msgSend
                      1 -[NSAutoreleasePool release]
                        1 -[NSAutoreleasePool release]
                      1 dyld_stub_objc_assign_strongCast
                        1 dyld_stub_objc_assign_strongCast
                      1 objc_collecting_enabled
                        1 objc_collecting_enabled
                      1 pthread_getspecific
                        1 pthread_getspecific
                    8 objc_msgSend
                      8 objc_msgSend
                    3 AnimCurScreenBlockHandler
                      2 miSpriteBlockHandler
                        2 miSpriteBlockHandler
                      1 AnimCurScreenBlockHandler
                    2 RootlessBlockHandler
                      2 RootlessBlockHandler
                  33 WaitForSomething
                  27 GetTimeInMillis
                    20 gettimeofday
                      16 __gettimeofday
                        9 __nanotime
                          9 __nanotime
                        7 __gettimeofday
                      4 gettimeofday
                    5 GetTimeInMillis
                    1 __commpage_gettimeofday
                      1 __commpage_gettimeofday
                    1 dyld_stub___commpage_gettimeofday
                      1 dyld_stub___commpage_gettimeofday
                  11 WakeupHandler
                    7 WakeupHandler
                    3 QuartzWakeupHandler
                      3 QuartzWakeupHandler
                    1 NoopDDA
                      1 NoopDDA
                  10 __bzero
                    10 __bzero
                  4 select$UNIX2003
                    4 select$UNIX2003
                  1 SmartScheduleStartTimer
                    1 SmartScheduleStartTimer
                  1 __error
                    1 __error
                  1 setitimer
                    1 setitimer
                5 Dispatch
                1 __error
                  1 __error
                1 dyld_stub___error
                  1 dyld_stub___error
    1677 Thread_2803
      1677 thread_start
        1677 _pthread_start
          1677 xpbproxy_x_thread
            1677 xpbproxy_input_loop
              1677 pthread_cond_wait$UNIX2003
                1677 __semwait_signal
                  1677 __semwait_signal
    1677 Thread_2903
      1677 thread_start
        1677 _pthread_start
          1677 glvmDoWork
            1677 pthread_cond_wait$UNIX2003
              1677 __semwait_signal
                1677 __semwait_signal
    1677 Thread_2a03
      1677 thread_start
        1677 _pthread_start
          1677 DarwinProcessFDAdditionQueue_thread
            1677 pthread_cond_wait$UNIX2003
              1677 __semwait_signal
                1677 __semwait_signal
    1677 Thread_2b03
      1677 thread_start
        1677 _pthread_start
          1677 select$DARWIN_EXTSN
            1677 select$DARWIN_EXTSN
    1677 Thread_2c03
      1677 thread_start
        1677 _pthread_start
          1677 _xp_async_thread
            1677 _xp_async_dequeue
              1677 pthread_cond_wait$UNIX2003
                1677 __semwait_signal
                  1677 __semwait_signal

Total number in stack (recursive counted multiple, when >=5):
        7       _pthread_start
        7       thread_start
        5       objc_msgSend

Sort by top of stack, same collapsed (when >= 5):
        __semwait_signal        6708
        mach_msg_trap        3312
        select$DARWIN_EXTSN        3188
        WaitForSomething        33
        _sigtramp        25
        objc_msgSend        21
        NSPopAutoreleasePool        18
        __bzero        10
        __nanotime        9
        WakeupHandler        7
        __gettimeofday        7
        objc_assign_strongCast        6
        Dispatch        5
        GetTimeInMillis        5
Sample analysis of process 7869 written to file /dev/stdout

ciao
christof

-- 
public key www.hfph.mwn.de/~chwolf/chwolf.asc

Please respect my privacy and do not make my contact information
available to third parties.


More information about the Xquartz-dev mailing list