[imp] Apache Random Segmentation Faults with IMP

Sheeri Kritzer sheeri.kritzer@tufts.edu
Wed, 04 Sep 2002 16:56:52 -0400


OK, so we had this very same problem, but we fixed it.  (as a side note, there was a lot of stuff about "date('r')" in the archives, but nothing seemed relevant to me.).

Basically, we had the following bug in PHP (compiled with mm):

http://bugs.php.net/bug.php?id=18647

and fixed it by doing the following patch:


Index: mod_mm.c
===================================================================
RCS file: /repository/php4/ext/session/mod_mm.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- mod_mm.c28 Feb 2002 08:26:40 -00001.32
+++ mod_mm.c5 Mar 2002 23:45:50 -00001.33
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */ -/* $Id: mod_mm.c,v 1.32 2002/02/28 08:26:40 sebastian Exp $ */
+/* $Id: mod_mm.c,v 1.33 2002/03/05 23:45:50 yohgaki Exp $ */  #include "php.h" @@ -331,7 +331,10 @@
 (*val)[sd->datalen] = '\0';
 ret = SUCCESS;
 }
-
+else {
+*val = estrdup("");
+}
+
 mm_unlock(data->mm);  return ret;

hope this helps people.  It helped us, we're no longer dumping apache cores.

-Sheeri Kritzer
Systems Administrator
University Systems Group
Tufts University
617-627-3925
sheeri.kritzer@tufts.edu


Quoting Shannon Lekas <shannon@flyingmug.com>:

> I have this same question open under a different title.  From what ive seen
> its 
> a problem with PHP 4.1-4.2 but no one has been able to get me a working 
> solution.  search for "date('r')" in the archives.
> 
> Shannon
> 
> 
> Quoting Jeremy Freeman <jfreeman@sporg.com>:
> 
> > For some reason, my Apache is randomly segfaulting when I access IMP 
> > 3.1. This causes the IE6 to display a "This Page cannot be displayed". 
> > It seems to happen in 1 out of 20 clicks. It doesn't seem to matter 
> > which browser I use.
> > 
> > Does anyone have any ideas?
> > 
> > --
> > Jeremy
> > 
> > I use a self-signed SSL cert and everything goes over SSL.
> > 
> > Apache error.log shows:
> > 
> > [Mon Aug 12 10:33:42 2002] [notice] child pid 4994 exit signal 
> > Segmentation fault (11)
> > [Mon Aug 12 10:36:23 2002] [notice] child pid 4996 exit signal 
> > Segmentation fault (11)
> > [Mon Aug 12 10:59:43 2002] [notice] child pid 5511 exit signal 
> > Segmentation fault (11)
> > [Mon Aug 12 10:59:44 2002] [notice] child pid 5456 exit signal 
> > Segmentation fault (11)
> > [Mon Aug 12 10:59:48 2002] [notice] child pid 4993 exit signal 
> > Segmentation fault (11)
> > 
> > I am Running:
> > 
> > Apache/1.3.26 (Unix) with
> > PHP/4.2.2
> > mod_perl/1.27
> > mod_ssl/2.8.10 OpenSSL/0.9.6e
> > 
> > PHP compiled with: './configure' '--with-mysql' 
> > '--with-apache=../apache_1.3.26/' '--enable-debug' '--with-gettext' 
> > '--with-imap=../imap-2002.RC2/' '--with-xml'
> > 
> > All compiled in static.
> > 
> > Kernel: Linux 2.2.19pre17
> > 
> > GDB backtrace reveals:
> > 
> > Program received signal SIGPIPE, Broken pipe.
> > 0x2adb43e4 in write () from /lib/libc.so.6
> > (gdb) bt
> > #0  0x2adb43e4 in write () from /lib/libc.so.6
> > #1  0x2ac2836c in TXT_DB_version () from /usr/lib/libcrypto.so.0.9.6
> > #2  0x00000000 in ?? ()
> > (gdb)
> > 
> > 
> > -- 
> > IMP mailing list
> > Frequently Asked Questions: http://horde.org/faq/
> > To unsubscribe, mail: imp-unsubscribe@lists.horde.org
> > 
> 
> 
> 
> 
> -- 
> IMP mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>