Bug 40037

Summary: Wrong error message if shared mem isn't deleted during server crash
Product: Apache httpd-2 Reporter: Gebhard Thier <gebhard>
Component: CoreAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED FIXED    
Severity: minor CC: rpluem
Priority: P3 Keywords: ErrorMessage
Version: 2.0.52   
Target Milestone: ---   
Hardware: Sun   
OS: Solaris   

Description Gebhard Thier 2006-07-13 12:30:14 UTC
- httpd crashed:
[Thu Jul 13 09:04:29 2006] [crit] (17)File exists: unable to create scoreboard
"/app/apache2/logbrowse-logs/apache_runtime_status" (name-based shared memory
failure)
- file apache_runtime_status is deleted and re-created during restart of httpd
- truss analyze:
[...]
4521:   open("/app/apache2/logbrowse-logs/accept.lock.4521",
O_WRONLY|O_CREAT|O_EXCL, 0644) = 10
4521:   unlink("/app/apache2/logbrowse-logs/accept.lock.4521") = 0
4521:   unlink("/app/apache2/logbrowse-logs/apache_runtime_status") Err#2 ENOENT
4521:   open("/app/apache2/logbrowse-logs/apache_runtime_status",
O_WRONLY|O_CREAT|O_EXCL, 0666) = 11
4521:   stat64("/app/apache2/logbrowse-logs/apache_runtime_status", 0xFFBEF930) = 0
4521:   shmget(16826453, 57368, 0600|IPC_CREAT|IPC_EXCL) Err#17 EEXIST
4521:   write(2, " [ T h u   J u l   1 3  ".., 166)     = 166
[...]

-> a shared memory segment is left from a crash
- delete shared memory segment manually and restart: OK

-> the error message is wrong; the file apache_runtime_status can be created,
but the shared memory segment can't be accessed
-> please add another error message for this scenario to ease incident solving
Comment 1 Ruediger Pluem 2006-07-13 19:30:15 UTC
Please add the configuration directive that sets
/app/apache2/logbrowse-logs/apache_runtime_status. That makes it easier to find
the module that tries to create the shared memory.
Comment 2 Gebhard Thier 2006-07-14 06:47:04 UTC
here's the directive:
<IfModule !mpm_netware.c>
<IfModule !perchild.c>
ScoreBoardFile logbrowse-logs/apache_runtime_status
</IfModule>
</IfModule>
Comment 3 Nick Kew 2007-10-07 05:38:23 UTC
Fixed in r582621