Opened 15 years ago

Closed 7 years ago

#21935 closed defect (worksforme)

ogg123 doesn't quit - version 1.2.0

Reported by: jpschewe@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc: khindenburg@…
Port: vorbis-tools

Description (last modified by mf2k (Frank Schima))

This appears to be the same problem as ticket:5024. I just upgraded to Snow Leopard and reinstalled all of my ports "port uninstall installed; port install <those I care about>".

When ogg123 finishes a file, it doesn't exit, nor can I kill it will ctrl-c or kill -15, I need to use kill -9. Ctrl-z doesn't suspend it either. I suspect there's a deadlock in the signal handler.

Here is the inspection trace from activitity monitor:

Sampling process 26021 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling ogg123 (pid 26021) every 1 millisecond
Call graph:
    2494 Thread_1327455   DispatchQueue_1: com.apple.main-thread  (serial)
      2494 start
        2494 main
          2494 exit
            2494 __cxa_finalize
              2494 ao_onexit
                2494 close_audio_devices
                  2494 ao_close
                    2494 ao_plugin_close
                      2494 _pthread_cond_wait
                        2494 __semwait_signal
    2494 Thread_1327461   DispatchQueue_2: com.apple.libdispatch-manager  (serial)
      2494 start_wqthread
        2494 _pthread_wqthread
          2494 _dispatch_worker_thread2
            2494 _dispatch_queue_invoke
              2494 _dispatch_mgr_invoke
                2494 kevent

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

Sort by top of stack, same collapsed (when >= 5):
        __semwait_signal        2494
        kevent        2494
Sample analysis of process 26021 written to file /dev/stdout

Here is the trace from gdb:

Undefined command: "thread-list".  Try "help".
(gdb) info threads
  2 port# 0x2a03 0x00007fff8437fb16 in kevent ()
* 1 port# 0x903  0x00007fff843a19c6 in __semwait_signal ()
(gdb) bt
#0  0x00007fff843a19c6 in __semwait_signal ()
#1  0x00007fff843a5801 in _pthread_cond_wait ()
#2  0x00000001003c514b in ao_plugin_close ()
#3  0x00000001000618d9 in ao_close ()
#4  0x000000010000110e in close_audio_devices ()
#5  0x0000000100001141 in ao_onexit ()
#6  0x00007fff8437927f in __cxa_finalize ()
#7  0x00007fff8437918c in exit ()
#8  0x0000000100005e35 in main ()
(gdb) thread 2
[Switching to thread 2 (process 26021)]
0x00007fff8437fb16 in kevent ()
(gdb) bt
#0  0x00007fff8437fb16 in kevent ()
#1  0x00007fff84381a19 in _dispatch_mgr_invoke ()
#2  0x00007fff843816d6 in _dispatch_queue_invoke ()
#3  0x00007fff843811f6 in _dispatch_worker_thread2 ()
#4  0x00007fff84380b28 in _pthread_wqthread ()
#5  0x00007fff843809c5 in start_wqthread ()

I've also noticed that when xemacs execs a process xemacs locks up. Perhaps there is is a common problem between the two and how threads are handled in Snow Leopard.

Change History (6)

comment:1 in reply to:  description Changed 15 years ago by jpschewe@…

Reformatted:

This appears to be the same problem as ticket:5024. I just upgraded to Snow Leopard and reinstalled all of my ports "port uninstall installed; port install <those I care about>". When ogg123 finishes a file, it doesn't exit, nor can I kill it will ctrl-c or kill -15, I need to use kill -9. Ctrl-z doesn't suspend it either. I suspect there's a deadlock in the signal handler. Here is the inspection trace from activitity monitor:

 Sampling process 26021 for 3 seconds with 1 millisecond of run time between samples
 Sampling completed, processing symbols...
 Analysis of sampling ogg123 (pid 26021) every 1 millisecond
 Call graph:
     2494 Thread_1327455   DispatchQueue_1: com.apple.main-thread  (serial)
       2494 start
         2494 main
           2494 exit
             2494 __cxa_finalize
               2494 ao_onexit
                 2494 close_audio_devices
                   2494 ao_close
                     2494 ao_plugin_close
                       2494 _pthread_cond_wait
                         2494 __semwait_signal
     2494 Thread_1327461   DispatchQueue_2: com.apple.libdispatch-manager  (serial)
       2494 start_wqthread
         2494 _pthread_wqthread
           2494 _dispatch_worker_thread2
             2494 _dispatch_queue_invoke
               2494 _dispatch_mgr_invoke
                 2494 kevent
 
 Total number in stack (recursive counted multiple, when =5):
 
 Sort by top of stack, same collapsed (when = 5):
         __semwait_signal        2494
         kevent        2494
 Sample analysis of process 26021 written to file /dev/stdout

Here is the trace from gdb:

(gdb) info threads
   2 port# 0x2a03 0x00007fff8437fb16 in kevent ()
 * 1 port# 0x903  0x00007fff843a19c6 in __semwait_signal ()
 (gdb) bt
 #0  0x00007fff843a19c6 in __semwait_signal ()
 #1  0x00007fff843a5801 in _pthread_cond_wait ()
 #2  0x00000001003c514b in ao_plugin_close ()
 #3  0x00000001000618d9 in ao_close ()
 #4  0x000000010000110e in close_audio_devices ()
 #5  0x0000000100001141 in ao_onexit ()
 #6  0x00007fff8437927f in __cxa_finalize ()
 #7  0x00007fff8437918c in exit ()
 #8  0x0000000100005e35 in main ()
 (gdb) thread 2
 [Switching to thread 2 (process 26021)]
 0x00007fff8437fb16 in kevent ()
 (gdb) bt
 #0  0x00007fff8437fb16 in kevent ()
 #1  0x00007fff84381a19 in _dispatch_mgr_invoke ()
 #2  0x00007fff843816d6 in _dispatch_queue_invoke ()
 #3  0x00007fff843811f6 in _dispatch_worker_thread2 ()
 #4  0x00007fff84380b28 in _pthread_wqthread ()
 #5  0x00007fff843809c5 in start_wqthread ()

I've also noticed that when xemacs execs a process xemacs locks up. Perhaps there is is a common problem between the two and how threads are handled in Snow Leopard.

comment:2 Changed 15 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:3 Changed 15 years ago by mf2k (Frank Schima)

Port: vorbis-tools added

comment:4 Changed 13 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to rmstonecipher@…

comment:5 Changed 9 years ago by mf2k (Frank Schima)

Owner: changed from rmstonecipher@… to macports-tickets@…

Is this still true with version 1.4?

comment:6 Changed 7 years ago by kurthindenburg (Kurt Hindenburg)

Cc: khindenburg@… added
Resolution: worksforme
Status: newclosed

please reopen if you still have this issue w/ 1.4

Note: See TracTickets for help on using tickets.