You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/06/12 20:10:15 UTC

DO NOT REPLY [Bug 39790] New: - Crash on receiving 2 SIGUSR1 in a short period of time

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39790>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39790

           Summary: Crash on receiving 2 SIGUSR1 in a short period of time
           Product: Apache httpd-2
           Version: 2.0.58
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: All
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: redcube@gmx.de


The server crashes after receiving 2 SIGUSR1 within a very short timeframe. I
personally ran into this problem by using a logrotate script that sends SIGUSR1
after each individual logrotation.

The last lines in error_log are
[Sat Jun 10 03:51:10 2006] [notice] SIGUSR1 received.  Doing graceful restart
[Sat Jun 10 03:51:10 2006] [notice] Digest: generating secret for digest
authentication ...
[Sat Jun 10 03:51:11 2006] [crit] (4)Interrupted system call: Digest: error
generating secret: Interrupted system call
Configuration Failed

The problem seems to be located in apr_generate_random_bytes() which is called
by mod_auth_digest.

It returns a failure on receiving a signal while reading from /dev/random.
Applying the following patch should fix the problem:

diff --recursive httpd-2.0.58/srclib/apr/misc/unix/rand.c
httpd-2.0.58-fixed/srclib/apr/misc/unix/rand.c
70c70,73
<             return errnum;
---
>             if (errnum == EINTR)
>                 fd = -1; /* force open() again if read() was interrupted */
>             else
>                 return errnum;

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 39790] - Crash on receiving 2 SIGUSR1 in a short period of time

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39790>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39790


davi@haxent.com.br changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Keywords|                            |PatchAvailable




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 39790] - Crash on receiving 2 SIGUSR1 in a short period of time

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39790>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39790





------- Additional Comments From pookey@pookey.co.uk  2007-01-12 09:18 -------
I also just got this problem - at 03:10 too - this is when my logs rotate, so
preumably is caused by the 'reload' that logrotate does:

/var/log/apache2/*log {
  missingok
  notifempty
  sharedscripts
  postrotate
  /etc/init.d/apache2 reload > /dev/null 2>&1 || true
  endscript
}


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 39790] - Crash on receiving 2 SIGUSR1 in a short period of time

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39790>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39790





------- Additional Comments From victor.trac@gmail.com  2006-07-29 08:18 -------
I think I just ran into this problem.  error_log:

[Sat Jul 29 03:10:01 2006] [notice] Digest: generating secret for digest
authentication ...
[Sat Jul 29 03:10:01 2006] [notice] Digest: done
[Sat Jul 29 03:10:01 2006] [notice] Apache configured -- resuming normal operations
[Sat Jul 29 03:10:02 2006] [notice] Graceful restart requested, doing restart
[Sat Jul 29 03:10:03 2006] [notice] Digest: generating secret for digest
authentication ...
[Sat Jul 29 03:10:03 2006] [notice] Digest: done
[Sat Jul 29 03:10:03 2006] [notice] Apache configured -- resuming normal operations
[Sat Jul 29 03:10:05 2006] [notice] Graceful restart requested, doing restart
[Sat Jul 29 03:10:05 2006] [notice] Digest: generating secret for digest
authentication ...
[Sat Jul 29 03:10:05 2006] [notice] Digest: done
[Sat Jul 29 03:10:06 2006] [notice] Apache configured -- resuming normal operations
[Sat Jul 29 03:10:06 2006] [notice] Graceful restart requested, doing restart
[Sat Jul 29 03:10:06 2006] [notice] Digest: generating secret for digest
authentication ...
[Sat Jul 29 03:10:06 2006] [notice] Digest: done
[Sat Jul 29 03:10:06 2006] [notice] Apache configured -- resuming normal operations
[Sat Jul 29 03:10:06 2006] [notice] Graceful restart requested, doing restart
[Sat Jul 29 03:10:06 2006] [notice] Digest: generating secret for digest
authentication ...
[Sat Jul 29 03:10:06 2006] [crit] (4)Interrupted system call: Digest: error
generating secret: Interrupted system call
Configuration Failed

Server version: Apache/2.0.58

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 39790] - Crash on receiving 2 SIGUSR1 in a short period of time

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39790>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39790


jorton@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From jorton@redhat.com  2007-07-04 03:02 -------
Fixed on the trunk - thanks for the report.

http://svn.apache.org/viewvc?view=rev&revision=553146

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 39790] - Crash on receiving 2 SIGUSR1 in a short period of time

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39790>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39790


jorton@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|All                         |APR
            Product|Apache httpd-2              |APR
            Version|2.0.58                      |1.2.8




------- Additional Comments From jorton@redhat.com  2007-01-12 09:23 -------
This is a bug in apr_generate_random_bytes, it should handle EINTR.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org