Apache with PHP and PGSQL crashing ...

Apache with PHP and PGSQL crashing ...

Post by Thomas Seife » Tue, 19 Jun 2001 15:59:23



Hi folks,

I have compiled my own apache (1.3.20) with php(4.0.5) with mysql and
pgsql-support and apc too.
Now I started it and after some minutes a apache-child dies with gdb telling:
###
Program received signal SIGSEGV, Segmentation fault.
0x400252ef in resetPQExpBuffer () from /usr/local/pgsql/lib/libpq.so.2
###

Do you have any idea what went wrong?

Thomas

--
Thomas Seifert

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

 
 
 

Apache with PHP and PGSQL crashing ...

Post by Tom La » Wed, 20 Jun 2001 00:47:35



> Program received signal SIGSEGV, Segmentation fault.
> 0x400252ef in resetPQExpBuffer () from /usr/local/pgsql/lib/libpq.so.2
> Do you have any idea what went wrong?

No ... could we see a de* backtrace from the core dump?

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.veryComputer.com/

 
 
 

Apache with PHP and PGSQL crashing ...

Post by Tom La » Wed, 20 Jun 2001 05:41:01



> #0  0x400252ef in resetPQExpBuffer () from /usr/local/pgsql/lib/libpq.so.2
> #1  0x4002537d in printfPQExpBuffer () from /usr/local/pgsql/lib/libpq.so.2
> #2  0x400213e7 in PQgetResult () from /usr/local/pgsql/lib/libpq.so.2
> #3  0x40021467 in PQexec () from /usr/local/pgsql/lib/libpq.so.2
> #4  0x80eafa3 in _rollback_transactions (rsrc=0x8378268) at pgsql.c:168
> #5  0x8146ee4 in zend_hash_apply (ht=0x82c0ad4,
>      apply_func=0x80eaf80 <_rollback_transactions>) at zend_hash.c:692
> #6  0x80eb140 in php_rshutdown_pgsql (type=1, module_number=20) at pgsql.c:246

Hm.  As best I can tell, the only way that that path of control could
occur is if conn->asyncStatus contains an invalid value.  Since
resetPQExpBuffer is also seemingly dying because of an invalid value
in the PGconn record, my bet is that _rollback_transactions is passing
an invalid PGconn (perhaps one that's already been freed?) to PQexec.

At this point I think you need an Apache/PHP/Zend expert, not a Postgres
expert ...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

 
 
 

Apache with PHP and PGSQL crashing ...

Post by Thomas Seife » Wed, 20 Jun 2001 06:08:02




> > Program received signal SIGSEGV, Segmentation fault.
> > 0x400252ef in resetPQExpBuffer () from /usr/local/pgsql/lib/libpq.so.2

> > Do you have any idea what went wrong?

>No ... could we see a de* backtrace from the core dump?

I don't know if I did it right:

I made '"gdb httpd;r -X" and as it segfaults I made "where" or "back"
(produced the same output).
If I made it wrong please give me some instructions ...

The output was:
#0  0x400252ef in resetPQExpBuffer () from /usr/local/pgsql/lib/libpq.so.2
#1  0x4002537d in printfPQExpBuffer () from /usr/local/pgsql/lib/libpq.so.2
#2  0x400213e7 in PQgetResult () from /usr/local/pgsql/lib/libpq.so.2
#3  0x40021467 in PQexec () from /usr/local/pgsql/lib/libpq.so.2
#4  0x80eafa3 in _rollback_transactions (rsrc=0x8378268) at pgsql.c:168
#5  0x8146ee4 in zend_hash_apply (ht=0x82c0ad4,
     apply_func=0x80eaf80 <_rollback_transactions>) at zend_hash.c:692
#6  0x80eb140 in php_rshutdown_pgsql (type=1, module_number=20) at pgsql.c:246
#7  0x8144409 in module_registry_cleanup (module=0x831bcf8) at zend_API.c:785
#8  0x8146ee4 in zend_hash_apply (ht=0x82c0c80,
     apply_func=0x81443dc <module_registry_cleanup>) at zend_hash.c:692
#9  0x81437d4 in zend_deactivate_modules () at zend.c:522
#10 0x80be0b0 in php_request_shutdown (dummy=0x0) at main.c:670
#11 0x80bbf80 in php_apache_request_shutdown ()
#12 0x81723f9 in run_cleanups ()
#13 0x817091d in ap_clear_pool ()
#14 0x817099f in ap_destroy_pool ()
#15 0x8181703 in child_main ()
#16 0x8181881 in make_child ()
#17 0x81819fc in startup_children ()
#18 0x818206c in standalone_main ()
#19 0x81828bc in main ()
#20 0x40162a42 in __libc_start_main () from /lib/libc.so.6

Regards,

Thomas

Quote:>                         regards, tom lane

--
Thomas Seifert

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command

 
 
 

1. Apache/PHP/Informix and Apache/Perl/Informix

For instaling DBD:DBI:Informix try typing as root

# perl -MCPAN -e 'install DBD::Informix'

you need to have Internet access from the server.

To add ifx_* functions to PHP without afecting to much the current apache
server (about 2 minutes down time).

1 Download source tarball in a temp directory (apache/php)
2 You already have CSDK configured and running
3 Configure Apache/PHP with the apropiate options
4 Make but don't install both programs
5 Stop current server (apachectl stop)
6a Backup current binaries (httpd, libphp4.a).
6b Copy the new libraries/programs to the current directories.
  (httpd, libphp4.a)
7 Start the new server (apachectl start)

2. Transaction LOG - what's inside?

3. useability of apache, PHP, Postgres for real business apps

4. ADO, SQL Server and UniqueIdentifier Column

5. PHP 4.2.3 + Apache 1.3.27 + Online 5.2 Redhat 7.3 + CSDK 2.8

6. DeZign now supports sybase

7. Apache 1.3.20, PHP 4.06 and Sybase 11.0.3 install

8. Outdated Statistics

9. Postgres/PHP, Apache child processes dying

10. Apache + PHP + SQL 7.0

11. ADMINISTRATION/TUNING ORACLE VIA APACHE/PHP

12. ORACLE8i+APACHE+PHP error ORA-12154

13. Apache+php+sybase (anywhere) ??