Re: PHP 4.0 Bug #3204: Segment violation during Zendsession shutdown

From: Date: Fri, 14 Jan 2000 04:51:44 +0000
Subject: Re: PHP 4.0 Bug #3204: Segment violation during Zendsession shutdown
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-14605@lists.php.net to get a copy of this message
No, I don't think so (although I might not understand what you mean). I don't use objects at all, and none of my functions do anything spectacular. I finally tracked down one of the pages that causes it -- although it doesn't happen on every load... I had to tweak out my apache logging so I could at least get the process ID's that were croaking.. Again, you don't notice this from the user's point of view -- all images, text, everything goes out like it's supposed to.. Even when I put an 'echo "ending";' in the append script, it gets executed.. whatever dies seems to do so when the script cleans up. ======== 152.163.194.202 [5796] - www.sitename.com - [14/Jan/2000:04:38:36 +0000] "GET /member/view.ftg?fn=e6acb7043529317f059fd6f212d0be5e&t=1 HTTP/1.0" 200 1137b 0sec "http://www.sitename.com/member/profile/pictures.ftg?id=1153" "Mozilla/4.0 (compatible; MSIE 5.0; AOL 5.0; Windows 95; DigExt)" [Fri Jan 14 04:38:37 2000] [notice] child pid 5796 exit signal Segmentation fault (11) ======= This seems to happen only on pages called with a "GET" tacked on... but not consistantly.. Here's the script: <?php Header("Content-type: image/jpeg"); $a = substr($fn,0,1); $b = substr($fn,1,1); if ($t == "1") { $directory = "/web/pics/thumbnails/$a/$b"; } else { $directory = "/web/pics/fullsize/$a/$b"; } readfile("$directory/$fn.jpg"); ?> prepend script is: <? session_start(); $page_open = false; if ($cac == 1) { $expire = gmdate("D, d M Y H:i:s",time()+25000); header("Expires: $expire GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); } else { header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); } ?> and append script is: <? @closelog(); ?> I'm not totally sure I need to use the closelog(); but I was having some major problems with my linux box running out of file system handles (I had to increase it to 32000)... I have a ton of logging throughout my scripts piping stuff out to syslog()... when I added the @closelog();, my file handle problems went away. I never reported it because I had also upgraded mysql that day, and it may have been 'the fix'. System details... SMP Dual Pentium II 300, 512M RAM, Linux 2.2.13, glibc 2.1.2 ----- Original Message ----- From: "Zeev Suraski" <zeev@zend.com> To: <jmat@firewind.net> Cc: <php-dev@lists.php.net> Sent: Thursday, January 13, 2000 3:25 PM Subject: Re: [PHP-DEV] PHP 4.0 Bug #3204: Segment violation during Zendsession shutdown > > Do you use references? > > On 13 Jan 2000 jmat@firewind.net wrote: > > > From: jmat@firewind.net > > Operating system: Linux Redhat 6.1 > > PHP version: 4.0 Latest CVS (13/01/2000) > > PHP Bug Type: Reproduceable crash > > Bug description: Segment violation during Zend session shutdown > > > > > > I can't pinpoint the script/function that's doing this, as it seems to happen in all sorts of things, at random times. The only indication something was wrong is the error logs: all data seems to be pushed out to the browser right as it dies, so no data is lost to the client. > > > > Here's the gdb... > > > > [root@kodiak apache]# gdb /usr/local/apache/bin/httpd > > GNU gdb 4.17.0.11 with Linux support > > Copyright 1998 Free Software Foundation, Inc. > > GDB is free software, covered by the GNU General Public License, and you are > > welcome to change it and/or distribute copies of it under certain conditions. > > Type "show copying" to see the conditions. > > There is absolutely no warranty for GDB. Type "show warranty" for details. > > This GDB was configured as "i386-redhat-linux"...(no debugging symbols found)... > > (gdb) run -X > > Starting program: /usr/local/apache/bin/httpd -X > > (no debugging symbols found)... > > Program received signal SIGSEGV, Segmentation fault. > > 0x80903ca in _zval_ptr_dtor () > > (gdb) bt > > #0 0x80903ca in _zval_ptr_dtor () > > #1 0x8095d34 in _zval_ptr_dtor_wrapper () > > #2 0x809a2ee in zend_hash_destroy () > > #3 0x8095a5e in _zval_dtor () > > #4 0x8090296 in shutdown_executor () > > #5 0x809674b in zend_deactivate () > > #6 0x8084eed in php_request_shutdown () > > #7 0x80f862e in ap_run_cleanup () > > #8 0x80f6e5d in ap_clear_pool () > > #9 0x80f6ed1 in ap_destroy_pool () > > #10 0x810665d in ap_child_terminate () > > #11 0x810679c in ap_child_terminate () > > #12 0x81068f9 in ap_child_terminate () > > #13 0x8106f26 in ap_child_terminate () > > #14 0x81076a3 in main () > > #15 0x401f072f in __libc_start_main (main=0x810736c <main>, argc=2, argv=0xbffffd74, init=0x8060e34 <_init>, > > fini=0x813e7a8 <_fini>, rtld_fini=0x4000a670 <_dl_fini>, stack_end=0xbffffd6c) at ../sysdeps/generic/libc-start.c:90 > > > > > > > > > > > > -- > Zeev Suraski <zeev@zend.com> > http://www.zend.com/ >

« previous php.dev (#14605) next »