You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MYSQL_ATTR_INIT_COMMAND causing "The FastCGI process exited unexpectedly" #9381
In php-cgi.exe_220823_081756.dmp the assembly instruction at php8!emalloc+5c in C:\Program Files (x86)\PHP\v8.1.9.dev\php8.dll from The PHP Group has caused an access violation exception (0xC0000005) when trying to read from memory location 0x0f003b34 on thread 0
Thank you for the backtrace! This is likely not the root cause, but may just be a cause of a prior memory mismanagement. I'm not able to find anything, though, especially something related to the MYSQL_ATTR_INIT_COMMAND.
At least the backtrace shows that this happens with a 32bit build; can you also reproduce the issue with a 64bit build?
wow, that's very interesting - i've been unable to recreate the issue in x64 - so yep, appears to be an x86 issue only :)
I'll advise the customer to use x64 going forward.
I suspect you're correct, perhaps it's not reserving enough memory for the PDO option array or something, i.e. it's the number of options in the array as opposed to the array items themselves? That's outside my area of expertise though - looking forward to hearing from a clever person as to what the actual issue is in x86.
This was a heap overflow in mysqlnd on 32-bit builds with mysqlnd.collect_memory_statistics=On, fixed in PHP 8.1.13 by #9724. If that's not the case, and you still experience this issue with the recent PHP version, please open a new GH issue.
Activity
cmb69 commentedon Aug 19, 2022
I cannot reproduce this segfault. Could you please try to generate a stack backtrace?
HeavenCore commentedon Aug 23, 2022
Good Morning,
Backtrace below as requested:
Error
Faulting Thread
Entry Point: php_cgi!mainCRTStartup
HeavenCore commentedon Aug 23, 2022
Above trace was produced by un-commenting the following:
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8mb4;"in the following code block:
WIth this line commented out the application compiles and runs normally.
cmb69 commentedon Aug 23, 2022
Thank you for the backtrace! This is likely not the root cause, but may just be a cause of a prior memory mismanagement. I'm not able to find anything, though, especially something related to the
MYSQL_ATTR_INIT_COMMAND.At least the backtrace shows that this happens with a 32bit build; can you also reproduce the issue with a 64bit build?
HeavenCore commentedon Aug 23, 2022
wow, that's very interesting - i've been unable to recreate the issue in x64 - so yep, appears to be an x86 issue only :)
I'll advise the customer to use x64 going forward.
I suspect you're correct, perhaps it's not reserving enough memory for the PDO option array or something, i.e. it's the number of options in the array as opposed to the array items themselves? That's outside my area of expertise though - looking forward to hearing from a clever person as to what the actual issue is in x86.
OffTopic: is there any plans to kill x86 PHP?
cmb69 commentedon Aug 24, 2022
That is generally a good idea (as of PHP 7.0.0 on Windows). :)
It has been suggested a few times, but probably that won't happen soon (one argument is support for embedded devices etc.)
hormus commentedon Sep 5, 2022
HeavenCore commentedon Sep 5, 2022
hormus commentedon Sep 5, 2022
kamil-tekiela commentedon Nov 5, 2026
This was a heap overflow in mysqlnd on 32-bit builds with mysqlnd.collect_memory_statistics=On, fixed in PHP 8.1.13 by #9724. If that's not the case, and you still experience this issue with the recent PHP version, please open a new GH issue.