View Issue Details

IDProjectCategoryView StatusLast Update
0002225XdebugStep Debuggingpublic2024-02-19 12:11
Reporterbreier Assigned Toderick  
PriorityhighSeveritycrashReproducibilityalways
Status assignedResolutionopen 
Product Version3.3.0 
Summary0002225: segmentation fault on lazy loading / instantiating through reflection class
Description

Any breakpoint standing after the bootstrapping of the MVC will never be reached, since xdebug will have a segfault during the dependency injection resolve.

Steps To Reproduce

Have an interdependent DI setup with lazy load on Laminas (Zend should be similar).
Try to set a breakpoint and start a request.

Additional Information

When the class you need, needs another class that ends up needing the first class back.
Lamins MVC will use the Reflection class with a callable bound to instantiate something passable until the full chain can be properly instantiated.

I reverted xdebug back to 3.2.1 and everything works fine.
I had to find a previous container build and copy the xdebug.so file over to the new build to accomplish this downgrade.

Tagsfault, laminas, reflection, segfault, sementation, zend
Operating SystemDebian 11
PHP Version8.1.10-8.1.19

Activities

derick

2023-12-08 17:21

administrator   ~0006717

Please provide the exact steps as to how I can reproduce this.

Presume I know nothing beyond normal PHP.

breier

2023-12-11 16:24

reporter   ~0006721

Hi Derick.

I'd have to write a whole public project to reproduce this error with generic code.
It'll take some time...

derick

2023-12-12 09:44

administrator   ~0006723

That's okay. I'd love for you to not have to do this, but I don't even know where to start building a Laminas project.

derick

2023-12-15 12:26

administrator   ~0006731

I have released Xdebug 3.3.1, which could have fixed this issue. Can you please try it?

savemetenminutes

2023-12-21 11:11

reporter   ~0006739

Hi Derick,

I can confirm that the issue is still present in version 3.3.1, although I'm not sure it is connected with reflection.

derick

2024-01-02 17:47

administrator   ~0006746

Can you provide a (short) reproducible case then? I wouldn't know where to start here. Presume I know nothing about Laminas. Or perhaps at least provide a backtrace and xdebug log (https://xdebug.org/reporting-bugs#step-debugger) to begin? If I can't reproduce it, I also likely can't fix it.

savemetenminutes

2024-01-05 15:29

reporter   ~0006751

I would gladly provide the xdebug logs, but is there a way to send it over a private channel? I wouldn't want to make the specifics of our company software public domain.

savemetenminutes

2024-01-05 15:43

reporter   ~0006752

I also just found out that the problem occurs also when running a script through a web server's fcgi proxy to PHP-FPM, although instead of the "Segmentation fault" I get the following errors in the web server error logs along with a 503 Service Unavailable response.

Nginx:

2024/01/05 12:41:58 [error] 47#47: *10 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 223.223.0.1, server: $host, request: "GET /some-resource/1?XDEBUG_SESSION=asd HTTP/1.1", upstream: "fastcgi://223.223.0.37:9090", host: "127.0.0.1:19492"

Apache:

[Fri Jan 05 12:38:48.373555 2024] [proxy_fcgi:error] [pid 34:tid 140142342183736] [client 223.223.0.1:52312] AH01067: Failed to read FastCGI header
[Fri Jan 05 12:38:48.373602 2024] [proxy_fcgi:error] [pid 34:tid 140142342183736] (104)Connection reset by peer: [client 223.223.0.1:52312] AH01075: Error dispatching request to :18492

derick

2024-01-30 11:56

administrator   ~0006820

I think this might be the same issue as 0002229.

breier

2024-02-19 12:11

reporter   ~0006849

I can confirm that updating to PHP-8.2 solves this issue.

Issue History

Date Modified Username Field Change
2023-12-08 17:17 breier New Issue
2023-12-08 17:17 breier Tag Attached: fault
2023-12-08 17:17 breier Tag Attached: laminas
2023-12-08 17:17 breier Tag Attached: reflection
2023-12-08 17:17 breier Tag Attached: segfault
2023-12-08 17:17 breier Tag Attached: sementation
2023-12-08 17:17 breier Tag Attached: zend
2023-12-08 17:21 derick Assigned To => derick
2023-12-08 17:21 derick Status new => feedback
2023-12-08 17:21 derick Note Added: 0006717
2023-12-11 16:24 breier Note Added: 0006721
2023-12-11 16:24 breier Status feedback => assigned
2023-12-12 09:44 derick Status assigned => feedback
2023-12-12 09:44 derick Note Added: 0006723
2023-12-15 12:26 derick Note Added: 0006731
2023-12-21 11:11 savemetenminutes Note Added: 0006739
2024-01-02 17:47 derick Note Added: 0006746
2024-01-05 15:29 savemetenminutes Note Added: 0006751
2024-01-05 15:43 savemetenminutes Note Added: 0006752
2024-01-30 11:56 derick Note Added: 0006820
2024-02-19 12:11 breier Note Added: 0006849
2024-02-19 12:11 breier Status feedback => assigned