[imp] Segfaults with IMP (Auth::GetAuth for me)

Rick Romero rick at havokmon.com
Mon May 12 15:43:53 PDT 2003


On Sat, 2003-05-10 at 10:47, Hans de Groot wrote:
> Hi,
> 
> I have asked this question before here.
> 
> The answer was that it could not be horde or imp but something with apache or php.
> 
> My problem with this answer is that I changed redhat and apache and php and
> still imp 3.1 gives me segfault ( and "page cannot be displayed" errors in
> internet explorer. Netscape 7 works great I never have the problem in netscape
> but I noticed netscape tries to fetch a page again if it fails ie does not)

I have the segfault problem.  FreeBSD 4.8 here, with Apaceh 2, Php
4.3.1.  I have a Horde install that I copied to this machine, and it
segfaults on Auth::GetAuth().  I have custom code in my registry.php
that includes Auth::GetAuth(), so when the test.php ran, it segfaulted
also - until I removed that line.

> I also heard that segfault 11 has something to do with hardware. could it just
> be out of memory?

Not my system.  It's a new server, I have 758MB, and it's not doing a
thing.

> sorry to bother every one again with this problem.

I'm running into the same thing, I even recompiled PHP 4.3.2RC2 with:
'./configure' '--with-apxs2=/usr/local/sbin/apxs' '--with-tsrm-pth' 
'--with-config-file-path=/usr/local/etc' '--enable-mime-magic' 
'--with-mysql=/usr/local' '--with-gettext=/usr/local' '--prefix=/usr/local'
'i386-portbld-freebsd4.8'

Just to trim it to the minimum, and I still get segfaults.

I followed the instructions, and this is the backtrace I get:
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x2844a05c in zend_hash_index_update_or_next_insert (ht=0x8298e4c,
h=137996908, pData=0xbfbfc1d8,
    nDataSize=8, pDest=0x0, flag=4) at
/root/php-4.3.2RC2/Zend/zend_hash.c:377
377             p = ht->arBuckets[nIndex];
(gdb) bt
#0  0x2844a05c in zend_hash_index_update_or_next_insert (ht=0x8298e4c,
h=137996908, pData=0xbfbfc1d8,
    nDataSize=8, pDest=0x0, flag=4) at
/root/php-4.3.2RC2/Zend/zend_hash.c:377
#1  0x283b7301 in zif_register_shutdown_function (ht=1,
return_value=0x83af20c, this_ptr=0x0,
    return_value_used=0) at
/root/php-4.3.2RC2/ext/standard/basic_functions.c:2129
#2  0x28457e40 in execute (op_array=0x83e6c0c) at
/root/php-4.3.2RC2/Zend/zend_execute.c:1608
#3  0x28457fba in execute (op_array=0x83e600c) at
/root/php-4.3.2RC2/Zend/zend_execute.c:1650
#4  0x28457fba in execute (op_array=0x83e608c) at
/root/php-4.3.2RC2/Zend/zend_execute.c:1650
#5  0x28457fba in execute (op_array=0x8309b8c) at
/root/php-4.3.2RC2/Zend/zend_execute.c:1650
#6  0x28457fba in execute (op_array=0x82b508c) at
/root/php-4.3.2RC2/Zend/zend_execute.c:1650
#7  0x2843e187 in call_user_function_ex (function_table=0x82b5d18,
object_pp=0x82b6998,
    function_name=0x82ba2ec, retval_ptr_ptr=0xbfbff52c, param_count=2,
params=0x8248eac, no_separation=1,
    symbol_table=0x0) at /root/php-4.3.2RC2/Zend/zend_execute_API.c:559
#8  0x2843db7d in call_user_function (function_table=0x80d3100,
object_pp=0x0, function_name=0x82ba32c,
    retval_ptr=0x838512c, param_count=2, params=0xbfbff5b8) at
/root/php-4.3.2RC2/Zend/zend_execute_API.c:401
#9  0x283ac728 in ps_call_handler (func=0x82ba32c, argc=2,
argv=0xbfbff5b8)
    at /root/php-4.3.2RC2/ext/session/mod_user.c:60
#10 0x283acad8 in ps_write_user (mod_data=0x28495c50, key=0x817838c
"31bee5a312dbc4113ddb8299324802de",
    val=0x812cc0c
"hordeMessageStacks|a:1:{s:6:\"status\";a:0:{}}horde_prefs|a:1:{s:5:\"horde\";a:10:{s:8:\"language\";a:3:{s:3:\"val\";s:0:\"\";s:4:\"mask\";i:10;s:7:\"default\";s:0:\"\";}s:5:\"theme\";a:3:{s:3:\"val\";s:0:\"\";s:4:\"mask\";i"..., vallen=906) at /root/php-4.3.2RC2/ext/session/mod_user.c:148
#11 0x283a96a6 in php_session_save_current_state () at
/root/php-4.3.2RC2/ext/session/session.c:685
#12 0x283abc0d in php_session_flush () at
/root/php-4.3.2RC2/ext/session/session.c:1588
#13 0x283abc4c in zm_deactivate_session (type=1, module_number=4)
    at /root/php-4.3.2RC2/ext/session/session.c:1602
#14 0x28448c20 in module_registry_cleanup (module=0x814b000) at
/root/php-4.3.2RC2/Zend/zend_API.c:1167
#15 0x2844a9b6 in zend_hash_apply (ht=0x28499f40, apply_func=0x28448be4
<module_registry_cleanup>)
    at /root/php-4.3.2RC2/Zend/zend_hash.c:688
#16 0x28445edb in zend_deactivate_modules () at
/root/php-4.3.2RC2/Zend/zend.c:634
#17 0x2841d557 in php_request_shutdown (dummy=0x0) at
/root/php-4.3.2RC2/main/main.c:970
#18 0x2845f07d in php_apache_request_dtor (r=0x8160050)
    at /root/php-4.3.2RC2/sapi/apache2handler/sapi_apache2.c:438
#19 0x2845f318 in php_handler (r=0x8160050) at
/root/php-4.3.2RC2/sapi/apache2handler/sapi_apache2.c:534
#20 0x8063590 in ap_run_handler ()
#21 0x8063abd in ap_invoke_handler ()
#22 0x8060dea in ap_process_request ()
#23 0x805cb86 in ap_process_http_connection ()
#24 0x806b878 in ap_run_process_connection ()
#25 0x806bb0c in ap_process_connection ()
#26 0x8062237 in child_main ()
#27 0x80622f4 in make_child ()
#28 0x80623e6 in startup_children ()
#29 0x806271b in ap_mpm_run ()
#30 0x8067c2a in main ()
#31 0x805c7be in _start ()


Older PHP does:

Program received signal SIGBUS, Bus error.
0x28451aee in lockname () from /usr/local/libexec/apache2/libphp4.so
(gdb) bt
#0  0x28451aee in lockname () from /usr/local/libexec/apache2/libphp4.so
#1  0x284923f0 in php4_module () from
/usr/local/libexec/apache2/libphp4.so
#2  0x28453b84 in lockname () from /usr/local/libexec/apache2/libphp4.so
#3  0x284573a2 in lockname () from /usr/local/libexec/apache2/libphp4.so
#4  0x284573a2 in lockname () from /usr/local/libexec/apache2/libphp4.so
#5  0x284573a2 in lockname () from /usr/local/libexec/apache2/libphp4.so
#6  0x2843d2d9 in lockname () from /usr/local/libexec/apache2/libphp4.so
#7  0x2843cc98 in lockname () from /usr/local/libexec/apache2/libphp4.so
#8  0x283ad987 in lockname () from /usr/local/libexec/apache2/libphp4.so
#9  0x283add2c in lockname () from /usr/local/libexec/apache2/libphp4.so
#10 0x283aa926 in lockname () from /usr/local/libexec/apache2/libphp4.so
#11 0x283ace7d in lockname () from /usr/local/libexec/apache2/libphp4.so
#12 0x283acebc in lockname () from /usr/local/libexec/apache2/libphp4.so
#13 0x28447d62 in lockname () from /usr/local/libexec/apache2/libphp4.so
#14 0x28449a76 in lockname () from /usr/local/libexec/apache2/libphp4.so
#15 0x28444f07 in lockname () from /usr/local/libexec/apache2/libphp4.so
#16 0x2841d569 in lockname () from /usr/local/libexec/apache2/libphp4.so
#17 0x2845e59d in lockname () from /usr/local/libexec/apache2/libphp4.so
#18 0x2845e7c3 in lockname () from /usr/local/libexec/apache2/libphp4.so
#19 0x806d6ad in ap_pass_brigade ()
#20 0x8073c43 in default_handler ()
#21 0x8063590 in ap_run_handler ()
#22 0x8063abd in ap_invoke_handler ()
#23 0x8060dea in ap_process_request ()
#24 0x805cb86 in ap_process_http_connection ()
#25 0x806b878 in ap_run_process_connection ()
#26 0x806bb0c in ap_process_connection ()
#27 0x8062237 in child_main ()
#28 0x80622f4 in make_child ()
#29 0x80623e6 in startup_children ()
#30 0x806271b in ap_mpm_run ()
#31 0x8067c2a in main ()
#32 0x805c7be in _start ()



Rick

> regards
> 
> Hans de Groot
> 
> 
> 
> 
> Citeren david.nasvik at resco.se:
> 
> > 
> > 
> > 
> > 
> > 
> > Hi Stacy,
> > 
> > Try to see what's making apache to segfault by debuging it with gdb for
> > instance.
> > 
> > An easy way to debug apache, do as following:
> > 
> > su to root.
> > gdb /your/path/to/apache/httpd ((make sure you have gdb installed, download
> > from freshmeat.net))
> > run -X
> > Then you surf to horde/imp
> > and when an error occur in gdb write: bt (backtrace)
> > and you will have a clue what's causing the apache to segfault. Atleast you
> > will know more than you know now...
> > 
> > I'm no experienced c-debugger and I know no other way to backtrace
> > application like apache, but I'm sure there a plenty of ways. Imho maybe
> > the IMP-team should put togheter a small-FAQ how to debug apache (I'm
> > volunteering do that), since this list get many inquiries about apache
> > segfaults... I think that would be good for the development team, since
> > they can focus on core-php development instead of answering question about
> > underlaying application that they don't neiter have focus on or control
> > over.
> > 
> > 
> > My mothertounge is swedish, please have that in mind when you read my
> > poor-written english...
> > 
> > Best Regards Dave
> > 
> > 
> > -- 
> > IMP mailing list
> > Frequently Asked Questions: http://horde.org/faq/
> > To unsubscribe, mail: imp-unsubscribe at lists.horde.org
> > 



More information about the imp mailing list