GithubHelp home page GithubHelp logo

Comments (19)

NathanFreeman avatar NathanFreeman commented on June 19, 2024

https://wiki.swoole.com/zh-cn/#/other/tools?id=gdb
https://wiki.swoole.com/zh-cn/#/other/issue?id=关于段错误核心转储
看看能不能通过gdb贴一下程序出现问题的栈堆

from swoole-src.

fpysky avatar fpysky commented on June 19, 2024

GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
https://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 35353
[New LWP 35357]
[New LWP 35358]
[New LWP 35359]
[New LWP 35360]
[New LWP 35361]
[New LWP 35362]
[New LWP 35363]
[New LWP 35364]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x0000701e81725e2e in epoll_wait (epfd=34, events=0x5a8a6efd1d70, maxevents=4096, timeout=1000) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
30 ../sysdeps/unix/sysv/linux/epoll_wait.c: 没有那个文件或目录.

from swoole-src.

fpysky avatar fpysky commented on June 19, 2024

GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word". Attaching to process 35353 [New LWP 35357] [New LWP 35358] [New LWP 35359] [New LWP 35360] [New LWP 35361] [New LWP 35362] [New LWP 35363] [New LWP 35364] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x0000701e81725e2e in epoll_wait (epfd=34, events=0x5a8a6efd1d70, maxevents=4096, timeout=1000) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30 30 ../sysdeps/unix/sysv/linux/epoll_wait.c: 没有那个文件或目录.

这是 gdb -p master进程ID

from swoole-src.

NathanFreeman avatar NathanFreeman commented on June 19, 2024

https://wiki.swoole.com/zh-cn/#/other/issue?id=关于段错误核心转储
看看能不能生成core文件,或者把SWOOLE_PROCESS模式换成SWOOLE_BASE模式,看看这问题还会不会发生

from swoole-src.

fpysky avatar fpysky commented on June 19, 2024

https://wiki.swoole.com/zh-cn/#/other/issue?id=关于段错误核心转储 看看能不能生成core文件,或者把SWOOLE_PROCESS模式换成SWOOLE_BASE模式,看看这问题还会不会发生

改成SWOOLE_BASE错误依旧,生成core文件要重新编译swoole扩展,不过我是通过apt install php8.1-swoole 这种方式安装的,重新编译相同版本的安装就不知道能不能复现了,我可以试试

from swoole-src.

NathanFreeman avatar NathanFreeman commented on June 19, 2024

看一下php -m输出一下扩展列表

from swoole-src.

fpysky avatar fpysky commented on June 19, 2024

[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
http
iconv
igbinary
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
raphf
readline
redis
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
swoole
sysvmsg
sysvsem
sysvshm
tokenizer
xdebug
xml
xmlreader
xmlwriter
xsl
yaml
Zend OPcache
zip
zlib

[Zend Modules]
Xdebug
Zend OPcache

from swoole-src.

NathanFreeman avatar NathanFreeman commented on June 19, 2024

屏蔽掉Xdebug试试看

from swoole-src.

fpysky avatar fpysky commented on June 19, 2024

卸载xdebug就正常了,不是说8.1后xdebug可以用了吗

from swoole-src.

NathanFreeman avatar NathanFreeman commented on June 19, 2024

php --ri xdebug看看xdebug详细信息,swoole5.1修改过一次跟xdebug有关的bug,可能是新的问题,我要看看

from swoole-src.

fpysky avatar fpysky commented on June 19, 2024

xdebug


\ \ / / | | | |
\ V / __| | _| | _ _ __ _

< / |/ _ \ '_ \| | | |/ _ |
/ . \ (
| | / |) | || | (| |
/
/ __,|_
|.__/ _,|_, |
/ |
|
_/

Version => 3.3.2
Support Xdebug on Patreon, GitHub, or as a business: https://xdebug.org/support

         Enabled Features (through 'xdebug.mode' setting)             

Feature => Enabled/Disabled
Development Helpers => ✔ enabled
Coverage => ✘ disabled
GC Stats => ✘ disabled
Profiler => ✘ disabled
Step Debugger => ✘ disabled
Tracing => ✘ disabled

                        Optional Features                            

Compressed File Support => yes (gzip)
Clock Source => clock_gettime
'xdebug://gateway' pseudo-host support => yes
'xdebug://nameserver' pseudo-host support => yes
Systemd Private Temp Directory => not enabled

Directive => Local Value => Master Value
xdebug.mode => develop => develop
xdebug.start_with_request => default => default
xdebug.start_upon_error => default => default
xdebug.output_dir => /tmp => /tmp
xdebug.use_compression => 1 => 1
xdebug.trigger_value => no value => no value
xdebug.file_link_format => no value => no value
xdebug.filename_format => no value => no value
xdebug.control_socket => time: 25ms => time: 25ms
xdebug.log => no value => no value
xdebug.log_level => 7 => 7
xdebug.var_display_max_children => 128 => 128
xdebug.var_display_max_data => 512 => 512
xdebug.var_display_max_depth => 3 => 3
xdebug.max_nesting_level => 512 => 512
xdebug.cli_color => 0 => 0
xdebug.force_display_errors => Off => Off
xdebug.force_error_reporting => 0 => 0
xdebug.halt_level => 0 => 0
xdebug.max_stack_frames => -1 => -1
xdebug.show_error_trace => Off => Off
xdebug.show_exception_trace => Off => Off
xdebug.show_local_vars => Off => Off
xdebug.dump.COOKIE => no value => no value
xdebug.dump.ENV => no value => no value
xdebug.dump.FILES => no value => no value
xdebug.dump.GET => no value => no value
xdebug.dump.POST => no value => no value
xdebug.dump.REQUEST => no value => no value
xdebug.dump.SERVER => no value => no value
xdebug.dump.SESSION => no value => no value
xdebug.dump_globals => On => On
xdebug.dump_once => On => On
xdebug.dump_undefined => Off => Off
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug.profiler_append => Off => Off
xdebug.cloud_id => no value => no value
xdebug.client_host => localhost => localhost
xdebug.client_port => 9003 => 9003
xdebug.discover_client_host => Off => Off
xdebug.client_discovery_header => HTTP_X_FORWARDED_FOR,REMOTE_ADDR => HTTP_X_FORWARDED_FOR,REMOTE_ADDR
xdebug.idekey => no value => no value
xdebug.connect_timeout_ms => 200 => 200
xdebug.scream => Off => Off
xdebug.gc_stats_output_name => gcstats.%p => gcstats.%p
xdebug.trace_output_name => trace.%c => trace.%c
xdebug.trace_format => 0 => 0
xdebug.trace_options => 0 => 0
xdebug.collect_assignments => Off => Off
xdebug.collect_params => On => On
xdebug.collect_return => Off => Off
xdebug.auto_trace => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.collect_includes => (setting removed in Xdebug 3) => (setting removed in Xdebug 3)
xdebug.collect_vars => (setting removed in Xdebug 3) => (setting removed in Xdebug 3)
xdebug.coverage_enable => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.default_enable => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.gc_stats_enable => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.gc_stats_output_dir => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.overload_var_dump => (setting removed in Xdebug 3) => (setting removed in Xdebug 3)
xdebug.profiler_enable => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.profiler_enable_trigger => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.profiler_enable_trigger_value => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.profiler_output_dir => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_autostart => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_connect_back => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_enable => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_host => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_log => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_log_level => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_mode => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_port => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_timeout => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.show_mem_delta => (setting removed in Xdebug 3) => (setting removed in Xdebug 3)
xdebug.trace_output_dir => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.trace_enable_trigger => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.trace_enable_trigger_value => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)

from swoole-src.

NathanFreeman avatar NathanFreeman commented on June 19, 2024

我没法复现这个问题,看看能不能提供一份最小化代码以供复现

from swoole-src.

fpysky avatar fpysky commented on June 19, 2024

hyperf-demo.zip

from swoole-src.

dhobi avatar dhobi commented on June 19, 2024

Sorry for hijacking this thread. I just wanted to share my observation that crashes stop happening for me when I disable the xdebug (3.3.2) extension.

php8.3-swoole5.1.1

When does the crash happen:
The crash, if xdebug is enabled, happens in a task worker which is listening for events on a redis queue (subscribe). Whenever the redis connection is forcibly closed by the redis server (due to inactivity), the task worker crashes and is automatically restarted by swoole.
If xdebug is not enabled, my code is able to handle the close event and create a new redis client & subscribe like intended.

from swoole-src.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.