View Issue Details

IDProjectCategoryView StatusLast Update
0002294XdebugUncategorizedpublic2024-11-28 13:41
ReporterMarian Kechlibar Assigned Toderick  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.4.0beta1 
Fixed in Version3.4.0 
Summary0002294: Nette Tester always crashes in all test jobs when running with XDebug 3.4.0beta1 active
Description

I am using Nette Tester on Windows, which is a framework to test applications written in Nette (another PHP-based web development network), to test my apps. Up until XDebug 3.3.2, inclusive, there was no problem with it.

With XDebug 3.4.0 beta 1, all the tests crash with C0000005 error (Access Violation) in php8ts.dll. So far, I was unable to transform my unwieldy Nette Tester script complex to a nimble 20-line test script which would reproduce the issue... but I was at least able to run it under gdb and the gdb crash stack says

Thread 1 received signal SIGSEGV, Segmentation fault.
0x00007ff81da52cd8 in zend_hash_str_find@@24 () from C:\xampp\php\php8ts.dll
(gdb) bt full
#0 0x00007ff81da52cd8 in zend_hash_str_find@@24 () from C:\xampp\php\php8ts.dll
No symbol table info available.
#1 0x00007ff86bc7878c in xdebug_init_oparray () from C:\xampp\php\ext\php_xdebug.dll
No symbol table info available.
0000002 0x00007ff86bc8d615 in xdebug_init_oparray () from C:\xampp\php\ext\php_xdebug.dll
No symbol table info available.
0000003 0x00007ff86bc8d9ea in xdebug_init_oparray () from C:\xampp\php\ext\php_xdebug.dll
No symbol table info available.
0000004 0x00007ff86bc74ef4 in xdebug_init_oparray () from C:\xampp\php\ext\php_xdebug.dll
No symbol table info available.
0000005 0x00007ff86bc73b9b in xdebug_init_oparray () from C:\xampp\php\ext\php_xdebug.dll
No symbol table info available.
0000006 0x00007ff81dfb6f03 in zend_objects_store_mark_destructed@@8 () from C:\xampp\php\php8ts.dll
No symbol table info available.
0000007 0x00007ff81dea9d01 in php8ts!libiconv_set_relocation_prefix () from C:\xampp\php\php8ts.dll
No symbol table info available.
0000008 0x00007ff81dc158b9 in php_free_shutdown_functions () from C:\xampp\php\php8ts.dll
No symbol table info available.
0000009 0x00007ff81da802df in zend_hash_apply@@16 () from C:\xampp\php\php8ts.dll
No symbol table info available.
0000010 0x00007ff81dc0e797 in php_call_shutdown_functions () from C:\xampp\php\php8ts.dll
No symbol table info available.
0000011 0x00007ff81da4da7a in php_request_shutdown () from C:\xampp\php\php8ts.dll
No symbol table info available.
0000012 0x00007ff77cfd241e in ?? ()
No symbol table info available.

I was unable to find the symbol file for the dll online.

My suspicion is that the problem is caused by multi-process character of Nette Tester. It uses proc_open to create multiple independent php instances. But I was as of now unable to reproduce the problem in a short script. My attempts to just create a separate php interpreter using proc_open, running some hello world script in a separate process and wait for its exit, never reproduced the problem.

In the Nette Tester context, though, the problem appears always, at the exit of each thread. Maybe I could at least gain some better data if I could get the symbol file for the dll.

TagsNo tags attached.
Operating SystemWindows
PHP Version8.3.10-8.3.19

Relationships

duplicate of 0002305 closedderick Segfault when checking whether to ignore creating a debug connection during shutdown functions 

Activities

Marian Kechlibar

2024-10-08 15:28

reporter   ~0007067

PHP 8.3.12 (cli) (built: Sep 24 2024 20:22:41) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.3.12, Copyright (c) Zend Technologies
with Zend OPcache v8.3.12, Copyright (c), by Zend Technologies
with Xdebug v3.4.0beta1, Copyright (c) 2002-2024, by Derick Rethans

I can prepare some very elementary Nette Tester test, and I think it won't need any database - please let me know if I should.

"then please prepare something that I can: clone from GitHub, use something like composer to install dependencies, and then can run. The script can still not have dependencies on things like databases, as I won't have them installed." -

derick

2024-10-13 16:40

administrator   ~0007074

The downloadable archives on PECL have PDB files added: https://pecl.php.net/package/xdebug/3.4.0beta1/windows — I'll see how I can do this for my own releases too.

derick

2024-11-27 16:08

administrator   ~0007096

Hi,

I'm still interested in getting this fixed, and if you could prepare something small, that'd be most welcome.

cheers,
Derick

Marian Kechlibar

2024-11-27 16:21

reporter   ~0007098

Ok, I will try.

Marian Kechlibar

2024-11-27 18:30

reporter   ~0007102

I just noticed that you, Derick, committed some fix in the xdebug repository on GitHub, and that fix concerns method xdebug_should_ignore.

Maybe this is the fix? Because I just ran my problematic code under windbg (attaching screenshot) and it seems that xdebug_should_ignore is involved in the crash.

Would you build a new DLL for me to test?

xdebug.png (326,566 bytes)

derick

2024-11-27 18:54

administrator   ~0007103

Last edited: 2024-11-27 18:54

That indeed looks like the problem. You can find DLLs at https://github.com/xdebug/xdebug/actions/runs/12054387899#artifacts (temporarily)

But that backtrace isn't the same as in your original report...

Marian Kechlibar

2024-11-27 19:03

reporter   ~0007104

Hmm. One of the traces was generated by gdb and the other by windbg.

But with the freshly built 3.4.0beta2-dev, nothing in my 182-test battery crashes anymore, so ... success? :)

derick

2024-11-28 13:17

administrator   ~0007108

Thanks, marking this as closed then.

Issue History

Date Modified Username Field Change
2024-10-08 15:22 Marian Kechlibar New Issue
2024-10-08 15:28 Marian Kechlibar Note Added: 0007067
2024-10-13 16:40 derick Note Added: 0007074
2024-10-13 16:40 derick Assigned To => derick
2024-10-13 16:40 derick Status new => feedback
2024-11-27 16:08 derick Note Added: 0007096
2024-11-27 16:21 Marian Kechlibar Note Added: 0007098
2024-11-27 16:21 Marian Kechlibar Status feedback => assigned
2024-11-27 18:30 Marian Kechlibar Note Added: 0007102
2024-11-27 18:30 Marian Kechlibar File Added: xdebug.png
2024-11-27 18:54 derick Note Added: 0007103
2024-11-27 18:54 derick Note Edited: 0007103
2024-11-27 19:03 Marian Kechlibar Note Added: 0007104
2024-11-28 13:17 derick Status assigned => resolved
2024-11-28 13:17 derick Resolution open => fixed
2024-11-28 13:17 derick Fixed in Version => 3.4dev
2024-11-28 13:17 derick Note Added: 0007108
2024-11-28 13:17 derick Relationship added duplicate of 0002305
2024-11-28 13:41 derick Fixed in Version 3.4dev => 3.4.0