Stories

Detail Return Return

[已解決]xdebug+phpStrom跳轉報錯導致閃退問題 - Stories Detail

解決方法:

phpStorm設置取消 _toString:

問題描述:

調試index.php的時候正常,但是跳轉到b.php裏的斷點以後:斷點閃退,並返回502

php-fpm報錯,log:

 WARNING: [pool www] child 13746 exited on signal 11 (SIGSEGV) after 148.756432 seconds from start

nginx返回502,log:

[error] 12950#12950: *10 recv() failed (104: Connection reset by peer) while reading response header from upstream, client

調試細節:

#strace -f -F -s1000 -t -T `ps aux | grep -E 'php' | awk '{print "-p" $2}' | xargs`
#tail /var/log/messages

log:

[pid 11885] 15:23:01 write(4, "[11885] [Step Debug] <- eval -i 142 -- KHN0cmluZykoJGN0cmwp\n", 60) = 60 <0.000044>
[pid 11885] 15:23:01 write(4, "[11885] [Step Debug] <- eval -i 136 -- JEdMT0JBTFNbJ0lERV9FVkFMX0NBQ0hFJ11bJzM0NDcwZGUwLTRmNTUtNDFmOC04YTlmLTA1NTRhNTl                                                                                        iYmNmNSddPWVycm9yX3JlcG9ydGluZygpOw==\n", 156) = 156 <0.000025>
[pid 11885] 15:23:01 recvfrom(5, "eval -i 142 -- KHN0cmluZykoJGN0cmwp\0", 128, 0, NULL, NULL) = 36 <0.001644>
[pid 11885] 15:23:01 write(4, "[11885] [Step Debug] <- eval -i 142 -- KHN0cmluZykoJGN0cmwp\n", 60) = 60 <0.000044>
[pid 11885] 15:23:01 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x14} ---
[pid 11885] 15:23:01 +++ killed by SIGSEGV +++
[pid 11852] 15:23:01 <... epoll_wait resumed> 0x1b3f9e0, 1, 1000) = -1 EINTR (Interrupted system call) <0.863932>
[pid 11852] 15:23:01 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=11885, si_uid=99, si_status=SIGSEGV, si_utime=5, si_stime=55} ---

參考:

'__toString BUG'

軟件版本:

  • php 7.2
  • phpStrom 2022.2.2
  • xdebug 3.1.5
user avatar rui_sen Avatar vanve Avatar sysin Avatar kinra Avatar gzh_macai Avatar
Favorites 5 users favorite the story!
Favorites

Add a new Comments

Some HTML is okay.