Bug #68409 [NEW]: exit hangs forever when running CLI script
| From: | grotagroten at hotmail dot com | Date: | Wed, 12 Nov 2014 12:43:59 +0000 |
| Subject: | Bug #68409 [NEW]: exit hangs forever when running CLI script | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-188566@lists.php.net to get a copy of this message | ||
From: grotagroten at hotmail dot com
Operating system: Windows/Linux
PHP version: 5.6.2
Package: *General Issues
Bug Type: Bug
Bug description:exit hangs forever when running CLI script
Description:
------------
I have a CLI script that hangs on termination. The script will call exit
when it is done, the shutdown function will be called, destructors will
be called, and then it just waits for nothing to happen. I have to
manually terminate the process to get it to exit. It does not consume
any resources, it just hangs forever. The same behaviour is observed
with the die function. It appears on both 5.5 and 5.6.
Test script:
---------------
I do not have a simple test script that can reproduce it at the moment,
but I have a log from running the script with strace.
I have uploaded the trace to the following location:
http://www.filedropper.com/trace
The end of the trace looks like this, it seems to be polling for
something.
fstat(12, {st_mode=S_IFREG|0777, st_size=1314, ...}) = 0
fstat(12, {st_mode=S_IFREG|0777, st_size=1314, ...}) = 0
fstat(12, {st_mode=S_IFREG|0777, st_size=1314, ...}) = 0
fstat(12, {st_mode=S_IFREG|0777, st_size=1314, ...}) = 0
mmap(NULL, 1314, PROT_READ, MAP_SHARED, 12, 0) = 0x7fc092237000
munmap(0x7fc092237000, 1314) = 0
close(12) = 0
close(3) = 0
close(4) = 0
write(6, "\1\0\0\0\0\0\0\0", 8) = 8
write(11, "\1\0\0\0\1", 5) = 5
shutdown(11, SHUT_RDWR) = 0
close(11) = 0
munmap(0x7fc087db9000, 266240) = 0
close(2) = 0
close(1) = 0
munmap(0x7fc092235000, 4096) = 0
close(0) = 0
munmap(0x7fc092236000, 4096) = 0
brk(0x2d38000) = 0x2d38000
munmap(0x7fc087d37000, 266240) = 0
munmap(0x7fc087d78000, 266240) = 0
munmap(0x7fc087e39000, 266240) = 0
munmap(0x7fc087e7a000, 266240) = 0
munmap(0x7fc087ebb000, 266240) = 0
munmap(0x7fc087efc000, 266240) = 0
munmap(0x7fc087f3d000, 266240) = 0
munmap(0x7fc087f7e000, 266240) = 0
munmap(0x7fc087fbf000, 266240) = 0
munmap(0x7fc08c035000, 266240) = 0
munmap(0x7fc08c076000, 266240) = 0
munmap(0x7fc08c0b7000, 266240) = 0
munmap(0x7fc092055000, 266240) = 0
write(10, "\1\0\0\0\0\0\0\0", 8) = 8
poll([{fd=5, events=POLLIN}], 1, 4294967295
Process 3037 detached
<detached ...>
Expected result:
----------------
Script should terminate on exit
Actual result:
--------------
Script hangs forever
--
Edit bug report at https://bugs.php.net/bug.php?id=68409&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68409&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68409&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68409&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68409&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68409&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68409&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68409&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68409&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68409&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68409&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68409&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68409&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68409&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68409&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68409&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68409&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68409&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68409&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68409&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68409&r=mysqlcfg