php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56739 Segmentation fault ocurrs when using APC, phpPgAdmin4
Submitted: 2005-12-21 01:57 UTC Modified: 2006-02-26 17:39 UTC
From: vinvinma at gmail dot com Assigned: rasmus (profile)
Status: Closed Package: APC (PECL)
PHP Version: 5.1.1 OS: Freebsd 6.0
Private report: No CVE-ID: None
 [2005-12-21 01:57 UTC] vinvinma at gmail dot com
Description:
------------
Segmentation fault occurs when enables APC with phpPgAdmin4.  It seems left hand side menu php code doesn't work well with APC.

If turn it off, then everything is alright.

OS : Freebsd 6.0
Database : postgresql 8.1

Reproduce code:
---------------
Just try to turn on APC with phpPgAdmin4 and login.  Then you will see "page not found", and see line "segmentation fault" in httpd log.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-21 02:05 UTC] pierre dot php at gmail dot com
change category.
 [2005-12-21 02:21 UTC] vinvinma at gmail dot com
apache 2.0.55
APC 3.0.8
 [2006-01-05 15:56 UTC] gopalv82 at yahoo dot com
Can you run httpd in standalone mode

gdb httpd
(gdb) run -X

and then give me a backtrace of what's segfaulting ?
 [2006-01-06 02:50 UTC] vinvinma at gmail dot com
gdb httpd
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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-marcel-freebsd"...(no debugging symbols found)...

(gdb) run
Starting program: /usr/local/sbin/httpd 
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...gdb in realloc(): error: pointer to wrong page
Abort (core dumped)

Httpd cannot be started in gdb. why?  httpd is working outside gdb.  

Sorry, what do you mean run httpd in standalone mode,  i just run apache as normal. This may result in core dump when httpd run with gdb.

Now, i have to use apc.filters = "-phpPgAdmin/.*" to exclude phpPgAdmin's code.
 [2006-02-03 08:14 UTC] steven dot aerts at gmail dot com
I have the same problem.
But when testing, one time apache's error_log produced these cryptic messages:
[Fri Feb 03 13:54:41 2006] [notice] Apache/2.0.54 (Fedora) configured -- resuming normal operations
[Fri Feb 03 13:54:41 2006] [info] Server built: Jan 17 2006 06:36:00
[Fri Feb 03 13:54:41 2006] [debug] prefork.c(956): AcceptMutex: sysvsem (default: sysvsem) 
PHP Warning:  session_start(): open(/var/tmp/sess_qrcdmk8tipdimu8hqt9e1inih0, O_RDWR) failed: Permission denied (13) in /var/www/html/flyspray/header.php on line 100 
PHP Warning:  session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/html/flyspray/header.php:100) in /var/www/html/flyspray/header.php on line 100
PHP Warning:  session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/html/flyspray/header.php:100) in /var/www/html/flyspray/header.php on line 100
PHP Warning:  pg_connect(): Unable to connect to PostgreSQL server: could not create socket: Permission denied in /var/www/html/flyspray/adodb/drivers/adodb-postgres64.inc.php on line 662
PHP Warning:  Unknown: open(/var/tmp/sess_qrcdmk8tipdimu8hqt9e1inih0, O_RDWR) failed: Permission denied (13) in Unknown on line 0
PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/tmp) in Unknown on line 0
[Fri Feb 03 13:54:56 2006] [notice] child pid 2844 exit signal Segmentation fault (11)

I am almost certain this as something to do with postgresql. As vinvinma, my version of postgresql is 8.1 to.  And I don't have any problem with pages which uses no postgresql.

I hope this wil shed some light on the problem.
 [2006-02-03 08:21 UTC] steven dot aerts at gmail dot com
Oh yeah, one thing.  I can view the page the first time without any problems, it is the second time, cache hit?, that the server crashes.
 [2006-02-24 10:50 UTC] rasmus@php.net
Please try current CVS and let us know if it is still happening.
 [2006-02-26 16:57 UTC] vinvinma at gmail dot com
where is a CVS server?  I cannot find info on the web.
 [2006-02-26 17:08 UTC] rasmus@php.net
cvs.php.net

cvs -d :pserver:cvsread@cvs.php.net:/repository login
cvs -d :pserver:cvsread@cvs.php.net:/repository co pecl/apc
cd pecl/apc
phpize
./configure --enable-apc-mmap
make
make install
 [2006-02-26 17:30 UTC] vinvinma at gmail dot com
Thank rasmus!!!  PhPpgAdmin4 is working now in 3.0-dev without filter. I appreicate you resolve this bug.  

However, i hope the other bug : http://pecl.php.net/bugs/bug.php?id=5314, could be resolved as soon as, because we have to turn off APC for PHP5 OO classes which call parent::();

We rewrote a lot package as PHP5 OO style recently, but we cannot cache it.
 [2006-02-26 17:39 UTC] rasmus@php.net
ok, bug fixed then.  Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 09:01:29 2024 UTC