View Issue Details

IDProjectCategoryView StatusLast Update
0002306XdebugUncategorizedpublic2024-12-04 15:48
Reportermtassinari Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status newResolutionopen 
PlatformWSLOSUbuntuOS Version22.04
Product Version3.4.0 
Summary0002306: Segmentation fault on each HTTP request when not listening to debugging connections
Description

After upgrading to PHP 8.4.1 with xDebug 3.4.0, I noticed that if I disable listening to incoming connections in PHPStorm, or if I disable step debugging using xDebug helper extension, I get an apache segmentation fault.

If I re-enable listening to connections, even if I set no breakpoints, it seems to work correctly.

Apache error logs just says:

[Tue Dec 03 08:45:28.909764 2024] [core:notice] [pid 19961] AH00052: child pid 20192 exit signal Segmentation fault (11)

while xDebug error log says:

[28175] Log opened at 2024-12-03 07:51:48.886735
[28175] [Config] WARN: Not setting up control socket with default value due to unavailable 'tsc' clock
[28175] [Step Debug] ERR: Time-out connecting to debugging client, waited: 200 ms. Tried: 172.18.192.1:9000 (through xdebug.client_host/xdebug.client_port).

NOTE: I picked php8.4-dev in the selector as there is no option for PHP 8.4.1

Additional Information

Here is some system info

$ php -v
PHP 8.4.1 (cli) (built: Nov 25 2024 18:03:47) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.1, Copyright (c) Zend Technologies
with Xdebug v3.4.0, Copyright (c) 2002-2024, by Derick Rethans

$ httpd -v
Server version: Apache/2.4.52 (Ubuntu)
Server built: 2024-07-17T18:57:26

$ php -m
[PHP Modules]
apcu
ast
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
random
Reflection
session
SimpleXML
soap
sockets
sodium
SPL
sqlite3
ssh2
standard
tokenizer
xdebug
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib
[Zend Modules]
Xdebug

xDebug config:
[xdebug]
xdebug.max_nesting_level = 256
xdebug.dump.GET =
xdebug.dump.POST =

xdebug.dump_undefined = 1
xdebug.show_local_vars = 0
xdebug.dump_globals = 1
xdebug.collect_return = 1
xdebug.collect_assignments = 1
xdebug.var_display_max_depth = -1
xdebug.var_display_max_children = -1
xdebug.var_display_max_data = -1
xdebug.output_dir = "/opt/agews64/temp"
xdebug.profiler_output_name = "callgrind.%u.out"
xdebug.trace_format = 1
xdebug.trace_options = 0
xdebug.trace_output_name = "trace.%u"
xdebug.idekey = PHPSTORM
xdebug.mode = develop,debug
xdebug.discover_client_host = 0
xdebug.client_host = "${XDEBUG_REMOTE_HOST}"
xdebug.client_port = 9000
xdebug.log = "/opt/agews64/logs/xdebug.log"
xdebug.log_level = 3

Here, XDEBUG_REMOTE_HOST is an environment variable I set in the WSL by getting the output of the command

ip route list | grep default | awk '{ print $3 }'

In my setup, PHP is run as an apache module:

$ httpd -DPHP -M
Loaded Modules:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
mpm_prefork_module (shared)
authn_file_module (shared)
authn_core_module (shared)
authz_host_module (shared)
authz_groupfile_module (shared)
authz_user_module (shared)
authz_core_module (shared)
access_compat_module (shared)
auth_basic_module (shared)
allowmethods_module (shared)
cache_module (shared)
socache_shmcb_module (shared)
buffer_module (shared)
ext_filter_module (shared)
request_module (shared)
include_module (shared)
filter_module (shared)
charset_lite_module (shared)
deflate_module (shared)
mime_module (shared)
log_debug_module (shared)
env_module (shared)
mime_magic_module (shared)
expires_module (shared)
headers_module (shared)
setenvif_module (shared)
session_module (shared)
session_cookie_module (shared)
slotmem_shm_module (shared)
status_module (shared)
cgi_module (shared)
vhost_alias_module (shared)
negotiation_module (shared)
dir_module (shared)
alias_module (shared)
php_module (shared)

Tagsphp8.4, segfault
Operating SystemWindows Subsystem for Linux
PHP Version8.4-dev

Activities

mtassinari

2024-12-03 10:38

reporter   ~0007111

I wanted to add that, I thought it might be a PHP issue, but even reverting to PHP 8.3 doesn't fix the issue.

Also, I cannot revert to 3.3.2 as it seems not available anymore on the repository from which I installed it using apt, or at least apt doesn't find version 3.3.2

So, for the time being, I need to disable the extension.

Issue History

Date Modified Username Field Change
2024-12-03 07:57 mtassinari New Issue
2024-12-03 07:57 mtassinari Tag Attached: php8.4
2024-12-03 07:57 mtassinari Tag Attached: segfault
2024-12-03 10:38 mtassinari Note Added: 0007111