Bug 63300 - mod_status lists BusyWorkers IdleWorkers keys twice
Summary: mod_status lists BusyWorkers IdleWorkers keys twice
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_status (show other bugs)
Version: 2.4.38
Hardware: All All
: P2 regression (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2019-03-28 16:12 UTC by Christian Zuckschwerdt
Modified: 2019-03-28 17:13 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Christian Zuckschwerdt 2019-03-28 16:12:52 UTC

mod_status server-status?auto lists the keys BusyWorkers and IdleWorkers twice.

Steps to Reproduce:

wget -O - 'http://localhost/server-status?auto'

Actual Results:

I see e.g.
DurationPerReq: 8.53412
BusyWorkers: 1
IdleWorkers: 49
Processes: 2
Stopping: 0
BusyWorkers: 1
IdleWorkers: 49
ConnsTotal: 2

Expected Results:

Up to release 2.4.34 the output was e.g.
Uptime: 3
ReqPerSec: 0
BytesPerSec: 0
BusyWorkers: 1
IdleWorkers: 4

Additional Information:

The change was introduced with "mod_status: Complete the data shown for async" ( https://github.com/apache/httpd/commit/6befc1893bea72320388b84fd879a4533e29b244 ) from 2018-08-07 released with httpd 2.4.35.

Is there a contract that the keys should be unique?
Comment 1 Christian Zuckschwerdt 2019-03-28 17:13:51 UTC
Suggested fix would be to make https://github.com/apache/httpd/blob/2.4.39/modules/generators/mod_status.c#L554

 ap_rprintf(r, "BusyWorkers: %d\nIdleWorkers: %d\n", busy, ready);

conditional on is_async. Not sure though if both outputs could report different values?