Hi folks,
It's been a while, but anyways.... https://smedley.id.au/tmp/httpd-2.4.69-os2-20261028.zip
Seems to work ok with plain html and with a mantis test site I have on my OS/2 box.
YMMV. I also have some planned enhancements to test based on Google Gemini evaluation of the OS/2 code in both APR and in the MPM code within Apache. I will release this as a separate build when it's ready - it may be more stable - or it may not <shrug>.
Cheers,
Paul
| Subject: | [ANNOUNCEMENT] Apache HTTP Server 2.4.69 Released |
|---|---|
| Date: | Thu, 01 Oct 2026 10:29:07 -0400 |
| From: | covener <cov...@apache.org> |
| Reply-To: | anno...@httpd.apache.org |
| To: | anno...@httpd.apache.org |
| CC: | d...@httpd.apache.org |
Hi Max,
None - this was a straight rebuild... however...
There is a new httpd.dll in https://smedley.id.au/tmp/httpd-2.4.69-os2-dll-20261031.zip
This includes some tweaks suggested by Claude.ai, namely:
1. Out-of-bounds read in the slot searches
(mpmt_os2.c master_main,
mpmt_os2_child.c ap_mpm_child_main).
The array access comes before the bounds check:
for (slot=0; parent[slot].pid != child_pid && slot < HARD_SERVER_LIMIT; slot++)
Swap the operands to slot <
HARD_SERVER_LIMIT && parent[slot].pid != child_pid.
The same applies to the child_slot loop.
2. Startup race between parent and child.
spawn_child writes the child’s pid into the
scoreboard after DosExecPgm
returns, but the child looks itself up in the scoreboard at
startup. If the child wins, it logs “child pid not found” and
exits with APEXIT_CHILDFATAL, which makes
the parent shut down the whole server. Either
pass the slot to the child (environment variable or argument), or
have the child retry the lookup for a second or two before giving
up.
3. spawn_child ignores
failure. After logging a DosExecPgm
error it carries on and stores proc_rc.codeTerminate
(uninitialised garbage) as the pid. Add a return;
after the log.
4. worker_main carries
on after DosOpenQueue fails. It
logs “exiting” but doesn’t exit, then calls DosReadQueue
on an uninitialised handle. It should set the slot to SERVER_DEAD and return.
5. Leaked thread slots in add_worker.
The _beginthread return value isn’t
checked. On failure (-1) the slot stays SERVER_STARTING
forever and counts as alive. Reset it to SERVER_DEAD
and log the error. The same unchecked call is used for the
maintenance thread, and then DosWaitThread
is called on whatever came back.
6. Pool leak in the accept loop. pconn is created every iteration, but on the
non-fatal paths (EAGAIN, EINTR) it is never destroyed, so pools
pile up under pchild. Call apr_pool_destroy(pconn) there, or create the
pool only after a successful accept.
7. Broken round-robin across listeners.
last_poll_idx is declared inside the do loop, so it resets to 0 every pass. The code
always picks poll_results[0], and the >= num_listeners wrap can never trigger. It
should be declared outside the loop and wrapped against num_poll_results, not num_listeners.
Otherwise a busy first listener can starve the others.
&
Any accept error other than EAGAIN or EINTR is
fatal to the whole server. Errors like ECONNABORTED
and ECONNRESET are routine (a client
resets between poll and accept). The worker/event MPMs treat these
as non-fatal. EMFILE and ENOBUFS
deserve a sleep and retry.
These don't seem to break anything. I'll try some load testing a bit later (siege?) and see if it improves things.
Feedback appreciated. I haven't committed these changes to github yet pending feedback.
Cheers,
Paul
Hi again,
http://smedley.id.au/tmp/httpd-2.4.69-os2-dll-20261031b.zip contains the fixes above, and in addition:
8. DosSetRelMaxFH is
relative, so it grows on every restart. mpmt_os2_run adds ap_thread_limit
* 2 handles every time it runs, including each parent
restart. Query the current maximum first (you already do), then
only add the difference to reach the target.
9. HARD_THREAD_LIMIT is
256 in mpmt_os2.c and 254 in the child.
The scoreboard is sized from the 256 returned by the query, but
the child tracks only 254 slots. ID_FROM_CHILD_THREAD
also uses a different stride from the scoreboard. The “move these
to a header” XXXXXX comment is the right fix: put HARD_SERVER_LIMIT
and HARD_THREAD_LIMIT in mpm_default.h
(or a private header).
YMMV
Cheers,
Paul
And once more...
This one..
https://smedley.id.au/tmp/httpd-2.4.69-os2-dll-20261031c.zip contains a list too long to detail of issues addressed in apr (apache portable runtime).
Build (c) includes all the fixes from (a) and (b) and is probably the 'riskiest' in terms of stability. I tried to smash my baremetal box with siege and 100 odd client and it barely raised a sweat similar to the other builds, but I know Max gets much more (and varied) load.
Cheers,
Paul
Yes, it's not an issue, but if this noise write too much in the logs it can create overhead.
massimo
>>>>>> None - this was a straight rebuild... however....
listeners plus accept-mutex release before accept() in mpmt_os2_child.c..
It's harmless, but I'll make prefork-style children hold the mutex
across accept to quiet the expected case"
It has provided a fix, but I trying to built qtwebengine so I have no
spare cpu cycles.
Cheers,
Paul
--
You received this message because you are subscribed to the Google Groups "Apache for OS/2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apache2+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/apache2/2433fdb1-b0a8-492d-b77c-aff553ae7394n%40googlegroups.com.
Claude came up with a fix, I'll include it in a future build.
To view this discussion visit https://groups.google.com/d/msgid/apache2/a10b5a4f0e81998f1ae85ef8cbb3913e%40ecomstation.it.
Folks,
https://smedley.id.au/tmp/httpd-2.4.69-os2-dll-20261104.zip contains a test build with this change. It also includes the changes that were in 20261031c.zip
Some detail on the httpd changes is at https://github.com/psmedley/httpd-2.4-os2/pull/17
Details of the APR changes are at https://github.com/psmedley/apr-os2/pull/1
Cheers,
Paul