php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34662 Segmentation fault at the end of execution
Submitted: 2005-09-27 19:17 UTC Modified: 2005-09-27 22:34 UTC
From: nik at optim dot com dot ru Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 5.0.5 OS: Fedora Core 4
Private report: No CVE-ID: None
 [2005-09-27 19:17 UTC] nik at optim dot com dot ru
Description:
------------
My CLI scripts that use PostgreSQL function finish with
"segmentation fault". Besides that the entire process is what it should be. Looks like the problem is somewhere in the very finalization.
The problem persists in RPM-versions
5.0.4-10.4, 5.0.4-10, 5.0.5.


Looks like there is nothing similar reported.
I googled the suggestion about SELECT permissions on
pg_ tables as a possible workaround. but it didn't help.

I noticed, that the problem appears when I use TCP/IP
connection to my Postgres daemon, i.e. with a hostname.

When I switch to a local socket connection, i.e. with NULL hostname, the problem dissappeares.

5.0.4_2 version compiled for FreeBSD works fine.
Other scripts without postgres function call work fine.


Please, let me know what to do, I can try to compile different versions and see what happens.

Thanks


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-27 19:20 UTC] johannes@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Additionally it would be good if you could try to make a 
short reproduce script which fails. 
 [2005-09-27 21:29 UTC] nik at optim dot com dot ru
Hi, I tried to obtain the backtrace as you require.
Is it what you need?

#0  0x00399234 in ?? ()
#1  0x0041d60c in CRYPTO_lock () from /lib/libcrypto.so.5
#2  0x0046b082 in ERR_set_implementation () from /lib/libcrypto.so.5
#3  0x0046b935 in ERR_free_strings () from /lib/libcrypto.so.5
#4  0x0084d3d2 in Curl_SSL_cleanup () from /usr/lib/libcurl.so.3
#5  0x008567e6 in curl_global_cleanup () from /usr/lib/libcurl.so.3
#6  0x0808683b in zm_shutdown_curl ()
#7  0x081afb7e in module_destructor ()
#8  0x081b5727 in zend_hash_apply_deleter ()
#9  0x081b5937 in zend_hash_graceful_reverse_destroy ()
#10 0x081acdde in zend_shutdown ()
#11 0x0816cfff in php_module_shutdown ()
#12 0x081eaf32 in main ()
 [2005-09-27 21:32 UTC] nik at optim dot com dot ru
Oh, the version I actually used to generate the backtrace was 5.0.4-10.4


But the problem is in 5.0.5 (non-debugging compilation) too
 [2005-09-27 21:33 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-09-27 22:21 UTC] nik at optim dot com dot ru
There is no problem in the latest version.
I tried really minimalistic  compilation.

./configure --disable-all --with-pgsql --with-zlib --enable-xml --enable-libxml --enable-debug --with-pcre-regex --with-regex


I would be nice, however, to patch older versions too, or merge there changes from the latest one.

Well, it will still take some time for Fedora people to accomodate the changes anyway.
 [2005-09-27 22:24 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip

And what if you try this too?
 [2005-09-27 22:32 UTC] nik at optim dot com dot ru
No, there is no such problem in the STABLE snapshot.
 [2005-09-27 22:34 UTC] tony2001@php.net
So it's fixed apparently.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 23:01:30 2024 UTC