Re: Re: svn: /php/php-src/ branches/PHP_5_4/Zend/zend_execute_API.c trunk/Zend/zend_execute_API.c

From: Date: Wed, 07 Sep 2011 21:12:32 +0000
Subject: Re: Re: svn: /php/php-src/ branches/PHP_5_4/Zend/zend_execute_API.c trunk/Zend/zend_execute_API.c
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-55291@lists.php.net to get a copy of this message
Hi! On 9/7/11 2:01 PM, Rasmus Lerdorf wrote:
I am curious, what do you see when you strace it? On Linux you get:
Darwin has no strace. dtruss is not very helpful:
83310/0x43ee45:     32798      11      7 munmap(0x208B000, 0x11E)          = 0 0
83310/0x43ee45:     32805       9      6 close_nocancel(0x3)  = 0 0
83310/0x43ee45:     32869      17     11 write(0x1, "Start\n\b\0", 0x6)          = 6 0
83310/0x43ee45:     32892       6      1 setitimer(0x2, 0xBFFFEDEC, 0x0)                 = 0 0
That's where it hangs. If I manually send it SIGPROF, it cheerfully continues:
83310/0x43ee45:   9033567     222      8 setitimer(0x2, 0xBFFFEC4C, 0x0)                 = 0 0
83310/0x43ee45:   9033573       6      1 sigaction(0x1B, 0xBFFFEBB0, 0x0)                = 0 0
83310/0x43ee45:   9033576       7      1 sigprocmask(0x2, 0xBFFFEBEC, 0x0)               = 0x0 0
83310/0x43ee45:   9033651      42     35 open("/Applications/MAMP/logs/php_error.log\0", 0x209, 0x1A4) = 3 0
83310/0x43ee45:   9033807      69     61 write(0x3, "[07-Sep-2011 14:09:00] PHP Fatal error:  Maximum execution time of 1 second exceeded in /Users/smalyshev/php-src/branches/PHP_5_4/tests/func/005a.php on line 18\n\0", 0xA1)                = 161 0
But it doesn't send SIGPROF by itself. Looks like Darwin got screwed up itimer implementation at least up to kernel 10.8.0, Mac OS X 10.6.8. Didn't try it on Lion, maybe the have updated/fixed it. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#55291) next »