| Author |
|
axel.kam

Joined: 11 Jul 2023 Posts: 23
|
|
| Back to top |
|
admin Site Admin

Joined: 15 Oct 2005 Posts: 731
|
Posted: Mon 23 Feb '26 15:04 Post subject: |
|
|
I asked AI :
Status 3221226356 (0xC0000374) = heap corruption → mostly :
❗ PHP DLL mismatch
❗ Verkeerde VC++ runtime
❗ Foute / corrupte PHP extension
❗ TS vs NTS fout (they advise TS) |
|
| Back to top |
|
admin Site Admin

Joined: 15 Oct 2005 Posts: 731
|
Posted: Mon 23 Feb '26 19:28 Post subject: |
|
|
Extra info :
❗ Windows heap corruption
❗ Memory overwrite
❗ Double free
❗ Thread race condition
Dat wijst bijna altijd op:
• PHP extension bug
• mod_php + threads conflict
• OPCache memory issue
• DLL mismatch
• 3rd party module |
|
| Back to top |
|
axel.kam

Joined: 11 Jul 2023 Posts: 23
|
Posted: Tue 24 Feb '26 1:52 Post subject: |
|
|
Yes, I working at this list, but in production its need more time to localise issue.
I can't repeat problem with same config but another same PC with another site.
What i know today:
Hardware is ok, all test is ok.
Win11 Pro 25H2 is the latest OS with update
Of course latest VS build 14.50.35719, reinstall it twice
Latest drivers update from vendors
PHP is TS mode (fastcgi is crashed too) 8.4.18
With PHP 8.5.0-8.5.3 have the same crash, but 8.5.x still young for Prod.
All VS17 builds workind fine
Build from 23 feb crashing too
I try to disable site by site, modules, and configs.
Maybe not apache issue, maybe something in my script or OS. Or load type. Yes I distribute big static file without nginx, but Apache should be designed for this. Or not?
In crash moment no records in any log. It seems to happen during idle time.
Today I run Application Verifier and waiting for a next crash. |
|
| Back to top |
|
nono303

Joined: 20 Dec 2016 Posts: 221 Location: Lille, FR, EU
|
|
| Back to top |
|
Crafted

Joined: 04 Feb 2026 Posts: 21
|
Posted: Tue 24 Feb '26 12:41 Post subject: |
|
|
Here we go again:
[Tue Feb 24 06:40:35.172260 2026] [mpm_winnt:notice] [pid 4696:tid 424] AH00428: Parent: child process 4244 exited with status 3221226356 -- Restarting.
[Tue Feb 24 06:40:38.094098 2026] [mpm_winnt:notice] [pid 4696:tid 424] AH00455: Apache/2.4.66 (Win64) OpenSSL/3.6.1 configured -- resuming normal operations
[Tue Feb 24 06:40:38.094577 2026] [mpm_winnt:notice] [pid 4696:tid 424] AH00456: Apache Lounge VS17 erver built: Feb 22 2026 13:55:38 |
|
| Back to top |
|
tangent Moderator
Joined: 16 Aug 2020 Posts: 424 Location: UK
|
Posted: Tue 24 Feb '26 22:08 Post subject: |
|
|
Reviewing this lengthy thread over Apache stability, I'm concerned it appears to be focusing on HTTPD build code, rather than considering a resource issue that could well be resolved with configuration changes.
In particular, I note no one's mentioned ThreadStackSize or ThreadsPerChild.
Historically, I came across any number of Windows setups where the default thread stack size wasn't enough, and seem to recall MS chose a lowly figure of 1MB. I'd want to match a Linux figure of 8MB, and scale ThreadsPerChild according to system resources and the available memory. That in turn depends on what else is running on the server, PHP, database, etc.
With mpm_winnt, there is only one process, so you need to allocate sufficient threads to support the expected connection load. In one part of the post, I note Axel.Kam's log mentions 192 worker threads, which sounds pretty low to me. Even if you set ThreadsPerChild at 512, with ThreadStackSize at 8MB that would only take up 4GB of thread stack memory if all threads were active.
The other parameter I used to change was MaxConnectionsPerChild which defaults to 0, meaning unlimited. If any module linked to a child process leaks memory, then eventually it will fail and crash. Limiting the number of connection requests it serves can circumvent this problem, at the expense of some extra overhead in restarting that child process.
If it's not impertinent, resource permitting, I'd suggest considering trying something like this:
| Code: |
<IfModule mpm_winnt_module>
ThreadStackSize 8388608
ThreadsPerChild 512
MaxConnectionsPerChild 2048
</IfModule> |
Other people's views appreciated. |
|
| Back to top |
|
Crafted

Joined: 04 Feb 2026 Posts: 21
|
Posted: Tue 24 Feb '26 23:45 Post subject: |
|
|
| tangent wrote: |
In particular, I note no one's mentioned ThreadStackSize or ThreadsPerChild.
|
| Crafted wrote: |
and everything I tried (set ThreadStackSize 8388608 / AcceptFilter none, switching through different php versions, even tried mod_fcgid) did not worked
|
|
|
| Back to top |
|
RikasMalinka
Joined: 07 Jan 2026 Posts: 8 Location: Poland
|
Posted: Tue 24 Feb '26 23:55 Post subject: |
|
|
I’ve been running Apache HTTP Server 2.4.66 Win64 (build 260223) for more than 24 hours now, and there have been no crashes so far.
This is the most stable run I’ve had with version 2.4.66 to date. |
|
| Back to top |
|
tangent Moderator
Joined: 16 Aug 2020 Posts: 424 Location: UK
|
Posted: Wed 25 Feb '26 0:56 Post subject: |
|
|
@RikasMalinka - thanks for the positive update.
@Crafted - apologies, you had mentioned ThreadStackSize before, though I still stand by the MaxConnectionsPerChild issue.
If I read the thread correctly, you've reported the same heap error exit code 3221226356 (0xc0000374) with differing version of OpenSSL (3.5 LTS as well as 3.6 series), differing versions of Visual Studio, and differing versions of PHP. But only it would seem Apache/2.4.66.
As noted, Steffen has updated the Apache/2.4.66 download viz: https://www.apachelounge.com/viewtopic.php?p=44104#44104 to "Apache 2.4.66-260223 Win64".
This is a notable change which now matches the previous VS builds, in that they too didn't have defined base addresses per module. It turns out by default the HTTPD CMake configuration file assigns a base address to each module, rather than leaving it to the OS loader (and ASLR). This may affect stability.
I'll be updating the CMake build HowTo soon, to reflect this change.
If you're able, could you please try this latest build of Apache/2.4.66? |
|
| Back to top |
|
axel.kam

Joined: 11 Jul 2023 Posts: 23
|
Posted: Wed 25 Feb '26 1:24 Post subject: |
|
|
| nono303 wrote: | | You can also use procdump to create a dump on exception |
Thanks, I ran that too.
Think it doesn't seem to work.
Apache in Windows launches a manager process, which launches another one main worker. The worker crashes, and then the manager process restarts it.
ProcDump monitors the first running process, the manager, but it's fine. When I try to run ProcDump while Apache is running, it reports that two processes with same name are already running and it can't select one.
Apache didn't crash today, but three modules important to me were disabled and the service stopped. Instead, httpd.exe is simply running so that monitoring programs can see it. Investigation is continuous. |
|
| Back to top |
|
mrdj1024
Joined: 03 Apr 2023 Posts: 80 Location: Bridgeton,NJ,USA
|
Posted: Wed 25 Feb '26 7:28 Post subject: |
|
|
my setup
cpu : amd fx 6300
os : win11
ram : 16 gb
using php 8.4.18(by jan-e of these forums) in fcgid mode
no issues seen in this newer apache version. |
|
| Back to top |
|
nono303

Joined: 20 Dec 2016 Posts: 221 Location: Lille, FR, EU
|
Posted: Wed 25 Feb '26 9:41 Post subject: |
|
|
| axel.kam wrote: | | Think it doesn't seem to work. |
Effectively. You have to use the pid of the child process in this case.
| Code: | pslist -nobanner -t httpd
Process information for COMPUTER:
Name Pid Pri Thd Hnd VM WS Priv
httpd 8612 8 6 292 4194303 32020 16204
httpd 12376 8 409 1842 4194303 80920 1697008
|
only pid : | Code: | pslist -nobanner -t httpd | tail -1 | gawk -F' ' '{print $2}'
12376 |
set -e 1 to catch also "First Chance" with Unhandled
| Code: | procdump -nobanner -ma -e 1 12376
Process: httpd.exe (12376)
Process image: C:\serveur\apache24\bin\httpd.exe
CPU threshold: n/a
Performance counter: n/a
Commit threshold: n/a
Threshold seconds: n/a
Hung window check: Disabled
Log debug strings: Disabled
Exception monitor: First Chance+Unhandled
Exception filter: [Includes]
*
[Excludes]
Terminate monitor: Disabled
Cloning type: Disabled
Concurrent limit: n/a
Avoid outage: n/a
Number of dumps: 1
Dump folder: F:\telecharger\
Dump filename/mask: PROCESSNAME_YYMMDD_HHMMSS
Queue to WER: Disabled
Kill after dump: Disabled
Press Ctrl-C to end monitoring without terminating the process. |
Also an other / easiest? way to get the stack trace of the crash is to use https://emptyhammock.com/projects/httpd/diag/index.html
I've just released vs17 & vs18 x64 if you want to try. https://github.com/nono303/mod_whatkilledus/releases/tag/2.0.2
(it'll only show the stack and dump nothing else)
@Steffen, would it be possible de make a RelWithDebInfo build with pdb files to be able to dig on an awaited dump? |
|
| Back to top |
|
admin Site Admin

Joined: 15 Oct 2005 Posts: 731
|
Posted: Wed 25 Feb '26 17:41 Post subject: |
|
|
| @nono303 Next release I try to make it available. |
|
| Back to top |
|
axel.kam

Joined: 11 Jul 2023 Posts: 23
|
Posted: Wed 25 Feb '26 23:23 Post subject: |
|
|
A bad result is already a result.
If I'm reading the results correctly, Application Verifier showed that the mod_http2 causing the error. This is unexpected.
PC has 64 GB of RAM, and at startup 20 GB is immediately allocated to system, service, and the RAM disk.
[Thu Feb 26 02:40:56.320751 2026] [mpm_winnt:notice] [pid 8816:tid 312] AH00428: Parent: child process 15068 exited with status 3221226529 -- Restarting.
[Thu Feb 26 02:40:57.558492 2026] [mpm_winnt:notice] [pid 8816:tid 312] AH00455: Apache/2.4.66 (Win64) OpenSSL/3.6.1 configured -- resuming normal operations
[Thu Feb 26 02:40:57.558492 2026] [mpm_winnt:notice] [pid 8816:tid 312] AH00456: Apache Lounge VS18 server built: Feb 23 2026 10:01:09
First chance access violation for current stack trace. 20659da60b8 - Invalid address causing the exception. 7ff8c348cabb - Code address executing the invalid access. 35871ff2b0 - Exception record. 35871fedc0 - Context record. vrfcore!VerifierUnregisterLayer+57d ( @ 0) verifier!VerifierStopMessage+bc ( @ 0) ntdll!RtlApplicationVerifierStop+95 ( @ 0) vfbasics!+7ff86b8d2a1f ( @ 0) vfbasics!+7ff86b8d3cd4 ( @ 0) vfbasics!+7ff86b8d48aa ( @ 0) ntdll!RtlLocateExtendedFeature+f96 ( @ 0) ntdll!RtlLocateExtendedFeature+366 ( @ 0) ntdll!KiUserExceptionDispatcher+2e ( @ 0) mod_http2!+7ff8c348cabb ( @ 0) mod_http2!+7ff8c348da54 ( @ 0) mod_http2!+7ff8c3493219 ( @ 0) mod_http2!+7ff8c34847c9 ( @ 0) mod_http2!+7ff8c34846a5 ( @ 0) libhttpd!ap_run_process_connection+3d ( @ 0) libhttpd!ap_process_connection+31 ( @ 0) libhttpd!ap_run_generate_log_id+3e4e ( @ 0) vfbasics!+7ff86b8e7943 ( @ 0) KERNEL32!BaseThreadInitThunk+17 ( @ 0) ntdll!RtlUserThreadStart+2c ( @ 0)
"we need to think about it"
PS. The big files are distibuted via https and VS17 work fine with this task
Last edited by axel.kam on Wed 25 Feb '26 23:34; edited 2 times in total |
|
| Back to top |
|
axel.kam

Joined: 11 Jul 2023 Posts: 23
|
Posted: Wed 25 Feb '26 23:31 Post subject: |
|
|
| nono303 wrote: | | set -e 1 to catch also "First Chance" with Unhandled |
Ok, its work. Waiting for a next crash  |
|
| Back to top |
|
axel.kam

Joined: 11 Jul 2023 Posts: 23
|
Posted: Wed 25 Feb '26 23:58 Post subject: |
|
|
| Crafted wrote: | | Here we go again |
If you use h2 please try to disable mod_http2 and remove h2 from Protocols directive like this:
SSLEngine on
Protocols http/1.1
It's possible the issue exists in all 2.4.66 builds, even in VS17, but need more time to track it down. In VS18 it can take up to three days commonly. |
|
| Back to top |
|
Crafted

Joined: 04 Feb 2026 Posts: 21
|
Posted: Thu 26 Feb '26 1:02 Post subject: |
|
|
| No I certainly won't disable it, I'm fine with 2.4.65, I won't touch my configs again, if that one worked this one should too, we just have to wait I guess. |
|
| Back to top |
|
danielruf
Joined: 07 Jan 2026 Posts: 7
|
|
| Back to top |
|