[PHP-BUG] Bug #51572 [NEW]: Broscap crash on shutdown

[email protected] ("mike at blueroot dot co dot uk")
Newsgroups php.bugs
Message-ID <[email protected]>
From:             
Operating system: Linux
PHP version:      5.3.2
Package:          Reproducible crash
Bug Type:         Bug
Bug description:Broscap crash on shutdown

Description:
------------
I am running pgp-cgi in fast cgi mode and when I shutdown the server with
killall 
php-cgi it crashes.  Below is the backtrace, I am not sure how to reproduce

exactly but I only use get_browser once per request and it always crashes
killing 
after it has been running for a while.

Test script:
---------------
<?php

$b = get_browser();

Expected result:
----------------
Shutdown gracefully

Actual result:
--------------
#0  0x00007fed7590ba75 in *__GI_raise (sig=<value optimized out>) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007fed7590f5c0 in *__GI_abort () at abort.c:92
#2  0x00007fed759454fb in __libc_message (do_abort=<value optimized out>, 
fmt=<value optimized out>) at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
#3  0x00007fed7594f5b6 in malloc_printerr (action=3, str=0x7fed75a1e2e2 
"corrupted double-linked list", ptr=<value optimized out>) at
malloc.c:6264
#4  0x00007fed75952a25 in _int_free (av=0x7fed75c55e40, p=0x1671ec0) at 
malloc.c:4954
#5  0x00007fed75955e53 in *__GI___libc_free (mem=<value optimized out>) at

malloc.c:3738
#6  0x0000000000692c58 in browscap_entry_dtor (zvalue=0x1670c48) at 
/usr/src/php-5.3.2/ext/standard/browscap.c:41
#7  0x0000000000750750 in zend_hash_destroy (ht=0xebdcc0) at /usr/src/php-
5.3.2/Zend/zend_hash.c:526
#8  0x0000000000692bfb in zm_shutdown_browscap (type=<value optimized out>,

module_number=<value optimized out>) at /usr/src/php-
5.3.2/ext/standard/browscap.c:236
#9  0x000000000068fc65 in zm_shutdown_basic (type=1, module_number=32) at 
/usr/src/php-5.3.2/ext/standard/basic_functions.c:3685
#10 0x000000000074a56f in module_destructor (module=0x1170bf0) at
/usr/src/php-
5.3.2/Zend/zend_API.c:2098
#11 0x00000000007503e2 in zend_hash_apply_deleter (ht=0xec4f40,
p=0x1170b90) at 
/usr/src/php-5.3.2/Zend/zend_hash.c:611
#12 0x0000000000750698 in zend_hash_graceful_reverse_destroy (ht=0xec4f40)
at 
/usr/src/php-5.3.2/Zend/zend_hash.c:646
#13 0x0000000000744d18 in zend_shutdown () at
/usr/src/php-5.3.2/Zend/zend.c:759
#14 0x00000000006f097d in php_module_shutdown () at /usr/src/php-
5.3.2/main/main.c:2138
#15 0x00000000007cc9e5 in main (argc=1, argv=0x7fffab6ce008) at
/usr/src/php-
5.3.2/sapi/cgi/cgi_main.c:2231

-- 
Edit bug report at http://bugs.php.net/bug.php?id=51572&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=51572&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=51572&r=trysnapshot53
Try a snapshot (PHP 6.0):            http://bugs.php.net/fix.php?id=51572&r=trysnapshot60
Fixed in SVN:                        http://bugs.php.net/fix.php?id=51572&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51572&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=51572&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=51572&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=51572&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=51572&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=51572&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=51572&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=51572&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=51572&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=51572&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51572&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51572&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=51572&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=51572&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=51572&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=51572&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=51572&r=mysqlcfg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.