乘客:100%CPU

时间:2013-06-24 17:08:11

标签: macos passenger

我正在运行Passenger,当我重新启动Apache时,我得到一个PassengerWatchdog进程,可以达到100%的CPU。

有什么建议吗?

我使用的是Passenger 4.0.5和Ruby 2.0.0p195的Mac OS X 10.8.4。

使用Mac OS X活动监视器,这是我在采样时得到的:

Analysis of sampling PassengerWatchdog (pid 3477) every 1 millisecond
Process:         PassengerWatchdog [3477]
Path:            /Users/snowcrash/.rvm/gems/ruby-2.0.0-p195/gems/passenger-4.0.5/agents/PassengerWatchdog
Load Address:    0x1055ce000
Identifier:      PassengerWatchdog
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  httpd [3473]

Date/Time:       2013-06-24 17:59:52.311 +0100
OS Version:      Mac OS X 10.8.4 (12E55)
Report Version:  7

Call graph:
    2566 Thread_76210   DispatchQueue_1: com.apple.main-thread  (serial)
    + 2566 start  (in libdyld.dylib) + 7  [0x7fff8bfb77e8]
    +   2566 exit  (in libsystem_c.dylib) + 15  [0x7fff957b7f57]
    +     2566 __cxa_finalize  (in libsystem_c.dylib) + 200  [0x7fff957b6307]
    +       2566 __tcf_12  (in PassengerWatchdog) + 27  [0x1055cf2db]  Main.cpp:95
    +         2566 boost::shared_ptr<Passenger::ServerInstanceDir::Generation>::~shared_ptr()  (in PassengerWatchdog) + 37  [0x1055dab89]  shared_ptr.hpp:165
    +           2566 boost::detail::shared_count::~shared_count()  (in PassengerWatchdog) + 40  [0x1056171d4]  shared_count.hpp:305
    +             2566 boost::detail::sp_counted_base::release()  (in PassengerWatchdog) + 86  [0x1055da0de]  sp_counted_base_gcc_x86.hpp:145
    +               2566 boost::detail::sp_counted_impl_p<Passenger::ServerInstanceDir::Generation>::dispose()  (in PassengerWatchdog) + 28  [0x1055def22]  sp_counted_impl.hpp:78
    +                 2566 void boost::checked_delete<Passenger::ServerInstanceDir::Generation>(Passenger::ServerInstanceDir::Generation*)  (in PassengerWatchdog) + 42  [0x1055fa57a]  checked_delete.hpp:34
    +                   2566 Passenger::ServerInstanceDir::Generation::~Generation()  (in PassengerWatchdog) + 57  [0x1055fa4db]  ServerInstanceDir.h:171
    +                     2566 free  (in libsystem_c.dylib) + 199  [0x7fff957888f8]
    +                       2566 szone_free_definite_size  (in libsystem_c.dylib) + 1908  [0x7fff9578e7cd]
    +                         2566 tiny_free_list_remove_ptr  (in libsystem_c.dylib) + 330  [0x7fff95791d67]
    +                           2566 _sigtramp  (in libsystem_c.dylib) + 26  [0x7fff9575d94a]
    +                             2566 Passenger::abortHandler(int, __siginfo*, void*)  (in PassengerWatchdog) + 1039  [0x105629cbf]  Base.cpp:867
    +                               2566 Passenger::forkAndRedirectToTee(char*)  (in PassengerWatchdog) + 63  [0x1056276df]  Base.cpp:791
    +                                 2566 Passenger::asyncFork()  (in PassengerWatchdog) + 13  [0x10561967d]  Utils.cpp:972
    +                                   2566 fork  (in libsystem_c.dylib) + 12  [0x7fff95797411]
    +                                     2566 _cthread_fork_prepare  (in libsystem_c.dylib) + 98  [0x7fff95777206]
    +                                       2566 _malloc_fork_prepare  (in libsystem_c.dylib) + 61  [0x7fff95789719]
    +                                         2566 szone_force_lock  (in libsystem_c.dylib) + 71  [0x7fff95793caa]
    +                                           2566 _spin_lock$VARIANT$mp  (in libsystem_c.dylib) + 25,53,...  [0x7fff9575dfa9,0x7fff9575dfc5,...]
    2566 Thread_76212
      2566 thread_start  (in libsystem_c.dylib) + 13  [0x7fff9575c1e1]
        2566 _pthread_start  (in libsystem_c.dylib) + 327  [0x7fff9576f7a2]
          2566 thread_proxy  (in PassengerWatchdog) + 141  [0x10563405d]  thread.cpp:153
            2566 boost::detail::thread_data<boost::_bi::bind_t<void, void (*)(boost::function<void ()>, boost::shared_ptr<oxt::thread_local_context>), boost::_bi::list2<boost::_bi::value<boost::function<void ()> >, boost::_bi::value<boost::shared_ptr<oxt::thread_local_context> > > > >::run()  (in PassengerWatchdog) + 37  [0x1055e6979]  thread.hpp:78
              2566 boost::_bi::bind_t<void, void (*)(boost::function<void ()>, boost::shared_ptr<oxt::thread_local_context>), boost::_bi::list2<boost::_bi::value<boost::function<void ()> >, boost::_bi::value<boost::shared_ptr<oxt::thread_local_context> > > >::operator()()  (in PassengerWatchdog) + 92  [0x1055e694e]  bind_template.hpp:20
                2566 void boost::_bi::list2<boost::_bi::value<boost::function<void ()> >, boost::_bi::value<boost::shared_ptr<oxt::thread_local_context> > >::operator()<void (*)(boost::function<void ()>, boost::shared_ptr<oxt::thread_local_context>), boost::_bi::list0>(boost::_bi::type<void>, void (*&)(boost::function<void ()>, boost::shared_ptr<oxt::thread_local_context>), boost::_bi::list0&, int)  (in PassengerWatchdog) + 157  [0x1055e680d]  bind.hpp:313
                  2566 oxt::thread::thread_main(boost::function<void ()>, boost::shared_ptr<oxt::thread_local_context>)  (in PassengerWatchdog) + 413  [0x10563b52d]  implementation.cpp:331
                    2566 boost::function0<void>::operator()() const  (in PassengerWatchdog) + 143  [0x10562372b]  function_template.hpp:767
                      2566 boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&)  (in PassengerWatchdog) + 29  [0x1055e1cdd]  function_template.hpp:112
                        2566 ServerInstanceDirToucher::threadMain()  (in PassengerWatchdog) + 28  [0x105604e0c]  ServerInstanceDirToucher.cpp:38
                          2566 oxt::syscalls::sleep(unsigned int)  (in PassengerWatchdog) + 49  [0x105641151]  system_calls.cpp:581
                            2566 oxt::syscalls::nanosleep(timespec const*, timespec*)  (in PassengerWatchdog) + 113  [0x105640eb1]  system_calls.cpp:620
                              2566 nanosleep  (in libsystem_c.dylib) + 163  [0x7fff957f9800]
                                2566 __semwait_signal  (in libsystem_kernel.dylib) + 10  [0x7fff8d9d5386]

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

Sort by top of stack, same collapsed (when >= 5):
        __semwait_signal  (in libsystem_kernel.dylib)        2566
        _spin_lock$VARIANT$mp  (in libsystem_c.dylib)        2566

Binary Images:
       0x1055ce000 -        0x105678fef +PassengerWatchdog (??? - ???) <F793DD00-F0BC-37AE-BD0D-114012A1CF6D> /Users/snowcrash/.rvm/gems/ruby-2.0.0-p195/gems/passenger-4.0.5/agents/PassengerWatchdog
    0x7fff651ce000 -     0x7fff6520293f  dyld (210.2 - ???) <36CAA36E-72BC-3E48-96D9-B96A2DF77730> /usr/lib/dyld
    0x7fff8a34e000 -     0x7fff8a3b7fff  libstdc++.6.dylib (56.0.0 - compatibility 7.0.0) <EAA2B53E-EADE-39CF-A0EF-FB9D4940672A> /usr/lib/libstdc++.6.dylib
    0x7fff8a7ef000 -     0x7fff8a7f5ff7  libunwind.dylib (35.1.0 - compatibility 1.0.0) <21703D36-2DAB-3D8B-8442-EAAB23C060D3> /usr/lib/system/libunwind.dylib
    0x7fff8ac52000 -     0x7fff8ac5dfff  libsystem_notify.dylib (98.5.0 - compatibility 1.0.0) <C49275CC-835A-3207-AFBA-8C01374927B6> /usr/lib/system/libsystem_notify.dylib
    0x7fff8adb5000 -     0x7fff8adbdfff  liblaunch.dylib (442.26.2 - compatibility 1.0.0) <2F71CAF8-6524-329E-AC56-C506658B4C0C> /usr/lib/system/liblaunch.dylib
    0x7fff8add3000 -     0x7fff8addafff  libcopyfile.dylib (89.0.0 - compatibility 1.0.0) <876573D0-E907-3566-A108-577EAD1B6182> /usr/lib/system/libcopyfile.dylib
    0x7fff8af9d000 -     0x7fff8afa2fff  libcache.dylib (57.0.0 - compatibility 1.0.0) <65187C6E-3FBF-3EB8-A1AA-389445E2984D> /usr/lib/system/libcache.dylib
    0x7fff8b3b1000 -     0x7fff8b3fdff7  libauto.dylib (??? - ???) <AD5A4CE7-CB53-313C-9FAE-673303CC2D35> /usr/lib/libauto.dylib
    0x7fff8b481000 -     0x7fff8b4b7fff  libsystem_info.dylib (??? - ???) <4FFCA242-7F04-365F-87A6-D4EFB89503C1> /usr/lib/system/libsystem_info.dylib
    0x7fff8bfb2000 -     0x7fff8bfb3ff7  libdnsinfo.dylib (453.19.0 - compatibility 1.0.0) <14202FFB-C3CA-3FCC-94B0-14611BF8692D> /usr/lib/system/libdnsinfo.dylib
    0x7fff8bfb5000 -     0x7fff8bfb8ff7  libdyld.dylib (210.2.3 - compatibility 1.0.0) <F59367C9-C110-382B-A695-9035A6DD387E> /usr/lib/system/libdyld.dylib
    0x7fff8c4cf000 -     0x7fff8c4f1ff7  libxpc.dylib (140.43.0 - compatibility 1.0.0) <70BC645B-6952-3264-930C-C835010CCEF9> /usr/lib/system/libxpc.dylib
    0x7fff8c853000 -     0x7fff8c8a2ff7  libcorecrypto.dylib (??? - ???) <CE0C29A3-C420-339B-ADAA-52F4683233CC> /usr/lib/system/libcorecrypto.dylib
    0x7fff8c8a3000 -     0x7fff8c8c8ff7  libc++abi.dylib (26.0.0 - compatibility 1.0.0) <D86169F3-9F31-377A-9AF3-DB17142052E4> /usr/lib/libc++abi.dylib
    0x7fff8d537000 -     0x7fff8d538fff  libsystem_blocks.dylib (59.0.0 - compatibility 1.0.0) <D92DCBC3-541C-37BD-AADE-ACC75A0C59C8> /usr/lib/system/libsystem_blocks.dylib
    0x7fff8d9c3000 -     0x7fff8d9deff7  libsystem_kernel.dylib (2050.24.15 - compatibility 1.0.0) <A9F97289-7985-31D6-AF89-151830684461> /usr/lib/system/libsystem_kernel.dylib
    0x7fff8e4c4000 -     0x7fff8e4d2ff7  libsystem_network.dylib (??? - ???) <0D99F24E-56FE-380F-B81B-4A4C630EE587> /usr/lib/system/libsystem_network.dylib
    0x7fff8edff000 -     0x7fff8ee01ff7  libunc.dylib (25.0.0 - compatibility 1.0.0) <92805328-CD36-34FF-9436-571AB0485072> /usr/lib/system/libunc.dylib
    0x7fff8ef14000 -     0x7fff8ef16fff  libquarantine.dylib (52.1.0 - compatibility 1.0.0) <143B726E-DF47-37A8-90AA-F059CFD1A2E4> /usr/lib/system/libquarantine.dylib
    0x7fff8fd19000 -     0x7fff8fd2eff7  libdispatch.dylib (228.23.0 - compatibility 1.0.0) <D26996BF-FC57-39EB-8829-F63585561E09> /usr/lib/system/libdispatch.dylib
    0x7fff90bcc000 -     0x7fff90bcdff7  libremovefile.dylib (23.2.0 - compatibility 1.0.0) <6763BC8E-18B8-3AD9-8FFA-B43713A7264F> /usr/lib/system/libremovefile.dylib
    0x7fff90bce000 -     0x7fff90bdcfff  libcommonCrypto.dylib (50000.0.0 - compatibility 1.0.0) <BAAFE0C9-BB86-3CA7-88C0-E3CBA98DA06F> /usr/lib/system/libcommonCrypto.dylib
    0x7fff91673000 -     0x7fff916dbff7  libc++.1.dylib (65.1.0 - compatibility 1.0.0) <20E31B90-19B9-3C2A-A9EB-474E08F9FE05> /usr/lib/libc++.1.dylib
    0x7fff91890000 -     0x7fff91891fff  libDiagnosticMessagesClient.dylib (??? - ???) <8548E0DC-0D2F-30B6-B045-FE8A038E76D8> /usr/lib/libDiagnosticMessagesClient.dylib
    0x7fff9285c000 -     0x7fff9285dff7  libSystem.B.dylib (169.3.0 - compatibility 1.0.0) <9089D72D-E714-31E1-80C8-698A8E8B05AD> /usr/lib/libSystem.B.dylib
    0x7fff92fdd000 -     0x7fff92fddfff  libkeymgr.dylib (25.0.0 - compatibility 1.0.0) <CC9E3394-BE16-397F-926B-E579B60EE429> /usr/lib/system/libkeymgr.dylib
    0x7fff937a9000 -     0x7fff938c192f  libobjc.A.dylib (228.0.0 - compatibility 1.0.0) <90D31928-F48D-3E37-874F-220A51FD9E37> /usr/lib/libobjc.A.dylib
    0x7fff93e3a000 -     0x7fff93e40fff  libmacho.dylib (829.0.0 - compatibility 1.0.0) <BF332AD9-E89F-387E-92A4-6E1AB74BD4D9> /usr/lib/system/libmacho.dylib
    0x7fff93ed1000 -     0x7fff93ed6fff  libcompiler_rt.dylib (30.0.0 - compatibility 1.0.0) <08F8731D-5961-39F1-AD00-4590321D24A9> /usr/lib/system/libcompiler_rt.dylib
    0x7fff9556e000 -     0x7fff9556fff7  libsystem_sandbox.dylib (??? - ???) <B739DA63-B675-387A-AD84-412A651143C0> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff9575b000 -     0x7fff95827ff7  libsystem_c.dylib (825.26.0 - compatibility 1.0.0) <4C9EB006-FE1F-3F8F-8074-DFD94CF2CE7B> /usr/lib/system/libsystem_c.dylib
    0x7fff95a41000 -     0x7fff95a49ff7  libsystem_dnssd.dylib (??? - ???) <BDCB8566-0189-34C0-9634-35ABD3EFE25B> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff95abe000 -     0x7fff95aecff7  libsystem_m.dylib (??? - ???) <B434BE5C-25AB-3EBD-BAA7-5304B34E3441> /usr/lib/system/libsystem_m.dylib

2 个答案:

答案 0 :(得分:0)

这是一个已知问题,已经解决。虽然修复程序已经提交,但它尚未作为gem发布。查找下一个版本4.0.6,其中应包含修复程序。

目前,您可能要么降级乘客(我没有指出引入此问题的版本,我的猜测是尝试版本&lt; = 4.0.4)或者从源代码处工作。

以下是错误跟踪器页面: https://code.google.com/p/phusion-passenger/issues/detail?id=908

我们在FreeBSD(OS X的基础)中遇到了这个问题,希望这也能在那里解决它。

答案 1 :(得分:0)

我能够通过降级到4.0.3来完成这项工作,然后在使用killall杀死流氓进程后进行硬停止然后启动Apache。