webman,stop fail

evilk

ps aux | grep php

cat runtime/webman.pid

php start.php status

php start.php stop

参考了文档https://www.workerman.net/doc/workerman/faq/stop-fail.html
都是正确的,有大佬知道怎么回事吗?

1798 3 0
3个回答

walkor

切换到root用户执行stop试下

  • evilk 2022-02-17

    现在的问题是,显示stop fail,但再次执行stop,会显示 not run,服务其实是停止了,但查看进程,发现之前的master进程还在

  • evilk 2022-02-17

    stop,按理说,应该也会stop master进程,对吧?

  • walkor 2022-02-17

    我这没有环境,不好给你定位,看起来是出现了2格master进程,应该是fork进程时最开始的进程执行exit后没有退出

  • walkor 2022-02-17

    看看是不是安装了什么扩展影响了exit得执行

  • evilk 2022-02-17

    同样的代码,我本地是可以stop success,但测试环境就不行,应该就是环境的影响,但环境影响,这种怎么排查呢,因为安装了很多扩展

  • evilk 2022-02-25

    测试环境PHP版本是7.3.27有这个问题,但本地 php 7.3.33 和 php 7.4.26都没有这个问题

  • walkor 2022-02-25

    进程没退出,感觉是exit执行无效。可能和扩展有关,有没有装xdebug,去掉试下。

  • evilk 2022-02-25

    没有安装xdebug,有安装swoole,swoole version如下:
    swoole

    Swoole => enabled
    Author => Swoole Team team@swoole.com
    Version => 4.8.6
    Built => Jan 13 2022 09:16:23
    coroutine => enabled with boost asm context
    trace_log => enabled
    epoll => enabled
    eventfd => enabled
    signalfd => enabled
    cpu_affinity => enabled
    spinlock => enabled
    rwlock => enabled
    sockets => enabled
    openssl => OpenSSL 1.0.2k-fips 26 Jan 2017
    http2 => enabled
    json => enabled
    curl-native => enabled
    pcre => enabled
    c-ares => 1.10.0
    zlib => 1.2.7
    mutex_timedlock => enabled
    pthread_barrier => enabled
    futex => enabled
    mysqlnd => enabled
    async_redis => enabled

    Directive => Local Value => Master Value
    swoole.enable_coroutine => On => On
    swoole.enable_library => On => On
    swoole.enable_preemptive_scheduler => Off => Off
    swoole.display_errors => On => On
    swoole.use_shortname => On => On
    swoole.unixsock_buffer_size => 8388608 => 8388608

  • walkor 2022-02-25

    执行 strace php start.php start ,截图下后半部分

  • evilk 2022-02-25

    munmap(0x7fba33eb5000, 4096) = 0
    access("/var/www/xxx-promo-api/vendor/composer/../..//Protocols/Text.php", F_OK) = -1 ENOENT (No such file or directory)
    stat("/var/www/xxx-promo-api/Protocols/Text.php", 0x7ffcd2244a50) = -1 ENOENT (No such file or directory)
    stat("/var/www/xxx-promo-api/vendor/workerman/workerman/../Protocols/Text.php", 0x7ffcd2244a50) = -1 ENOENT (No such file or directory)
    access("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Protocols/Text.php", F_OK) = 0
    lstat("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Protocols/Text.php", {st_mode=S_IFREG|0664, st_size=1746, ...}) = 0
    open("/var/www/xxx-promo-api/vendor/workerman/workerman/Protocols/Text.php", O_RDONLY) = 8
    fstat(8, {st_mode=S_IFREG|0664, st_size=1746, ...}) = 0
    fstat(8, {st_mode=S_IFREG|0664, st_size=1746, ...}) = 0
    fstat(8, {st_mode=S_IFREG|0664, st_size=1746, ...}) = 0
    mmap(NULL, 1746, PROT_READ, MAP_SHARED, 8, 0) = 0x7fba33eb5000
    munmap(0x7fba33eb5000, 1746) = 0
    close(8) = 0
    socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 8
    setsockopt(8, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
    bind(8, {sa_family=AF_INET, sin_port=htons(8888), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
    listen(8, 102400) = 0
    getsockopt(8, SOL_SOCKET, 0x27 / SO_??? /, [2], [4]) = 0
    fcntl(8, F_GETFL) = 0x2 (flags O_RDWR)
    setsockopt(8, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
    setsockopt(8, SOL_TCP, TCP_NODELAY, [1], 4) = 0
    fcntl(8, F_GETFL) = 0x2 (flags O_RDWR)
    fcntl(8, F_SETFL, O_RDWR|O_NONBLOCK) = 0
    rt_sigaction(SIGINT, {0x7fba341d8820, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_INTERRUPT|SA_SIGINFO, 0x7fba30a40250}, NULL, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [INT], NULL, 8) = 0
    rt_sigaction(SIGTERM, {0x7fba341d8820, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_INTERRUPT|SA_SIGINFO, 0x7fba30a40250}, NULL, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [TERM], NULL, 8) = 0
    rt_sigaction(SIGHUP, {0x7fba341d8820, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_INTERRUPT|SA_SIGINFO, 0x7fba30a40250}, NULL, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [HUP], NULL, 8) = 0
    rt_sigaction(SIGUSR1, {0x7fba341d8820, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_INTERRUPT|SA_SIGINFO, 0x7fba30a40250}, NULL, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [USR1], NULL, 8) = 0
    rt_sigaction(SIGQUIT, {0x7fba341d8820, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_INTERRUPT|SA_SIGINFO, 0x7fba30a40250}, NULL, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [QUIT], NULL, 8) = 0
    rt_sigaction(SIGUSR2, {0x7fba341d8820, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_INTERRUPT|SA_SIGINFO, 0x7fba30a40250}, NULL, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [USR2], NULL, 8) = 0
    rt_sigaction(SIGIO, {0x7fba341d8820, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_INTERRUPT|SA_SIGINFO, 0x7fba30a40250}, NULL, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [IO], NULL, 8) = 0
    rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0x7fba30a40250}, NULL, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [PIPE], NULL, 8) = 0
    lstat("/var/www/xxx-promo-api/runtime/webman.pid", 0x7ffcd2241d10) = -1 ENOENT (No such file or directory)
    open("/var/www/xxx-promo-api/runtime/webman.pid", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 9
    fstat(9, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
    lseek(9, 0, SEEK_CUR) = 0
    write(9, "29512", 5) = 5
    close(9) = 0
    fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 12), ...}) = 0
    ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B9600 opost isig icanon echo ...}) = 0
    ----------------------------------------- WORKERMAN -----------------------------------------
    Workerman version:4.0.28 PHP version:7.3.27
    ------------------------------------------ WORKERS ------------------------------------------
    ) = 277
    fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 12), ...}) = 0
    ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B9600 opost isig icanon echo ...}) = 0
    write(1, "\33[47;30mproto\33[0m \33[47;30muser"..., 166proto user worker listen processes status
    ) = 166
    fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 12), ...}) = 0
    ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B9600 opost isig icanon echo ...}) = 0
    write(1, "tcp centos webman "..., 106tcp centos webman http://0.0.0.0:8787 10 [OK]
    ) = 106
    fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 12), ...}) = 0
    ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B9600 opost isig icanon echo ...}) = 0
    write(1, "tcp centos monitor "..., 106tcp centos monitor none 1 [OK]
    ) = 106
    fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 12), ...}) = 0
    ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B9600 opost isig icanon echo ...}) = 0
    write(1, "tcp centos task "..., 106tcp centos task text://0.0.0.0:8888 2 [OK]
    ) = 106
    fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 12), ...}) = 0
    ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B9600 opost isig icanon echo ...}) = 0
    write(1, "--------------------------------"..., 94---------------------------------------------------------------------------------------------
    ) = 94
    fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 12), ...}) = 0
    ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B9600 opost isig icanon echo ...}) = 0
    write(1, "Press Ctrl+C to stop. Start succ"..., 37Press Ctrl+C to stop. Start success.
    ) = 37
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba33ea2b10) = 29539
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba33ea2b10) = 29540
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba33ea2b10) = 29541
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba33ea2b10) = 29542
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba33ea2b10) = 29543
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba33ea2b10) = 29544
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba33ea2b10) = 29545
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba33ea2b10) = 29546
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba33ea2b10) = 29547
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba33ea2b10) = 29549
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba33ea2b10) = 29550
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba33ea2b10) = 29551
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fba33ea2b10) = 29552
    wait4(-1,

  • walkor 2022-02-25

    再执行下 strace php start.php start -d (有个-d),截图下后半部分

  • evilk 2022-02-25

    stat("/usr/share/zoneinfo/Indian/Reunion", {st_mode=S_IFREG|0644, st_size=157, ...}) = 0
    stat("/usr/share/zoneinfo/Indian/Mayotte", {st_mode=S_IFREG|0644, st_size=269, ...}) = 0
    stat("/usr/share/zoneinfo/Indian/Mauritius", {st_mode=S_IFREG|0644, st_size=239, ...}) = 0
    stat("/usr/share/zoneinfo/Indian/Maldives", {st_mode=S_IFREG|0644, st_size=178, ...}) = 0
    stat("/usr/share/zoneinfo/Indian/Mahe", {st_mode=S_IFREG|0644, st_size=157, ...}) = 0
    stat("/usr/share/zoneinfo/Indian/Kerguelen", {st_mode=S_IFREG|0644, st_size=159, ...}) = 0
    stat("/usr/share/zoneinfo/Indian/Comoro", {st_mode=S_IFREG|0644, st_size=269, ...}) = 0
    stat("/usr/share/zoneinfo/Indian/Cocos", {st_mode=S_IFREG|0644, st_size=143, ...}) = 0
    stat("/usr/share/zoneinfo/Indian/Christmas", {st_mode=S_IFREG|0644, st_size=140, ...}) = 0
    stat("/usr/share/zoneinfo/Indian/Chagos", {st_mode=S_IFREG|0644, st_size=187, ...}) = 0
    stat("/usr/share/zoneinfo/Indian/Antananarivo", {st_mode=S_IFREG|0644, st_size=269, ...}) = 0
    openat(AT_FDCWD, "/usr/share/zoneinfo/Mexico", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
    getdents(4, / 5 entries /, 32768) = 144
    getdents(4, / 0 entries /, 32768) = 0
    close(4) = 0
    stat("/usr/share/zoneinfo/Mexico/General", {st_mode=S_IFREG|0644, st_size=1604, ...}) = 0
    stat("/usr/share/zoneinfo/Mexico/BajaSur", {st_mode=S_IFREG|0644, st_size=1550, ...}) = 0
    stat("/usr/share/zoneinfo/Mexico/BajaNorte", {st_mode=S_IFREG|0644, st_size=2342, ...}) = 0
    openat(AT_FDCWD, "/usr/share/zoneinfo/Pacific", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
    getdents(4, / 45 entries /, 32768) = 1368
    getdents(4, / 0 entries /, 32768) = 0
    close(4) = 0
    stat("/usr/share/zoneinfo/Pacific/Yap", {st_mode=S_IFREG|0644, st_size=144, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Wallis", {st_mode=S_IFREG|0644, st_size=141, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Wake", {st_mode=S_IFREG|0644, st_size=144, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Truk", {st_mode=S_IFREG|0644, st_size=144, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Tongatapu", {st_mode=S_IFREG|0644, st_size=313, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Tarawa", {st_mode=S_IFREG|0644, st_size=144, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Tahiti", {st_mode=S_IFREG|0644, st_size=160, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Samoa", {st_mode=S_IFREG|0644, st_size=250, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Saipan", {st_mode=S_IFREG|0644, st_size=199, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Rarotonga", {st_mode=S_IFREG|0644, st_size=548, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Port_Moresby", {st_mode=S_IFREG|0644, st_size=163, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Ponape", {st_mode=S_IFREG|0644, st_size=144, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Pohnpei", {st_mode=S_IFREG|0644, st_size=144, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Pitcairn", {st_mode=S_IFREG|0644, st_size=177, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Palau", {st_mode=S_IFREG|0644, st_size=140, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Pago_Pago", {st_mode=S_IFREG|0644, st_size=250, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Noumea", {st_mode=S_IFREG|0644, st_size=300, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Norfolk", {st_mode=S_IFREG|0644, st_size=263, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Niue", {st_mode=S_IFREG|0644, st_size=200, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Nauru", {st_mode=S_IFREG|0644, st_size=240, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Midway", {st_mode=S_IFREG|0644, st_size=250, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Marquesas", {st_mode=S_IFREG|0644, st_size=162, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Majuro", {st_mode=S_IFREG|0644, st_size=171, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Kwajalein", {st_mode=S_IFREG|0644, st_size=211, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Kosrae", {st_mode=S_IFREG|0644, st_size=204, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Kiritimati", {st_mode=S_IFREG|0644, st_size=204, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Johnston", {st_mode=S_IFREG|0644, st_size=250, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Honolulu", {st_mode=S_IFREG|0644, st_size=250, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Guam", {st_mode=S_IFREG|0644, st_size=199, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Guadalcanal", {st_mode=S_IFREG|0644, st_size=158, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Gambier", {st_mode=S_IFREG|0644, st_size=159, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Galapagos", {st_mode=S_IFREG|0644, st_size=197, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Funafuti", {st_mode=S_IFREG|0644, st_size=141, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Fiji", {st_mode=S_IFREG|0644, st_size=1059, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Fakaofo", {st_mode=S_IFREG|0644, st_size=171, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Enderbury", {st_mode=S_IFREG|0644, st_size=204, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Efate", {st_mode=S_IFREG|0644, st_size=464, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Easter", {st_mode=S_IFREG|0644, st_size=8991, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Chuuk", {st_mode=S_IFREG|0644, st_size=144, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Chatham", {st_mode=S_IFREG|0644, st_size=2031, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Bougainville", {st_mode=S_IFREG|0644, st_size=253, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Auckland", {st_mode=S_IFREG|0644, st_size=2434, ...}) = 0
    stat("/usr/share/zoneinfo/Pacific/Apia", {st_mode=S_IFREG|0644, st_size=1080, ...}) = 0
    openat(AT_FDCWD, "/usr/share/zoneinfo/US", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
    getdents(4, / 15 entries /, 32768) = 472
    getdents(4, / 0 entries /, 32768) = 0
    close(4) = 0
    stat("/usr/share/zoneinfo/US/Samoa", {st_mode=S_IFREG|0644, st_size=250, ...}) = 0
    stat("/usr/share/zoneinfo/US/Pacific-New", {st_mode=S_IFREG|0644, st_size=2819, ...}) = 0
    stat("/usr/share/zoneinfo/US/Pacific", {st_mode=S_IFREG|0644, st_size=2819, ...}) = 0
    stat("/usr/share/zoneinfo/US/Mountain", {st_mode=S_IFREG|0644, st_size=2427, ...}) = 0
    stat("/usr/share/zoneinfo/US/Michigan", {st_mode=S_IFREG|0644, st_size=2202, ...}) = 0
    stat("/usr/share/zoneinfo/US/Indiana-Starke", {st_mode=S_IFREG|0644, st_size=2411, ...}) = 0
    stat("/usr/share/zoneinfo/US/Hawaii", {st_mode=S_IFREG|0644, st_size=250, ...}) = 0
    stat("/usr/share/zoneinfo/US/Eastern", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
    stat("/usr/share/zoneinfo/US/East-Indiana", {st_mode=S_IFREG|0644, st_size=1649, ...}) = 0
    stat("/usr/share/zoneinfo/US/Central", {st_mode=S_IFREG|0644, st_size=3559, ...}) = 0
    stat("/usr/share/zoneinfo/US/Arizona", {st_mode=S_IFREG|0644, st_size=327, ...}) = 0
    stat("/usr/share/zoneinfo/US/Aleutian", {st_mode=S_IFREG|0644, st_size=2339, ...}) = 0
    stat("/usr/share/zoneinfo/US/Alaska", {st_mode=S_IFREG|0644, st_size=2358, ...}) = 0
    open("/usr/share/zoneinfo/zone.tab", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0644, st_size=19013, ...}) = 0
    mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0757256000
    read(4, "# tz zone descriptions (deprecat"..., 4096) = 4096
    read(4, "-2332-04637\tAmerica/Sao_Paulo\tBr"..., 4096) = 4096
    read(4, "\nGF\t+0456-05220\tAmerica/Cayenne\n"..., 4096) = 4096
    read(4, "entral Time - Bahia de Banderas\n"..., 4096) = 4096
    read(4, "218\tEurope/Uzhgorod\tRuthenia\nUA\t"..., 4096) = 2629
    read(4, "", 4096) = 0
    close(4) = 0
    munmap(0x7f0757256000, 4096) = 0
    access("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Worker.php", F_OK) = 0
    lstat("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Worker.php", {st_mode=S_IFREG|0664, st_size=81231, ...}) = 0
    lstat("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    open("/var/www/xxx-promo-api/vendor/workerman/workerman/Worker.php", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0664, st_size=81231, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=81231, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=81231, ...}) = 0
    mmap(NULL, 81231, PROT_READ, MAP_SHARED, 4, 0) = 0x7f07571a4000
    munmap(0x7f07571a4000, 81231) = 0
    close(4) = 0
    lstat("/var/www/xxx-promo-api/vendor/workerman/workerman/Lib/Constants.php", {st_mode=S_IFREG|0664, st_size=1203, ...}) = 0
    lstat("/var/www/xxx-promo-api/vendor/workerman/workerman/Lib", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    lstat("/var/www/xxx-promo-api/vendor/workerman/workerman", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    lstat("/var/www/xxx-promo-api/vendor/workerman", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    open("/var/www/xxx-promo-api/vendor/workerman/workerman/Lib/Constants.php", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0664, st_size=1203, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=1203, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=1203, ...}) = 0
    mmap(NULL, 1203, PROT_READ, MAP_SHARED, 4, 0) = 0x7f0757256000
    munmap(0x7f0757256000, 1203) = 0
    close(4) = 0
    access("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Connection/TcpConnection.php", F_OK) = 0
    lstat("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Connection/TcpConnection.php", {st_mode=S_IFREG|0664, st_size=26462, ...}) = 0
    lstat("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Connection", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    open("/var/www/xxx-promo-api/vendor/workerman/workerman/Connection/TcpConnection.php", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0664, st_size=26462, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=26462, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=26462, ...}) = 0
    mmap(NULL, 26462, PROT_READ, MAP_SHARED, 4, 0) = 0x7f07571fa000
    munmap(0x7f07571fa000, 26462) = 0
    close(4) = 0
    access("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Connection/ConnectionInterface.php", F_OK) = 0
    lstat("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Connection/ConnectionInterface.php", {st_mode=S_IFREG|0664, st_size=2388, ...}) = 0
    open("/var/www/xxx-promo-api/vendor/workerman/workerman/Connection/ConnectionInterface.php", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0664, st_size=2388, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=2388, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=2388, ...}) = 0
    mmap(NULL, 2388, PROT_READ, MAP_SHARED, 4, 0) = 0x7f0757256000
    munmap(0x7f0757256000, 2388) = 0
    close(4) = 0
    access("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Autoloader.php", F_OK) = 0
    lstat("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Autoloader.php", {st_mode=S_IFREG|0664, st_size=1855, ...}) = 0
    open("/var/www/xxx-promo-api/vendor/workerman/workerman/Autoloader.php", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0664, st_size=1855, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=1855, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=1855, ...}) = 0
    mmap(NULL, 1855, PROT_READ, MAP_SHARED, 4, 0) = 0x7f0757256000
    munmap(0x7f0757256000, 1855) = 0
    close(4) = 0
    stat("/var/www/xxx-promo-api/runtime/logs/workerman.log", {st_mode=S_IFREG|0622, st_size=44197, ...}) = 0
    access("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Lib/Timer.php", F_OK) = 0
    lstat("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Lib/Timer.php", {st_mode=S_IFREG|0664, st_size=667, ...}) = 0
    lstat("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Lib", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    open("/var/www/xxx-promo-api/vendor/workerman/workerman/Lib/Timer.php", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0664, st_size=667, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=667, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=667, ...}) = 0
    mmap(NULL, 667, PROT_READ, MAP_SHARED, 4, 0) = 0x7f0757256000
    munmap(0x7f0757256000, 667) = 0
    close(4) = 0
    access("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Timer.php", F_OK) = 0
    lstat("/var/www/xxx-promo-api/vendor/composer/../workerman/workerman/Timer.php", {st_mode=S_IFREG|0664, st_size=5523, ...}) = 0
    open("/var/www/xxx-promo-api/vendor/workerman/workerman/Timer.php", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0664, st_size=5523, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=5523, ...}) = 0
    fstat(4, {st_mode=S_IFREG|0664, st_size=5523, ...}) = 0
    mmap(NULL, 5523, PROT_READ, MAP_SHARED, 4, 0) = 0x7f0757255000
    munmap(0x7f0757255000, 5523) = 0
    close(4) = 0
    rt_sigaction(SIGALRM, {0x7f0757579820, ~[ILL TRAP ABRT BUS FPE KILL SEGV CONT STOP TSTP TTIN TTOU SYS RTMIN RT_1], SA_RESTORER|SA_INTERRUPT|SA_SIGINFO, 0x7f0753de1250}, NULL, 8) = 0
    rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 8) = 0
    fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 12), ...}) = 0
    ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B9600 opost isig icanon echo ...}) = 0
    write(1, "Workerman[start.php] start in DA"..., 42Workerman[start.php] start in DAEMON mode
    ) = 42
    open("/usr/share/zoneinfo/Asia/Shanghai", O_RDONLY) = 4
    fstat(4, {st_mode=S_IFREG|0644, st_size=388, ...}) = 0
    read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 20) = 20
    lseek(4, 0, SEEK_SET) = 0
    mmap(NULL, 388, PROT_READ, MAP_SHARED, 4, 0) = 0x7f0757256000
    close(4) = 0
    munmap(0x7f0757256000, 388) = 0
    lstat("/var/www/xxx-promo-api/runtime/logs/workerman.log", {st_mode=S_IFREG|0622, st_size=44197, ...}) = 0
    lstat("/var/www/xxx-promo-api/runtime/logs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    lstat("/var/www/xxx-promo-api/runtime", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 4
    fstat(4, {st_mode=S_IFREG|0622, st_size=44197, ...}) = 0
    lseek(4, 0, SEEK_CUR) = 0
    lseek(4, 0, SEEK_CUR) = 0
    flock(4, LOCK_EX) = 0
    write(4, "2022-02-25 11:43:20 pid:29971 Wo"..., 72) = 72
    close(4) = 0
    stat("/var/www/xxx-promo-api/runtime/webman.pid", 0x7ffc45f5b100) = -1 ENOENT (No such file or directory)
    umask(077) = 02
    umask(0) = 077
    clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f0757243b10) = 29978
    umask(02) = 0
    close(0) = 0
    munmap(0x7f0735600000, 2097152) = 0
    munmap(0x7f0738def000, 2718912) = 0
    munmap(0x7f0738bec000, 2105408) = 0
    munmap(0x7f07389d7000, 2179400) = 0
    munmap(0x7f0739087000, 2147304) = 0
    munmap(0x7f0737174000, 2113968) = 0
    munmap(0x7f0737737000, 2122104) = 0
    munmap(0x7f0737379000, 3923240) = 0
    futex(0x7f07397f3b90, FUTEX_WAKE_PRIVATE, 2147483647) = 0
    munmap(0x7f073949a000, 3524608) = 0
    munmap(0x7f0739294000, 2117912) = 0
    munmap(0x7f073a282000, 2222168) = 0
    munmap(0x7f073a079000, 2130720) = 0
    munmap(0x7f0739c42000, 2113920) = 0
    munmap(0x7f0739e47000, 2299312) = 0
    munmap(0x7f0739a3f000, 2105400) = 0
    munmap(0x7f07397f7000, 2389000) = 0
    munmap(0x7f073a774000, 2119312) = 0
    munmap(0x7f073a4a1000, 2960176) = 0
    munmap(0x7f073ab96000, 2168432) = 0
    munmap(0x7f073a97a000, 2209616) = 0
    ----------------------------------------- WORKERMAN -----------------------------------------
    Workerman version:4.0.28 PHP version:7.3.27
    ------------------------------------------ WORKERS ------------------------------------------
    proto user worker listen processes status
    tcp centos webman http://0.0.0.0:8787 10 [OK]
    tcp centos monitor none 1 [OK]
    tcp centos task text://0.0.0.0:8888 2 [OK]

    Input "php start.php stop" to stop. Start success.

    ) = 0
    munmap(0x7f073b6b6000, 2186656) = 0
    munmap(0x7f073b8cc000, 2164864) = 0
    munmap(0x7f073badd000, 2199280) = 0
    munmap(0x7f073bcf6000, 2257712) = 0
    futex(0x7f0757212350, FUTEX_WAKE_PRIVATE, 1) = 1
    futex(0x7f0757212350, FUTEX_WAKE_PRIVATE, 1) = 1
    futex(0x7f0757211750, FUTEX_WAKE_PRIVATE, 1) = 1
    futex(0x7f0757211d50, FUTEX_WAKE_PRIVATE, 1) = 1
    close(5) = 0
    close(7) = 0
    munmap(0x7f073bf1e000, 7796080) = 0
    munmap(0x7f073c8be000, 2118976) = 0
    munmap(0x7f073c68e000, 2290768) = 0
    munmap(0x7f073d115000, 2270600) = 0
    munmap(0x7f073cf0f000, 2118296) = 0
    munmap(0x7f073ccef000, 2226024) = 0
    munmap(0x7f073cac4000, 2272984) = 0
    munmap(0x7f073d579000, 2149176) = 0
    munmap(0x7f073d340000, 2328432) = 0
    munmap(0x7f073d786000, 2183984) = 0
    munmap(0x7f073d99c000, 2177824) = 0
    munmap(0x7f073dbb0000, 2126920) = 0
    munmap(0x7f073ddb8000, 2126608) = 0
    munmap(0x7f073dfc0000, 2122672) = 0
    munmap(0x7f073e1c7000, 2122360) = 0
    munmap(0x7f073e3ce000, 2231336) = 0
    munmap(0x7f073e821000, 2139072) = 0
    munmap(0x7f073e5ef000, 2301952) = 0
    munmap(0x7f073ea2c000, 2180968) = 0
    munmap(0x7f073f51b000, 2127048) = 0
    munmap(0x7f073f306000, 2180328) = 0
    munmap(0x7f073f0c7000, 2351336) = 0
    munmap(0x7f073ee46000, 2621456) = 0
    munmap(0x7f073ec41000, 2113656) = 0
    munmap(0x7f073f723000, 2143168) = 0
    munmap(0x7f073f92f000, 2147184) = 0
    munmap(0x7f073fb3c000, 2113968) = 0
    munmap(0x7f073fd41000, 2109904) = 0
    munmap(0x7f073ff45000, 2105680) = 0
    munmap(0x7f0740148000, 2109904) = 0
    munmap(0x7f0740601000, 2144200) = 0
    munmap(0x7f074034c000, 2836216) = 0
    munmap(0x7f0740a23000, 2399112) = 0
    munmap(0x7f0740c6d000, 2147568) = 0
    munmap(0x7f0740e7a000, 2109816) = 0
    munmap(0x7f074107e000, 2130672) = 0
    munmap(0x7f0741287000, 2366144) = 0
    munmap(0x7f07414c9000, 2205760) = 0
    munmap(0x7f074947f000, 2179888) = 0
    munmap(0x7f074483d000, 2580192) = 0
    munmap(0x7f07420c1000, 2151248) = 0
    munmap(0x7f0744359000, 5125608) = 0
    munmap(0x7f0743f7f000, 4035680) = 0
    munmap(0x7f07422cf000, 30076976) = 0
    munmap(0x7f0745403000, 2188936) = 0
    munmap(0x7f07450f0000, 3220968) = 0
    munmap(0x7f0744ee1000, 2155088) = 0
    munmap(0x7f0744cb9000, 2257704) = 0
    munmap(0x7f0744ab3000, 2118016) = 0
    munmap(0x7f074561a000, 2138904) = 0
    munmap(0x7f0745a9d000, 2164200) = 0
    munmap(0x7f0745825000, 2584736) = 0
    munmap(0x7f0745cae000, 2109808) = 0
    munmap(0x7f0748929000, 2201016) = 0
    munmap(0x7f07486c0000, 2524136) = 0
    munmap(0x7f0748170000, 2168016) = 0
    munmap(0x7f0748382000, 3399168) = 0
    munmap(0x7f074782c000, 2113872) = 0
    munmap(0x7f07475ef000, 2344552) = 0
    munmap(0x7f074737b000, 2568624) = 0
    munmap(0x7f0747cf0000, 2441920) = 0
    munmap(0x7f074710b000, 2553184) = 0
    munmap(0x7f0746ee9000, 2233224) = 0
    munmap(0x7f0746c4c000, 2738160) = 0
    munmap(0x7f0747a31000, 2877416) = 0
    munmap(0x7f0747f45000, 2270248) = 0
    munmap(0x7f0746a30000, 2208088) = 0
    munmap(0x7f0746806000, 2265312) = 0
    munmap(0x7f07465fa000, 2145256) = 0
    munmap(0x7f07463f6000, 2109736) = 0
    munmap(0x7f0745eb2000, 2281760) = 0
    munmap(0x7f0748b43000, 2155472) = 0
    munmap(0x7f0748d52000, 7522312) = 0
    munmap(0x7f0741bb5000, 3146632) = 0
    munmap(0x7f0741923000, 2694472) = 0
    munmap(0x7f0749694000, 2257304) = 0
    munmap(0x7f074b827000, 2109680) = 0
    munmap(0x7f074ba2b000, 2126224) = 0
    munmap(0x7f074be43000, 2118352) = 0
    munmap(0x7f074c049000, 2126336) = 0
    munmap(0x7f072c23b000, 20975616) = 0
    munmap(0x7f072823a000, 67112960) = 0
    close(3) = 0
    munmap(0x7f07571c8000, 196608) = 0
    munmap(0x7f074c251000, 2645144) = 0
    munmap(0x7f0752a00000, 2097152) = 0
    munmap(0x7f0730282000, 20975616) = 0
    munmap(0x7f0757221000, 135168) = 0
    exit_group(0) = ?
    +++ exited with 0 +++

  • walkor 2022-02-25

    每次start -d 后 执行 stop都提示失败?

  • evilk 2022-02-25

    是的

  • evilk 2022-02-25

    我怀疑是 php 版本

  • evilk 2022-02-25

    截图内容,都是正常的吗?

  • evilk 2022-02-25

    服务器还有swoft,之前php版本是7.1,后来升级到PHP7.3.27之后,swoft也出现stop fail,所以,我们怀疑是PHP版本的问题

  • walkor 2022-02-25

    把有嫌疑的扩展暂时从php.ini里注释掉试下。我这没有环境不好给你定位。

  • walkor 2022-02-25

    strace内容看起来正常

  • evilk 2022-02-25

    那我试试 strace php start.php stop ?

  • walkor 2022-02-25

    开三个终端一个 strace -ttp 主进程pid,另外一个strace -ttp 子进程pid,再开一个执行 php start.php stop (不用strace)。
    贴下前两个strace终端的结果

  • evilk 2022-02-25

    centos 3022 0.0 1.7 871868 143688 ? Ss 12:42 0:00 WorkerMan: master process start_file=/var/www/xxx-promo-api/start.php
    centos 3023 0.1 1.8 929492 145616 ? S 12:42 0:00 WorkerMan: master process start_file=/var/www/xxx-promo-api/start.php
    centos 3024 0.0 1.8 933624 149492 ? R 12:42 0:00 WorkerMan: worker process webman http://0.0.0.0:8787
    centos 3025 0.0 1.8 933588 149284 ? S 12:42 0:00 WorkerMan: worker process webman http://0.0.0.0:8787
    centos 3026 0.0 1.8 933588 150468 ? S 12:42 0:00 WorkerMan: worker process webman http://0.0.0.0:8787
    centos 3027 0.1 1.8 933588 150156 ? R 12:42 0:00 WorkerMan: worker process webman http://0.0.0.0:8787
    centos 3028 0.0 1.8 933588 149284 ? S 12:42 0:00 WorkerMan: worker process webman http://0.0.0.0:8787
    centos 3029 0.0 1.8 933588 149284 ? S 12:42 0:00 WorkerMan: worker process webman http://0.0.0.0:8787
    centos 3030 0.1 1.8 933588 149284 ? S 12:42 0:00 WorkerMan: worker process webman http://0.0.0.0:8787
    centos 3031 0.1 1.8 933588 149284 ? S 12:42 0:00 WorkerMan: worker process webman http://0.0.0.0:8787
    centos 3032 0.1 1.8 933588 149284 ? S 12:42 0:00 WorkerMan: worker process webman http://0.0.0.0:8787
    centos 3033 0.1 1.8 933588 149284 ? S 12:42 0:00 WorkerMan: worker process webman http://0.0.0.0:8787
    centos 3034 0.0 1.8 931540 147680 ? S 12:42 0:00 WorkerMan: worker process monitor none
    centos 3035 0.0 1.8 931540 147388 ? S 12:42 0:00 WorkerMan: worker process task text://0.0.0.0:8888
    centos 3036 0.0 1.8 931540 147388 ? S 12:42 0:00 WorkerMan: worker process task text://0.0.0.0:8888
    centos 3213 0.0 0.0 112664 972 pts/15 R+ 12:43 0:00 grep --color=auto WorkerMan

    3022:
    strace -ttp 3022
    Process 3022 attached
    12:44:54.462022 futex(0x7fca4a813150, FUTEX_WAIT_PRIVATE, 0, NULL

    3023:
    strace -ttp 3023
    Process 3023 attached
    12:45:33.638960 wait4(-1, 0x7ffc8a208504, WSTOPPED, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
    12:45:49.828790 --- SIGINT {si_signo=SIGINT, si_code=SI_USER, si_pid=3549, si_uid=1000} ---
    12:45:49.828918 rt_sigreturn() = -1 EINTR (Interrupted system call)
    12:45:49.829025 rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
    12:45:49.829201 lstat("/var/www/xxx-promo-api/runtime/logs/workerman.log", {st_mode=S_IFREG|0622, st_size=45917, ...}) = 0
    12:45:49.829305 lstat("/var/www/xxx-promo-api/runtime/logs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    12:45:49.829432 lstat("/var/www/xxx-promo-api/runtime", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    12:45:49.829602 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:49.829766 fstat(9, {st_mode=S_IFREG|0622, st_size=45917, ...}) = 0
    12:45:49.829993 lseek(9, 0, SEEK_CUR) = 0
    12:45:49.830174 lseek(9, 0, SEEK_CUR) = 0
    12:45:49.830269 flock(9, LOCK_EX) = 0
    12:45:49.830407 write(9, "2022-02-25 12:45:49 pid:3023 Wor"..., 63) = 63
    12:45:49.830551 close(9) = 0
    12:45:49.830690 kill(3024, SIGINT) = 0
    12:45:49.830785 alarm(1) = 0
    12:45:49.830845 kill(3025, SIGINT) = 0
    12:45:49.830908 kill(3026, SIGINT) = 0
    12:45:49.834375 kill(3027, SIGINT) = 0
    12:45:49.838036 kill(3028, SIGINT) = 0
    12:45:49.838166 kill(3029, SIGINT) = 0
    12:45:49.841292 kill(3030, SIGINT) = 0
    12:45:49.844496 kill(3031, SIGINT) = 0
    12:45:49.844611 kill(3032, SIGINT) = 0
    12:45:49.844654 kill(3033, SIGINT) = 0
    12:45:49.847846 kill(3034, SIGINT) = 0
    12:45:49.847912 kill(3035, SIGINT) = 0
    12:45:49.850594 kill(3036, SIGINT) = 0
    12:45:49.853230 stat("/var/www/xxx-promo-api/vendor/workerman/workerman/../workerman-3023.status", {st_mode=S_IFREG|0722, st_size=2829, ...}) = 0
    12:45:49.853304 unlink("/var/www/xxx-promo-api/vendor/workerman/workerman/../workerman-3023.status") = 0
    12:45:49.853411 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    12:45:49.853446 wait4(-1, 0x7ffc8a208504, WSTOPPED, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
    12:45:50.831087 --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL, si_value={int=3942831704, ptr=0x7f95eb02d658}} ---
    12:45:50.831426 rt_sigreturn() = -1 EINTR (Interrupted system call)
    12:45:50.831562 rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
    12:45:50.831695 alarm(1) = 0
    12:45:50.831896 kill(3024, SIG_0) = 0
    12:45:50.832076 kill(3025, SIG_0) = 0
    12:45:50.832174 kill(3026, SIG_0) = 0
    12:45:50.832275 kill(3027, SIG_0) = 0
    12:45:50.832473 kill(3028, SIG_0) = 0
    12:45:50.832723 kill(3029, SIG_0) = 0
    12:45:50.832806 kill(3030, SIG_0) = 0
    12:45:50.832965 kill(3031, SIG_0) = 0
    12:45:50.833048 kill(3032, SIG_0) = 0
    12:45:50.833134 kill(3033, SIG_0) = 0
    12:45:50.833269 kill(3034, SIG_0) = 0
    12:45:50.833407 kill(3035, SIG_0) = 0
    12:45:50.833457 kill(3036, SIG_0) = 0
    12:45:50.833517 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    12:45:50.833574 wait4(-1, 0x7ffc8a208504, WSTOPPED, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
    12:45:51.831953 --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL, si_value={int=3942831704, ptr=0x7f95eb02d658}} ---
    12:45:51.832049 rt_sigreturn() = -1 EINTR (Interrupted system call)
    12:45:51.832122 rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
    12:45:51.832319 alarm(1) = 0
    12:45:51.832488 kill(3024, SIGKILL) = 0
    12:45:51.834049 kill(3025, SIGKILL) = 0
    12:45:51.834119 kill(3026, SIGKILL) = 0
    12:45:51.838464 kill(3027, SIGKILL) = 0
    12:45:51.842317 kill(3028, SIGKILL) = 0
    12:45:51.842380 kill(3029, SIGKILL) = 0
    12:45:51.846710 kill(3030, SIGKILL) = 0
    12:45:51.850730 kill(3031, SIGKILL) = 0
    12:45:51.852061 kill(3032, SIGKILL) = 0
    12:45:51.855819 kill(3033, SIGKILL) = 0
    12:45:51.859612 kill(3034, SIGKILL) = 0
    12:45:51.861016 kill(3035, SIGKILL) = 0
    12:45:51.861073 kill(3036, SIGKILL) = 0
    12:45:51.861125 kill(3024, SIG_0) = 0
    12:45:51.861177 kill(3025, SIG_0) = 0
    12:45:51.861214 kill(3026, SIG_0) = 0
    12:45:51.861251 kill(3027, SIG_0) = 0
    12:45:51.861287 kill(3028, SIG_0) = 0
    12:45:51.861330 kill(3029, SIG_0) = 0
    12:45:51.861366 kill(3030, SIG_0) = 0
    12:45:51.861402 kill(3031, SIG_0) = 0
    12:45:51.861438 kill(3032, SIG_0) = 0
    12:45:51.861480 kill(3033, SIG_0) = 0
    12:45:51.861523 kill(3034, SIG_0) = 0
    12:45:51.861560 kill(3035, SIG_0) = 0
    12:45:51.861595 kill(3036, SIG_0) = 0
    12:45:51.861674 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
    12:45:51.861729 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=3024, si_status=SIGKILL, si_utime=5, si_stime=1} ---
    12:45:51.861783 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED, NULL) = 3024
    12:45:51.861975 lstat("/var/www/xxx-promo-api/runtime/logs/workerman.log", {st_mode=S_IFREG|0622, st_size=45980, ...}) = 0
    12:45:51.862045 lstat("/var/www/xxx-promo-api/runtime/logs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    12:45:51.862086 lstat("/var/www/xxx-promo-api/runtime", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    12:45:51.862127 lstat("/var/www/xxx-promo-api", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    12:45:51.862166 lstat("/var/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    12:45:51.862205 lstat("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    12:45:51.862261 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.862329 fstat(9, {st_mode=S_IFREG|0622, st_size=45980, ...}) = 0
    12:45:51.862383 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.862432 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.862483 flock(9, LOCK_EX) = 0
    12:45:51.862537 write(9, "2022-02-25 12:45:51 pid:3023 wor"..., 68) = 68
    12:45:51.862606 close(9) = 0
    12:45:51.862679 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED, NULL) = 3025
    12:45:51.862803 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.862857 fstat(9, {st_mode=S_IFREG|0622, st_size=46048, ...}) = 0
    12:45:51.862926 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.862976 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.863031 flock(9, LOCK_EX) = 0
    12:45:51.863080 write(9, "2022-02-25 12:45:51 pid:3023 wor"..., 68) = 68
    12:45:51.863141 close(9) = 0
    12:45:51.863201 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED, NULL) = 3026
    12:45:51.863291 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.863338 fstat(9, {st_mode=S_IFREG|0622, st_size=46116, ...}) = 0
    12:45:51.863374 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.863407 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.863439 flock(9, LOCK_EX) = 0
    12:45:51.863472 write(9, "2022-02-25 12:45:51 pid:3023 wor"..., 68) = 68
    12:45:51.863510 close(9) = 0
    12:45:51.863551 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED, NULL) = 3027
    12:45:51.863629 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=3034, si_status=SIGKILL, si_utime=2, si_stime=3} ---
    12:45:51.863660 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.863698 fstat(9, {st_mode=S_IFREG|0622, st_size=46184, ...}) = 0
    12:45:51.863733 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.863766 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.863804 flock(9, LOCK_EX) = 0
    12:45:51.863846 write(9, "2022-02-25 12:45:51 pid:3023 wor"..., 68) = 68
    12:45:51.863918 close(9) = 0
    12:45:51.863974 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED, NULL) = 3028
    12:45:51.864096 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.864150 fstat(9, {st_mode=S_IFREG|0622, st_size=46252, ...}) = 0
    12:45:51.864187 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.864223 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.864256 flock(9, LOCK_EX) = 0
    12:45:51.864290 write(9, "2022-02-25 12:45:51 pid:3023 wor"..., 68) = 68
    12:45:51.864332 close(9) = 0
    12:45:51.864384 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED, NULL) = 3029
    12:45:51.864485 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.864532 fstat(9, {st_mode=S_IFREG|0622, st_size=46320, ...}) = 0
    12:45:51.864573 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.864616 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.864657 flock(9, LOCK_EX) = 0
    12:45:51.864692 write(9, "2022-02-25 12:45:51 pid:3023 wor"..., 68) = 68
    12:45:51.864733 close(9) = 0
    12:45:51.864775 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED, NULL) = 3030
    12:45:51.864865 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.864954 fstat(9, {st_mode=S_IFREG|0622, st_size=46388, ...}) = 0
    12:45:51.865015 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.865060 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.865105 flock(9, LOCK_EX) = 0
    12:45:51.865150 write(9, "2022-02-25 12:45:51 pid:3023 wor"..., 68) = 68
    12:45:51.865204 close(9) = 0
    12:45:51.865251 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED, NULL) = 3031
    12:45:51.865333 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.865376 fstat(9, {st_mode=S_IFREG|0622, st_size=46456, ...}) = 0
    12:45:51.865469 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.865511 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.865551 flock(9, LOCK_EX) = 0
    12:45:51.865590 write(9, "2022-02-25 12:45:51 pid:3023 wor"..., 68) = 68
    12:45:51.865631 close(9) = 0
    12:45:51.865672 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED, NULL) = 3032
    12:45:51.865751 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.865796 fstat(9, {st_mode=S_IFREG|0622, st_size=46524, ...}) = 0
    12:45:51.865835 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.865868 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.865912 flock(9, LOCK_EX) = 0
    12:45:51.865964 write(9, "2022-02-25 12:45:51 pid:3023 wor"..., 68) = 68
    12:45:51.866028 close(9) = 0
    12:45:51.866081 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED, NULL) = 3033
    12:45:51.866170 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.866225 fstat(9, {st_mode=S_IFREG|0622, st_size=46592, ...}) = 0
    12:45:51.866263 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.866296 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.866328 flock(9, LOCK_EX) = 0
    12:45:51.866361 write(9, "2022-02-25 12:45:51 pid:3023 wor"..., 68) = 68
    12:45:51.866403 close(9) = 0
    12:45:51.866455 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED, NULL) = 3034
    12:45:51.866544 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.866586 fstat(9, {st_mode=S_IFREG|0622, st_size=46660, ...}) = 0
    12:45:51.866621 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.866654 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.866686 flock(9, LOCK_EX) = 0
    12:45:51.866719 write(9, "2022-02-25 12:45:51 pid:3023 wor"..., 69) = 69
    12:45:51.866759 close(9) = 0
    12:45:51.866806 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED, NULL) = 3035
    12:45:51.871436 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=3035, si_status=SIGKILL, si_utime=2, si_stime=2} ---
    12:45:51.871567 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.871793 fstat(9, {st_mode=S_IFREG|0622, st_size=46729, ...}) = 0
    12:45:51.872008 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.872106 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.872172 flock(9, LOCK_EX) = 0
    12:45:51.872260 write(9, "2022-02-25 12:45:51 pid:3023 wor"..., 66) = 66
    12:45:51.872351 close(9) = 0
    12:45:51.872509 wait4(-1, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGKILL}], WSTOPPED, NULL) = 3036
    12:45:51.872729 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.872843 fstat(9, {st_mode=S_IFREG|0622, st_size=46795, ...}) = 0
    12:45:51.872956 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.873024 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.873080 flock(9, LOCK_EX) = 0
    12:45:51.873147 write(9, "2022-02-25 12:45:51 pid:3023 wor"..., 66) = 66
    12:45:51.873225 close(9) = 0
    12:45:51.873329 unlink("/var/www/xx-promo-api/runtime/webman.pid") = 0
    12:45:51.873473 lstat("/var/www/xxx-promo-api/runtime/logs/workerman.log", {st_mode=S_IFREG|0622, st_size=46861, ...}) = 0
    12:45:51.873547 lstat("/var/www/xxx-promo-api/runtime/logs", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    12:45:51.873616 lstat("/var/www/xxx-promo-api/runtime", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    12:45:51.873689 lstat("/var/www/xxx-promo-api", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
    12:45:51.873764 lstat("/var/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    12:45:51.873936 lstat("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    12:45:51.874063 open("/var/www/xxx-promo-api/runtime/logs/workerman.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 9
    12:45:51.874130 fstat(9, {st_mode=S_IFREG|0622, st_size=46861, ...}) = 0
    12:45:51.874219 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.874290 lseek(9, 0, SEEK_CUR) = 0
    12:45:51.874399 flock(9, LOCK_EX) = 0
    12:45:51.874540 write(9, "2022-02-25 12:45:51 pid:3023 Wor"..., 67) = 67
    12:45:51.874656 close(9) = 0
    12:45:51.874943 fstat(1, {st_mode=S_IFREG|0666, st_size=143531, ...}) = 0
    12:45:51.875042 write(1, "(null)(): supplied resource is n"..., 85) = 85
    12:45:51.875186 fstat(1, {st_mode=S_IFREG|0666, st_size=143616, ...}) = 0
    12:45:51.875281 write(1, "(null)(): supplied resource is n"..., 85) = 85
    12:45:51.875452 umask(02) = 0
    12:45:51.875628 close(2) = 0
    12:45:51.875810 close(1) = 0
    12:45:51.875928 close(8) = 0
    12:45:51.876084 close(4) = 0
    12:45:51.876254 close(0) = 0
    12:45:51.876791 munmap(0x7fca28c00000, 2097152) = 0
    12:45:51.877319 munmap(0x7fca2c3ef000, 2718912) = 0
    12:45:51.877388 munmap(0x7fca2c1ec000, 2105408) = 0
    12:45:51.877570 munmap(0x7fca2bfd7000, 2179400) = 0
    12:45:51.877771 munmap(0x7fca2c687000, 2147304) = 0
    12:45:51.878170 munmap(0x7fca2a774000, 2113968) = 0
    12:45:51.878460 munmap(0x7fca2ad37000, 2122104) = 0
    12:45:51.878597 munmap(0x7fca2a979000, 3923240) = 0
    12:45:51.878802 futex(0x7fca2cdf3b90, FUTEX_WAKE_PRIVATE, 2147483647) = 0
    12:45:51.879060 munmap(0x7fca2ca9a000, 3524608) = 0
    12:45:51.879339 munmap(0x7fca2c894000, 2117912) = 0
    12:45:51.879605 munmap(0x7fca2d882000, 2222168) = 0
    12:45:51.879812 munmap(0x7fca2d679000, 2130720) = 0
    12:45:51.879981 munmap(0x7fca2d242000, 2113920) = 0
    12:45:51.880198 munmap(0x7fca2d447000, 2299312) = 0
    12:45:51.880373 munmap(0x7fca2d03f000, 2105400) = 0
    12:45:51.880500 munmap(0x7fca2cdf7000, 2389000) = 0
    12:45:51.880664 munmap(0x7fca2dd74000, 2119312) = 0
    12:45:51.880860 munmap(0x7fca2daa1000, 2960176) = 0
    12:45:51.881097 munmap(0x7fca2e196000, 2168432) = 0
    12:45:51.881199 munmap(0x7fca2df7a000, 2209616) = 0
    12:45:51.881412 munmap(0x7fca2ea73000, 2367752) = 0
    12:45:51.881690 munmap(0x7fca2ecb6000, 2186656) = 0
    12:45:51.881834 munmap(0x7fca2eecc000, 2164864) = 0
    12:45:51.881976 munmap(0x7fca2f0dd000, 2199280) = 0
    12:45:51.882149 munmap(0x7fca2f2f6000, 2257712) = 0
    12:45:51.882397 futex(0x7fca4a814350, FUTEX_WAKE_PRIVATE, 1) = 0
    12:45:51.882512 futex(0x7fca4a813150, FUTEX_WAIT_PRIVATE, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
    12:45:52.832597 --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL, si_value={int=9, ptr=0x7f9500000009}} ---
    12:45:52.832680 rt_sigreturn() = -1 EINTR (Interrupted system call)
    12:45:52.832805 futex(0x7fca4a813150, FUTEX_WAIT_PRIVATE, 0, NULL

  • evilk 2022-02-25

    执行完是调皮,显示 stop fail之后,主进程和子进程,依然存在
    centos 3022 0.0 1.7 871868 143688 ? Ss 12:42 0:00 WorkerMan: master process start_file=/var/www/xxx-promo-api/start.php
    centos 3023 0.0 1.8 871868 145084 ? S 12:42 0:00 WorkerMan: master process start_file=/var/www/xxx-promo-api/start.php

  • walkor 2022-02-25

    最后阻塞在 futex ,感觉是进程等待某个锁的释放

  • evilk 2022-02-25

    可以给一个进一步的思路吗?

  • walkor 2022-02-25

    无法确定是哪里锁的。php -v 看下php是不是dev版本,用正式版本。去掉有嫌疑的扩展试下。
    不行就重装php

  • evilk 2022-02-25

    升级到 php7.3.33,还是不行,看来应该是某个扩展导致的,这没法定位是哪个扩展啊

  • walkor 2022-02-25

    如果是扩展问题,好定位,php.ini里面把所有有怀疑的扩展去掉基本就能确认了

  • walkor 2022-02-26

    grpc扩展导致的么?

  • evilk 2022-02-26


    问题找到了,安装了一个grpc的扩展,然后这个扩展必须要给对应的环境变量,不然fork的时候就会出现多一个挂载进程。给后来的同学参考:以后出现这类的问题,也可以考虑下安装的扩展本身在workman进行fork的时候带来的问题

zeus
ps -ef |grep "WorkerMan"

先查看下是否有用不同用户启动的WorkerMan进程。
如果有,则先全部杀掉。
然后在重新在 root 或者 www 用户下启动项目。

  • evilk 2022-02-25

    截图有显示,都是同一个用户组

evilk

排除了 apcu 和 opcache 扩展,依然stop fail

  • 暂无评论
年代过于久远,无法发表回答
🔝