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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20900

Return value of setitimer(2) changes by setting of ErrorLog in httpd.conf.

           Summary: Return value of setitimer(2) changes by setting of
                    ErrorLog in httpd.conf.
           Product: Apache httpd-1.3
           Version: 1.3.27
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: core
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


OS: Solaris 8 (sparc)
Apache: 1.3.27 + php 4.3.2 (DSO module)
# This problem happened only on Solaris 8.
# Red Hat 7.3 and MacOS X 10.2.6 is OK.

set_time_limit() of PHP is used setitimer(2).
Return value of setitimer(2) changes by setting of ErrorLog in httpd.conf.

1. ErrorLog /var/log/apache/error_log or syslog
 return value is 0 (success).

 truss of httpd:
/1:       -> libthread:setitimer(0x2, 0xffbef4a0, 0x0, 0xff001eb0)
setitimer(ITIMER_PROF, 0xFFBEF4A0, 0x00000000)  = 0
/1:       <- libthread:setitimer() = 0


2. ErrorLog "| /usr/local/apache/bin/rotatelogs /var/log/apache/error_log 86400"
 return value is -1 (error) and errno is EACCES

 truss of httpd:
/1:       -> libthread:setitimer(0x2, 0xffbef4a0, 0x0, 0xff001eb0)
/1:         -> libc:_lwp_mutex_lock(0xff3e7cb8, 0x0, 0x0, 0x0)
/1:         <- libc:_lwp_mutex_lock() = 0
/1:         -> libc:_lwp_mutex_unlock(0xff3e7cb8, 0xffbef214, 0xfffffffc, 0x0)
/1:         <- libc:_lwp_mutex_unlock() = 0
/1:         -> libc:___errno(0x1, 0x2, 0x0, 0xff16e000)
/1:           -> libthread:thr_main(0x0, 0x24c04, 0x0, 0x0)
/1:           <- libthread:thr_main() = 1
/1:         <- libc:___errno() = 0xa4c38
/1:       <- libthread:setitimer() = -1


In case of 1, the following PHP scripts are interrupted.
In case of 2, the following PHP scripts are executed to the last.

test.php:
<?php
        set_time_limit( 2 );
        printf("Test Program Start<br>�n");
        for ($i = 0; $i < 1000000; $i++) {
                for ($j = 0; $j < 10000; $j++) {
                }
                printf("i=%d<br>�n", $i);
        }
        printf("Test Program End<br>�n");
?>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to