Ticket #256 (closed task: duplicate)

Opened 5 years ago

Last modified 4 years ago

X11 uses 100% of CPU when not focused

Reported by: cleanthes@… Owned by: jeremyhu@…
Priority: Expected Milestone: 2.3.3
Component: x11-apps Version: 2.3.2 (xserver-1.4.2-apple31)
Keywords: Cc:

Description

Per Jeremy's recommendation http://xquartz.macosforge.org/trac/ticket/241, I'm opening a new bug report for the same problem that was plaguing 2.3.2.

When I move away from X11 2.3.3 RC5, x11.bin starts using up 100% of CPU.

Process sample follows. Thanks.

Sampling process 2322 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling X11.bin (pid 2322) every 1 millisecond
Call graph:
    1807 Thread_2507
      1807 start
        1807 main
          1807 mach_msg_server
            1807 mach_startup_server
              1807 _Xstart_x11_server
                1807 do_start_x11_server
                  1807 server_main
                    1807 X11ApplicationMain
                      1807 -[NSApplication run]
                        1807 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
                          1807 _DPSNextEvent
                            1807 BlockUntilNextEventMatchingListInMode
                              1807 ReceiveNextEventCommon
                                1807 RunCurrentEventLoopInMode
                                  1807 CFRunLoopRunInMode
                                    1807 CFRunLoopRunSpecific
                                      1765 mach_msg
                                        1765 mach_msg_trap
                                          1765 mach_msg_trap
                                      42 0xffffffff
                                        42 _sigtramp
                                          40 _sigtramp
                                          2 setitimer
                                            2 setitimer
    1807 Thread_2603
      1807 thread_start
        1807 _pthread_start
          1807 CAPThread::Entry(CAPThread*)
            1807 HALRunLoop::OwnThread(void*)
              1807 CFRunLoopRunInMode
                1807 CFRunLoopRunSpecific
                  1807 mach_msg
                    1807 mach_msg_trap
                      1807 mach_msg_trap
    1807 Thread_2703
      1807 thread_start
        1807 _pthread_start
          1807 server_thread
            1807 dix_main
              1807 Dispatch
                1589 select$DARWIN_EXTSN
                  1589 select$DARWIN_EXTSN
                205 WaitForSomething
                  110 BlockHandler
                    92 QuartzBlockHandler
                      52 NSPopAutoreleasePool
                        31 NSPopAutoreleasePool
                        10 objc_assign_strongCast
                          10 objc_assign_strongCast
                        3 NSClassFromObject
                          2 NSClassFromObject
                          1 -[NSObject class]
                            1 -[NSObject class]
                        2 _CFExecutableLinkedOnOrAfter
                          2 _CFExecutableLinkedOnOrAfter
                        2 objc_collecting_enabled
                          2 objc_collecting_enabled
                        2 objc_msgSend
                          2 objc_msgSend
                        1 +[NSObject self]
                          1 +[NSObject self]
                        1 object_getClass
                          1 object_getClass
                      13 -[NSAutoreleasePool init]
                        7 -[NSAutoreleasePool initWithCapacity:]
                          5 NSPushAutoreleasePool
                            4 NSPushAutoreleasePool
                            1 objc_assign_strongCast
                              1 objc_assign_strongCast
                          1 objc_msgSend
                            1 objc_msgSend
                          1 pthread_getspecific
                            1 pthread_getspecific
                        3 -[NSAutoreleasePool init]
                        2 objc_msgSend
                          2 objc_msgSend
                        1 dyld_stub_objc_msgSend
                          1 dyld_stub_objc_msgSend
                      12 objc_msgSend
                        12 objc_msgSend
                      4 objc_collecting_enabled
                        4 objc_collecting_enabled
                      2 +[NSObject alloc]
                        1 +[NSObject alloc]
                        1 pthread_getspecific
                          1 pthread_getspecific
                      2 -[NSAutoreleasePool release]
                        2 -[NSAutoreleasePool release]
                      2 QuartzBlockHandler
                      2 dyld_stub_objc_assign_strongCast
                        2 dyld_stub_objc_assign_strongCast
                      1 dyld_stub_objc_collecting_enabled
                        1 dyld_stub_objc_collecting_enabled
                      1 dyld_stub_pthread_getspecific
                        1 dyld_stub_pthread_getspecific
                      1 pthread_getspecific
                        1 pthread_getspecific
                    11 objc_msgSend
                      11 objc_msgSend
                    6 AnimCurScreenBlockHandler
                      4 miSpriteBlockHandler
                        4 miSpriteBlockHandler
                      2 AnimCurScreenBlockHandler
                    1 BlockHandler
                  51 WaitForSomething
                  24 GetTimeInMillis
                    20 gettimeofday
                      18 __gettimeofday
                        10 __nanotime
                          10 __nanotime
                        8 __gettimeofday
                      2 gettimeofday
                    2 dyld_stub___commpage_gettimeofday
                      2 dyld_stub___commpage_gettimeofday
                    1 GetTimeInMillis
                    1 __commpage_gettimeofday
                      1 __commpage_gettimeofday
                  15 WakeupHandler
                    11 WakeupHandler
                    2 QuartzWakeupHandler
                      2 QuartzWakeupHandler
                    2 RootlessWakeupHandler
                      2 RootlessWakeupHandler
                  3 __bzero
                    3 __bzero
                  2 select$UNIX2003
                    2 select$UNIX2003
                9 Dispatch
                2 __error
                  2 __error
                1 _sysenter_trap
                  1 _sysenter_trap
                1 memset
                  1 memset
    1807 Thread_2803
      1807 thread_start
        1807 _pthread_start
          1807 xpbproxy_x_thread
            1807 xpbproxy_input_loop
              1807 pthread_cond_wait$UNIX2003
                1807 __semwait_signal
                  1807 __semwait_signal
    1807 Thread_2903
      1807 thread_start
        1807 _pthread_start
          1807 glvmDoWork
            1807 pthread_cond_wait$UNIX2003
              1807 __semwait_signal
                1807 __semwait_signal
    1807 Thread_2a03
      1807 thread_start
        1807 _pthread_start
          1807 DarwinProcessFDAdditionQueue_thread
            1807 pthread_cond_wait$UNIX2003
              1807 __semwait_signal
                1807 __semwait_signal
    1807 Thread_2b03
      1807 thread_start
        1807 _pthread_start
          1807 select$DARWIN_EXTSN
            1807 select$DARWIN_EXTSN
    1807 Thread_2c03
      1807 thread_start
        1807 _pthread_start
          1807 _xp_async_thread
            1807 _xp_async_dequeue
              1807 pthread_cond_wait$UNIX2003
                1807 __semwait_signal
                  1807 __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        7228
        mach_msg_trap        3572
        select$DARWIN_EXTSN        3396
        WaitForSomething        51
        _sigtramp        40
        NSPopAutoreleasePool        31
        objc_msgSend        28
        WakeupHandler        11
        objc_assign_strongCast        11
        __nanotime        10
        Dispatch        9
        __gettimeofday        8
        objc_collecting_enabled        6
Sample analysis of process 2322 written to file /dev/stdout

Attachments

Sample of X11.bin.txt (8.3 KB) - added by cleanthes@… 5 years ago.

Change History

Changed 5 years ago by cleanthes@…

comment:1 Changed 5 years ago by jeremyhu@…

  • Status changed from new to closed
  • Version set to 2.3.2 (xserver-1.4)
  • Resolution set to duplicate

Thanks. As you may have noticed, Chris confirmed that it is still present (which means that the old "fix" was just masking the problem). I've been able to reproduce it here, so I now have a fix. It will be in 2.3.3. Thanks

Note: See TracTickets for help on using tickets.