View Issue Details

IDProjectCategoryView StatusLast Update
0002253XdebugStep Debuggingpublic2024-07-18 13:35
Reporterkdgeorgiev Assigned To 
PriorityhighSeveritycrashReproducibilityalways
Status resolvedResolutionunable to reproduce 
Product Version3.3.1 
Summary0002253: xDebug 3.3.1 crash on NGINX+Docker and PHP8.1.27
Description

The error I get when xDebug is

2024/03/20 14:43:47 [error] 4053#0: *3184 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.0.3, server: testdomain.dev, request: "GET /SmartSpending HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "site1.testdomain.dev", referrer: "https://site1.testdomain.dev/SmartSpending"

It seems that xDebug resets the connection each time I enable the web plugin and try to test a breakpoint. However on my site2. it works perfectly.

Attached logs.

Local env conf:

centos7 on docker container
PHP 8.1.27 with php-fpm 8.1.27, nginx and xdebug 3.3.1

Additional Information

https://bugs.xdebug.org/view.php?id=2246 - tried this and no luck

TagsNo tags attached.
Operating Systemdocker-centos7
PHP Version8.1.10-8.1.19

Activities

kdgeorgiev

2024-03-21 20:54

reporter   ~0006865

No errors in the NGINX, php, or php-fpm.
When I switch off the xdebug my test1. site works perfectly.

P.S. If I switch back to xdebug 3.2.1 it works.

kdgeorgiev

2024-04-03 14:13

reporter   ~0006889

valgrind and GDB Backtrace uploaded...

ioweb.gr

2024-04-04 04:41

reporter   ~0006890

I'd like to add a blackfire log as well as I'm facing a similar issue with 3.3.1. Perhaps it will help also to fix this

[04-Apr-2024 04:15:16] WARNING: [pool domain.yourstaging.eu] child 3308167 exited on signal 11 (SIGSEGV) after 10.457870 seconds from start
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Fatal Error] Blackfire Probe received a SIGSEGV"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] C backtrace :"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [] /opt/phpbrew/php/phpbrew8_2_17_fdev/lib/php/extensions/no-debug-non-zts-20220829/blackfire.so(+0x152c7) [0x7f34a3c312c7]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [
] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f34a6d64520]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [] /lib/x86_64-linux-gnu/libc.so.6(realloc+0xaa) [0x7f34a6dc77ea]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [
] /opt/phpbrew/php/phpbrew8_2_17_fdev/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so(xdebug_str_addl+0x3c) [0x7f34a3cbbbdc]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [] /opt/phpbrew/php/phpbrew8_2_17_fdev/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so(xdebug_log_ex+0x308) [0x7f34a3cb9f38]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [
] /opt/phpbrew/php/phpbrew8_2_17_fdev/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so(+0x1beda) [0x7f34a3cb3eda]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [] php-fpm: pool domain.yourstaging.eu(zend_llist_apply_with_argument+0x2a) [0x55d2e93a2c5a]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [
] php-fpm: pool domain.yourstaging.eu(+0x23ff3a) [0x55d2e903ff3a]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [] php-fpm: pool domain.yourstaging.eu(+0x248015) [0x55d2e9048015]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [
] /opt/phpbrew/php/phpbrew8_2_17_fdev/lib/php/extensions/no-debug-non-zts-20220829/blackfire.so(+0x2d670) [0x7f34a3c49670]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [] php-fpm: pool domain.yourstaging.eu(zend_execute+0x110) [0x55d2e9420f10]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [
] /opt/phpbrew/php/phpbrew8_2_17_fdev/lib/php/extensions/no-debug-non-zts-20220829/blackfire.so(bf_load_embedded_code+0xe0) [0x7f34a3c695c0]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [] /opt/phpbrew/php/phpbrew8_2_17_fdev/lib/php/extensions/no-debug-non-zts-20220829/blackfire.so(zm_activate_blackfire+0x1f8) [0x7f34a3c4f9a8]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [
] php-fpm: pool domain.yourstaging.eu(zend_activate_modules+0x30) [0x55d2e93b6d10]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [] php-fpm: pool domain.yourstaging.eu(php_request_startup+0x172) [0x55d2e93468d2]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [
] php-fpm: pool domain.yourstaging.eu(+0x252d77) [0x55d2e9052d77]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f34a6d4bd90]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [
] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f34a6d4be40]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] [*] php-fpm: pool domain.yourstaging.eu(_start+0x25) [0x55d2e9054b75]"
[04-Apr-2024 04:15:38] WARNING: [pool domain.yourstaging.eu] child 3308503 said into stderr: "Thu Apr 4 04:15:38 2024 (3308503): [Error] PHP backtrace :"

AviLevy

2024-04-08 05:36

reporter   ~0006891

The same issue happen in php:8.3-fpm with xdebug-3.3.1

[08-Apr-2024 08:20:21] NOTICE: fpm is running, pid 1
2024-04-08T05:20:21.626943643Z [08-Apr-2024 08:20:21] NOTICE: ready to handle connections
2024-04-08T05:20:41.851486346Z /usr/bin/unoconv:19: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
2024-04-08T05:20:41.851512459Z   from distutils.version import LooseVersion
2024-04-08T05:20:41.973184680Z (process:11): dconf-CRITICAL **: 08:20:41.972: unable to create directory '/var/www/.cache/dconf': Permission denied.  dconf will not work properly.
2024-04-08T05:20:43.496955866Z 172.72.4.11 -  08/Apr/2024:08:20:40 +0300 "GET /admin/index.php" 200
2024-04-08T05:20:44.016880411Z 172.72.4.11 -  08/Apr/2024:08:20:43 +0300 "GET /lib/javascript.php" 200
2024-04-08T05:20:44.120936188Z 172.72.4.11 -  08/Apr/2024:08:20:44 +0300 "GET /lib/javascript.php" 200
2024-04-08T05:20:44.129743643Z [08-Apr-2024 08:20:44] WARNING: [pool www] child 7 exited on signal 11 (SIGSEGV - core dumped) after 22.503388 seconds from start
2024-04-08T05:20:44.130665737Z [08-Apr-2024 08:20:44] NOTICE: [pool www] child 13 started
2024-04-08T05:20:50.392431233Z 172.72.4.11 -  08/Apr/2024:08:20:43 +0300 "GET /theme/styles.php" 200
2024-04-08T05:20:50.565838546Z 172.72.4.11 -  08/Apr/2024:08:20:50 +0300 "GET /theme/font.php" 200
2024-04-08T05:20:51.124162450Z [08-Apr-2024 08:20:51] WARNING: [pool www] child 12 exited on signal 11 (SIGSEGV - core dumped) after 7.475365 seconds from start
2024-04-08T05:20:51.124848639Z [08-Apr-2024 08:20:51] NOTICE: [pool www] child 15 started
2024-04-08T05:20:51.293405931Z [08-Apr-2024 08:20:51] WARNING: [pool www] child 8 exited on signal 11 (SIGSEGV - core dumped) after 29.666467 seconds from start
2024-04-08T05:20:51.294003717Z [08-Apr-2024 08:20:51] NOTICE: [pool www] child 16 started
2024-04-08T05:20:51.510101929Z 172.72.4.11 -  08/Apr/2024:08:20:51 +0300 "GET /theme/image.php" 200

markshust

2024-04-13 03:04

reporter   ~0006894

I have confirmed that a "502 Bad Gateway" error is always returned and replicable whenever Xdebug 3.3.1 is enabled (per https://github.com/markshust/docker-magento/issues/1085).

The issue is resolved by downgrading back to 3.2.2. While this works for PHP 8.1/8.2, unfortunately it is not an option when running PHP 8.3 due to package version constraints (pecl/xdebug requires PHP (version >= 8.0.0, version <= 8.2.99), installed version is 8.3.6).

markshust

2024-04-13 15:10

reporter   ~0006895

It appears that disabling the Blackfire extension also resolves the issue. The related ticket for that at https://bugs.xdebug.org/view.php?id=2230 appears to be resolved. Can a new release be tagged for Xdebug which contains this fix? It's possible that it will also resolve this issue.

kdgeorgiev

2024-04-15 06:39

reporter   ~0006896

Hey Markshust

After your comment, I decided to check if my Blackfire extension was disabled and it was. It still doesn't work on our env.
The ticket is still waiting to be acknowledged or for some information do be provided by Derick.

ioweb.gr

2024-04-15 06:54

reporter   ~0006897

Same here, disabling blackfire didn't make a difference. It was our first attempt to remove it.

derick

2024-04-15 12:43

administrator   ~0006902

I think there are multiple issues. I will make a release in the next hour or so, and will then ask to try that, to see if that also happens to solve this issue.

kdgeorgiev

2024-04-15 17:44

reporter   ~0006914

Thank you, Derick!
Let me know when I can test it.

derick

2024-04-15 18:18

administrator   ~0006915

Right now. 3.3.2 was released earlier today.

kdgeorgiev

2024-04-16 06:37

reporter   ~0006920

Thanks but my ticket number is not included in the latest release and fix. And I think it's not related to blackfire.

Including the log from 3.3.2 as I've tested it out this morning. Do you want anything else?

2024-04-16 08:19:36 2024/04/16 05:19:36 [error] 4059#0: *11223 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.18.0.3, server: rewardgateway.dev, request: "GET /SocialRecognition HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "site1.rewardgateway.dev", referrer: "https://site1.rewardgateway.dev/SmartSpending"

All the other logs are attached at the beginning of my thread.

AviLevy

2024-04-16 07:40

reporter   ~0006921

I test it right now on PHP:8.3-fpm with blackfire extenstion and all work good without any core dump.

markshust

2024-04-16 18:54

reporter   ~0006924

Same here, thanks so much Derick!

kdgeorgiev

2024-04-18 07:06

reporter   ~0006926

Derick, it seems everyone used my thread to get their issues fixed.

Please take a look at the logs.

kdgeorgiev

2024-06-07 07:13

reporter   ~0006969

Derick,

I've changed PHP versions from 8.1 to 8.2, and now the breakpoint on my site1. which was not working is still not working with PHP version 8.2. But I got a new error.

2024/06/07 05:16:30 [crit] 3904#3904: 10487 SSL_read() failed (SSL: error:0A000126:SSL routines::unexpected eof while reading) while keepalive, client: 172.20.0.3, server: 0.0.0.0:443
2024/06/07 05:16:30 [crit] 3906#3906:
10488 SSL_read() failed (SSL: error:0A000126:SSL routines::unexpected eof while reading) while keepalive, client: 172.20.0.3, server: 0.0.0.0:443
2024/06/07 05:16:30 [crit] 3908#3908: 10489 SSL_read() failed (SSL: error:0A000126:SSL routines::unexpected eof while reading) while keepalive, client: 172.20.0.3, server: 0.0.0.0:443
2024/06/07 05:16:30 [crit] 3908#3908:
10479 SSL_read() failed (SSL: error:0A000126:SSL routines::unexpected eof while reading) while keepalive, client: 172.20.0.3, server: 0.0.0.0:443
2024/06/07 05:16:30 [crit] 3908#3908: 10486 SSL_read() failed (SSL: error:0A000126:SSL routines::unexpected eof while reading) while keepalive, client: 172.20.0.3, server: 0.0.0.0:443
2024/06/07 05:16:30 [crit] 3908#3908:
10485 SSL_read() failed (SSL: error:0A000126:SSL routines::unexpected eof while reading) while keepalive, client: 172.20.0.3, server: 0.0.0.0:443

However, on my second test site, the xdebug works just fine. They run from the same container and the same php-fpm and nginx settings.

kdgeorgiev

2024-06-07 13:21

reporter   ~0006971

gnore the comment above, it's related to the nginx version. I've managed to fix it but the error persists...

[error] 4053#0: *3184 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.0.3, server: testdomain.dev, request: "GET /SmartSpending HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "site1.testdomain.dev", referrer: "https://site1.testdomain.dev/SmartSpending&quot;

It's seen on 8.1 and 8.2 PHP. I don't know if it would work on PHP 8.3 as it's time-consuming to generate a working environment on PHP-8.3.

derick

2024-07-18 13:35

administrator   ~0007011

I do not yet a provided a way on how to reproduce this problem.

There are currently several reported crash bugs where more than one person added information, but often with a different cause. This makes researching this challenging, especially because I still do not have a reproducible case.

I am going to close this ticket (and the others), and will only accept issues related to crashes when there is a full reproducible case — the exact steps on how I could potentially try to have the same issue.