Page MenuHomePhabricator

php5 segfaults for refreshLinks.php and dumpHTML.php
Closed, DeclinedPublic

Description

Author: j.schauer

Description:
while i was doing a wikipedia dump on my local machine i got segfaults for three segfaults for three specific ids in refreshLinks.php and dumpHTML.php.
as this error occurred in both scripts i assume that they are not specific to these maintenance scripts.

here is my php version:

PHP 5.2.4-2ubuntu5.1 with Suhosin-Patch 0.9.6.2 (cli) (built: May 9 2008 16:54:00)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

with Xdebug v2.0.2, Copyright (c) 2002-2007, by Derick Rethans

as you can see i installed xdebug to get a trace for my errors and to increase the maximum function nesting level but the error also occurs without xdebug.

and my machine:
Linux mediawiki 2.6.24-16-generic #1 SMP Thu Apr 10 12:47:45 UTC 2008 x86_64 GNU/Linux

i run ubuntu 8.04 hardy and use the latest mediawiki from svn (r35317) but the segfaults were also there when i checked it out a week ago.

to reproduce the segfaults just import this xml dump with mwdumper:
http://download.wikimedia.org/dewiki/20080422/dewiki-20080422-pages-articles.xml.bz2

and then do:
php extensions/DumpHTML/dumpHTML.php -s <startid>
and
php maintenance/refreshLinks.php <startid>

where startid is one of the following numbers:
80377
180324
185305

you will get the segfault immediately with both scripts!


Version: 1.13.x
Severity: normal
OS: Linux
Platform: PC

Details

Reference
bz14257

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:12 PM
bzimport set Reference to bz14257.
bzimport added a subscriber: Unknown Object (MLST).

j.schauer wrote:

id 403232 has the same issue

j.schauer wrote:

unfortunately xdebug doesnt output anything.

with gdb i get this backtrace:

#0 0x00000000006720df in zend_objects_store_del_ref_by_handle ()
#1 0x00000000006722af in zend_objects_store_del_ref ()
#2 0x00000000006478b6 in _zval_ptr_dtor ()
#3 0x000000000065f153 in zend_hash_destroy ()
#4 0x000000000066edd9 in zend_object_std_dtor ()
[...]
these five lines get repeated 27141 times!!!
[...]
#135707 0x000000000066edf9 in zend_objects_free_object_storage ()
#135708 0x0000000000672278 in zend_objects_store_del_ref_by_handle ()
#135709 0x00000000006722af in zend_objects_store_del_ref ()
#135710 0x00000000006478b6 in _zval_ptr_dtor ()
#135711 0x000000000065f3d3 in zend_hash_clean ()
#135712 0x000000000068244f in ?? ()
#135713 0x00000000006737f3 in execute ()
#135714 0x00007f0d7ba30ff7 in xdebug_execute () from /usr/lib/php5/20060613/xdebug.so
#135715 0x0000000000682334 in ?? ()
#135716 0x00000000006737f3 in execute ()
#135717 0x00007f0d7ba30ff7 in xdebug_execute () from /usr/lib/php5/20060613/xdebug.so
#135718 0x0000000000682334 in ?? ()
#135719 0x00000000006737f3 in execute ()
#135720 0x00007f0d7ba30ff7 in xdebug_execute () from /usr/lib/php5/20060613/xdebug.so
#135721 0x0000000000682334 in ?? ()
#135722 0x00000000006737f3 in execute ()
#135723 0x00007f0d7ba30ff7 in xdebug_execute () from /usr/lib/php5/20060613/xdebug.so
#135724 0x0000000000682334 in ?? ()
#135725 0x00000000006737f3 in execute ()
#135726 0x00007f0d7ba30ff7 in xdebug_execute () from /usr/lib/php5/20060613/xdebug.so
#135727 0x0000000000682334 in ?? ()
#135728 0x00000000006737f3 in execute ()
#135729 0x00007f0d7ba30ff7 in xdebug_execute () from /usr/lib/php5/20060613/xdebug.so
#135730 0x0000000000682334 in ?? ()
#135731 0x00000000006737f3 in execute ()
#135732 0x00007f0d7ba30ff7 in xdebug_execute () from /usr/lib/php5/20060613/xdebug.so
#135733 0x0000000000682334 in ?? ()
#135734 0x00000000006737f3 in execute ()
#135735 0x00007f0d7ba30ff7 in xdebug_execute () from /usr/lib/php5/20060613/xdebug.so
#135736 0x0000000000654143 in zend_execute_scripts ()
#135737 0x00000000006103ba in php_execute_script ()
#135738 0x00000000006de772 in main ()

sumanah wrote:

Josch, if you can still reproduce this error with the current version of MediaWiki (that's in our Subversion trunk), please reopen and let us know. Thanks.