PJThread register fails when I unplug/plugin head phones

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

 



Is it crashing for you too? I have a 32 Bit Mac using 10.6.4, I didn't call it or anything, it's as it is running. Another thing I noticed it uses 20% of my CPU if that has something to do with it. The processor I have is Intel Core Duo 2GHz. The sample of it running at 20% while it's in the background is below.
Sampling process 73128 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling (pid 73128) every 1 millisecond
Process:        [73128]
Load Address:    0x1000
Code Type:       X86 (Native)
Parent Process:  launchd [282]

Date/Time:       2010-11-06 12:45:52.252 -0500
OS Version:      Mac OS X 10.6.4 (10F569)
Report Version:  6

Call graph:
    1925 Thread_676559   DispatchQueue_1: com.apple.main-thread  (serial)
      1925 start
        1925 _start
          1925 NSApplicationMain
            1925 -[NSApplication run]
              1925 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
                1925 _DPSNextEvent
                  1925 BlockUntilNextEventMatchingListInMode
                    1925 ReceiveNextEventCommon
                      1925 RunCurrentEventLoopInMode
                        1925 CFRunLoopRunInMode
                          1925 CFRunLoopRunSpecific
                            1925 __CFRunLoopRun
                              1925 mach_msg
                                1925 mach_msg_trap
    1925 Thread_676567   DispatchQueue_2: com.apple.libdispatch-manager  (serial)
      1925 start_wqthread
        1925 _pthread_wqthread
          1925 _dispatch_worker_thread2
            1925 _dispatch_queue_invoke
              1925 _dispatch_mgr_invoke
                1925 kevent
    1925 Thread_676587
      1925 thread_start
        1925 _pthread_start
          1925 __NSThread__main__
            1925 -[NSThread main]
              1925 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]
                1925 CFRunLoopRunInMode
                  1925 CFRunLoopRunSpecific
                    1925 __CFRunLoopRun
                      1925 mach_msg
                        1925 mach_msg_trap
    1925 Thread_676589
      1925 thread_start
        1925 _pthread_start
          1925 __CFSocketManager
            1925 select$DARWIN_EXTSN
    1925 Thread_676611
      1925 thread_start
        1925 _pthread_start
          1925 thread_main
            1925 worker_proc
              1925 pj_ioqueue_poll
                1925 pj_sock_select
                  1925 select
                    1925 select$DARWIN_EXTSN$NOCANCEL
    1925 Thread_676613
      1925 thread_start
        1925 _pthread_start
          1925 thread_main
            1925 worker_thread
              1925 pjsua_handle_events
                1925 pjsip_endpt_handle_events2
                  1924 pj_ioqueue_poll
                    1920 pj_sock_select
                      1919 select
                        1919 select$DARWIN_EXTSN$NOCANCEL
                      1 pj_sock_select
                    2 pj_memcpy
                      2 __memcpy
                    1 pj_ioqueue_poll
                    1 pj_lock_acquire
                  1 pjsip_endpt_handle_events2
    1925 Thread_676684
      1925 thread_start
        1925 _pthread_start
          1925 CAPThread::Entry(CAPThread*)
            1925 HP_IOThread::ThreadEntry(HP_IOThread*)
              1925 HP_IOThread::WorkLoop()
                1387 CAGuard::WaitUntil(unsigned long long)
                  1386 CAGuard::WaitFor(unsigned long long)
                    1386 pthread_cond_timedwait_relative_np
                      1386 _pthread_cond_wait
                        1361 semaphore_timedwait_signal_trap
                        20 _pthread_cond_wait
                        5 pthread_mutex_lock
                          5 semaphore_wait_trap
                  1 CAGuard::WaitUntil(unsigned long long)
                532 HP_IOThread::PerformIO(AudioTimeStamp const&, double)
                  532 IOA_Device::CallIOProcs(AudioTimeStamp const&, AudioTimeStamp const&, AudioTimeStamp const&)
                    488 HP_IOProc::Call(AudioTimeStamp const&, AudioTimeStamp const&, AudioBufferList const*, AudioTimeStamp const&, AudioBufferList*)
                      488 AUGenericOutputEntry
                        485 input_callback
                          482 rec_cb
                            482 pjmedia_port_put_frame
                              482 resample_put_frame
                                482 pjmedia_resample_run
                                  481 res_Resample
                                    481 SrcUD
                                      475 FilterUD
                                      5 SrcUD
                                      1 WordToHword
                                  1 pjmedia_resample_run
                          3 AudioUnitRender
                            3 CallComponentDispatch
                              1 AUHALEntry
                                1 SystemOutputAUEntry
                                  1 0x700057c3
                                    1 0x70006b64
                                      1 0x700082b4
                                        1 0x70008df5
                                          1 AudioConverterFillComplexBuffer
                                            1 BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*)
                                              1 AudioConverterChain::RenderOutput(CABufferList*, unsigned long, unsigned long&, AudioStreamPacketDescription*)
                                                1 BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*)
                                                  1 CBRConverter::RenderOutput(CABufferList*, unsigned long, unsigned long&, AudioStreamPacketDescription*)
                                                    1 PCMConverter2::ConvertBufferList(unsigned long, CABufferList const*, CABufferList*)
                                                      1 Float32ToNativeInt16_X86
                              1 CallComponent
                              1 CallComponentDispatch
                        2 AUGenericOutputEntry
                        1 AUMultibandCompressorEntry
                          1 pthread_self
                    43 IOA_SingleDevice::ReadInputData(AudioTimeStamp const&, unsigned long)
                      43 IOA_HWDevice::ReadInputData(unsigned long, unsigned long, unsigned long)
                        43 IOConnectTrap4
                          43 iokit_user_client_trap
                    1 IOA_Device::CallIOProcs(AudioTimeStamp const&, AudioTimeStamp const&, AudioTimeStamp const&)
                3 IOA_Time::GetCurrentTime(AudioTimeStamp&) const
                  2 IOA_Time::GetCurrentTime(AudioTimeStamp&) const
                  1 __nanotime
                1 HP_IOThread::CalculateNextWakeUpTime(AudioTimeStamp const&, double, AudioTimeStamp&, bool, bool, bool&)
                  1 IOA_Time::TranslateTime(AudioTimeStamp const&, AudioTimeStamp&) const
                1 HP_IOThread::WorkLoop()
                1 IOA_SingleDevice::UpdateIOCycleTimingServices()
                  1 IOA_Time::Update()
                    1 IOA_HWTime::Update(double, bool&, bool&)
                      1 IOA_HWDevice::IsIOAudioFlipped(unsigned int)
    1925 Thread_676685
      1925 thread_start
        1925 _pthread_start
          1925 CAPThread::Entry(CAPThread*)
            1925 HP_IOThread::ThreadEntry(HP_IOThread*)
              1925 HP_IOThread::WorkLoop()
                1897 CAGuard::WaitUntil(unsigned long long)
                  1897 CAGuard::WaitFor(unsigned long long)
                    1897 pthread_cond_timedwait_relative_np
                      1896 _pthread_cond_wait
                        1887 semaphore_timedwait_signal_trap
                        6 _pthread_cond_wait
                        2 pthread_mutex_lock
                          2 semaphore_wait_trap
                        1 OSSpinLockLock
                      1 pthread_cond_timedwait_relative_np
                25 HP_IOThread::PerformIO(AudioTimeStamp const&, double)
                  25 IOA_Device::CallIOProcs(AudioTimeStamp const&, AudioTimeStamp const&, AudioTimeStamp const&)
                    13 IOA_SingleDevice::WriteOutputData(AudioTimeStamp const&, unsigned long)
                      13 IOA_HWDevice::WriteOutputData(unsigned long, unsigned long, unsigned long, unsigned long long)
                        13 iokit_user_client_trap
                    12 HP_IOProc::Call(AudioTimeStamp const&, AudioTimeStamp const&, AudioBufferList const*, AudioTimeStamp const&, AudioBufferList*)
                      11 AUGenericOutputEntry
                        9 0x700057c3
                          8 0x70006b64
                            7 0x700082b4
                              7 0x70008df5
                                7 AudioConverterFillComplexBuffer
                                  6 BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*)
                                    6 AudioConverterChain::RenderOutput(CABufferList*, unsigned long, unsigned long&, AudioStreamPacketDescription*)
                                      6 BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*)
                                        6 CBRConverter::RenderOutput(CABufferList*, unsigned long, unsigned long&, AudioStreamPacketDescription*)
                                          3 BufferedAudioConverter::GetInputBytes(unsigned long, unsigned long&, CABufferList const*&)
                                            3 BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*)
                                              3 CBRConverter::RenderOutput(CABufferList*, unsigned long, unsigned long&, AudioStreamPacketDescription*)
                                                2 BufferedAudioConverter::GetInputBytes(unsigned long, unsigned long&, CABufferList const*&)
                                                  2 AudioConverterChain::FillBufferFromInputProc(unsigned long*, CABufferList*)
                                                    2 AudioConverterChain::CallInputProc(unsigned long)
                                                      2 0x70008d08
                                                        1 0x70009830
                                                          1 0x70008c2f
                                                            1 output_renderer
                                                              1 play_cb
                                                                1 pjmedia_port_get_frame
                                                                  1 resample_get_frame
                                                                    1 pjmedia_port_get_frame
                                                                      1 get_frame
                                                                        1 pj_mutex_lock
                                                                          1 __spin_lock
                                                        1 0x70009848
                                                          1 GenericAUViewEntryShim
                                                1 PCMConverter2::ConvertBufferList(unsigned long, CABufferList const*, CABufferList*)
                                                  1 NativeInt16ToFloat32_X86
                                          3 UpmixMonoToStereoInterleaved32_X86
                                  1 TOpaqueRef<AudioConverterChain>::FromOpaqueRef() const
                                    1 __dynamic_cast
                                      1 __cxxabiv1::__vmi_class_type_info::__do_dyncast(int, __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info::__dyncast_result&) const
                            1 0x700081cd
                          1 0x70006b91
                            1 0x70006ae0
                              1 __memcpy
                        1 0x70005859
                        1 AUGenericOutputEntry
                      1 HP_IOProc::RefreshBufferList(HP_Device const&, bool, AudioBufferList*, std::vector<IOBuffer*, std::allocator<IOBuffer*> > const&)
                        1 HP_Device::GetStreamByIndex(bool, unsigned long) const
                2 IOA_SingleDevice::UpdateIOCycleTimingServices()
                  1 IOA_SingleDevice::UpdateIOCycleTimingServices()
                  1 IOA_Time::Update()
                    1 IOA_HWTime::Update(double, bool&, bool&)
                      1 IOA_HWDevice::IsIOAudioFlipped(unsigned int)
                1 IOA_Time::GetCurrentTime(AudioTimeStamp&) const
    1925 Thread_676751
      1925 start_wqthread
        1925 _pthread_wqthread
          1925 __workq_kernreturn

Total number in stack (recursive counted multiple, when >=5):
        6       _pthread_start
        6       thread_start
        5       BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*)

Sort by top of stack, same collapsed (when >= 5):
        mach_msg_trap        3850
        select$DARWIN_EXTSN$NOCANCEL        3844
        semaphore_timedwait_signal_trap        3248
        __workq_kernreturn        1925
        kevent        1925
        select$DARWIN_EXTSN        1925
        FilterUD        475
        iokit_user_client_trap        56
        _pthread_cond_wait        26
        semaphore_wait_trap        7
        SrcUD        5

When I run it with log level of 13, this is the output as I unplug the head phones.
../src/pj/os_core_unix.c:403: failed assertion `thread->signature1 != 0xDEAFBEEF || thread->signature2 != 0xDEADC0DE || (thread->thread == pthread_self())'
Abort trap

Nothing else, that is it.


On Nov 6, 2010, at 12:34 PM, Alexei Kuznetsov wrote:

> Here's what happens when I plug or unplug headphones:
> 
> 20:26:18.140    pjsua_app.c  Call 1 state changed to CONFIRMED
> 20:26:18.452       stream.c  G722 codec used, remote samples per
> frame detected = 160
> 20:26:18.769 strm0x1008f154  VAD re-enabled
> 20:26:19.175   sound_port.c  EC activated
> 20:26:22.223   Master/sound  Buffer size adjusted from 1175 to 696
> (eff_cnt=559)
> 20:26:23.162  ec0x100314310  Underflow, buf_cnt=0, will generate 1 frame
> 20:26:23.205   Master/sound  Buffer size adjusted from 1016 to 581
> (eff_cnt=559)
> 20:26:24.004  ec0x100314310  Underflow, buf_cnt=0, will generate 1 frame
> 20:26:24.965  ec0x100314310  Underflow, buf_cnt=0, will generate 1 frame
> 
> And so on. And the sound stops.
> 
> I configured pjsproject 1.8.5 with the following settings in config_site.h:
> #define PJSIP_DONT_SWITCH_TO_TCP 1
> #define PJMEDIA_AUDIO_DEV_HAS_COREAUDIO 1
> 
> I built it on the 64-bit iMac with Mac OS X 10.6.4 and used pjsua
> tool. Here's file output:
> $ file pjsua-i386-apple-darwin10.4.0
> pjsua-i386-apple-darwin10.4.0: Mach-O 64-bit executable x86_64
> 
> Alexei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4657 bytes
Desc: not available
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20101106/5226cd42/attachment-0001.p7s>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux