Thread: Apache with PHP and PGSQL crashing ...
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 mailto:ts77@gmx.de
How can I disable WAL? As many benefits it may have in speed and stability, I need to disable it in order to restore a database. My 10 Gb database, for some reason, won't restore on a 40 GB disk because pg_xlog blows all the available space, after which postmaster craches... Is there a configuration file switch that I can use? It totally excapes me why that amount of disk space is required - the database is about 10 GB in postgres. It dumps to roughly 6 GB. But it then 25 GB of free space is not enough to restore it. What's going on? Cheers. Gordan
Thomas Seifert <TS77@gmx.de> writes: > 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 debugger backtrace from the core dump? regards, tom lane
Thomas Seifert <TS77@gmx.de> writes: > #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
At 17:23 18.06.2001, you wrote: >Thomas Seifert <TS77@gmx.de> writes: > > 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 debugger 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 > regards, tom lane -- Thomas Seifert mailto:ts77@gmx.de