php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15424 sybase_pconnect work, sybase_connect segfaults
Submitted: 2002-02-07 06:28 UTC Modified: 2002-06-27 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: tcurdt at dff dot st Assigned:
Status: No Feedback Package: Sybase-ct (ctlib) related
PHP Version: 4.1.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tcurdt at dff dot st
New email:
PHP Version: OS:

 

 [2002-02-07 06:28 UTC] tcurdt at dff dot st
It's very strange sybase_pconnect works just fine but sybase_connect lets the child segfault (11) and die.

I have done a strace and it looks like the connect works
and data is transmitted. But at the end (doesn't matter
if call sybase_close or not) the child dies.

Here is the strace:

[pid 23318] open("/opt/sybase/interfaces", O_RDONLY) = 5
[pid 23318] lseek(5, 0, SEEK_SET)       = 0
[pid 23318] read(5, "orga-shops\n        query tcp eth"..., 512) = 96
[pid 23318] open("/opt/sybase/locales/us_english/iso_1/libinsck.loc", O_RDONLY) = 8
[pid 23318] read(8, "\n; comment character is a semico"..., 512) = 512
[pid 23318] read(8, "kslash is the escape symbol.\n[la"..., 512) = 512
[pid 23318] close(8)                    = 0
[pid 23318] pipe([8, 9])                = 0
[pid 23318] fcntl64(8, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
[pid 23318] fcntl64(9, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
[pid 23318] socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 10
[pid 23318] setsockopt(10, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
[pid 23318] setsockopt(10, SOL_SOCKET, SO_LINGER, [0], 8) = 0
[pid 23318] fcntl64(10, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
[pid 23318] connect(10, {sin_family=AF_INET, sin_port=htons(2635), sin_addr=inet_addr("217.6.225.82")}}, 16) = -1 EINPROGRESS (Operation now in progress)
[pid 23318] select(11, [8], [10], [8], {60, 0}) = 1 (out [10], left {60, 0})
[pid 23318] connect(10, {sin_family=AF_INET, sin_port=htons(2635), sin_addr=inet_addr("217.6.225.82")}}, 16) = 0
[pid 23318] select(9, [8], [], [8], {0, 0}) = 0 (Timeout)
[pid 23318] close(5)                    = 0
[pid 23318] getpid()                    = 23318
[pid 23318] send(10, "\2\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512, 0) = 512
[pid 23318] send(10, "\2\1\0]\0\0\0\0\0\0\0\0\0\0\n\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 93, 0) = 93
[pid 23318] recv(10, "\4\1\0K\0\0\0\0", 8, 0) = 8
[pid 23318] recv(10, "\255\"\0\5\5\0\0\0\30Adaptive Server Anywher"..., 67, 0) = 67
[pid 23318] send(10, "\17\1\0!\0\0\0\0!\24\0\0\0\0SELECT * from dumm"..., 33, 0) = 33
[pid 23318] recv(10, "\4\1\0,\0\0\0\0", 8, 0) = 8
[pid 23318] recv(10, "\356\23\0\1\0\tdummy_col\20\7\0\0\0008\0\321\0\0\0\0\375"..., 36, 0) = 36
[pid 23318] send(10, "\17\1\0\n\0\0\0\0q\0", 10, 0) = 10
[pid 23318] recv(10, "\4\1\0\21\0\0\0\0", 8, 0) = 8
[pid 23318] recv(10, "\375\0\0\0\0\0\0\0\0", 9, 0) = 9
[pid 23318] --- SIGSEGV (Segmentation fault) ---
<... select resumed> )                  = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) ---


Here is my configure string:
./configure' '--prefix=/usr/share' '--datadir=/usr/share/php'
'--bindir=/usr/bin' '--libdir=/usr/share'
           '--with-config-file-path=/etc'
'--with-exec-dir=/usr/lib/php/bin' '--with-sybase-ct=/opt/sybase'
'--with-mysql=/usr' '--with-gd=yes'
     '--enable-gd-native-ttf' '--enable-gd-imgstrttf'
'--with-tiff-dir=/usr' '--with-jpeg-dir=/usr' '--with-png-dir=/usr'
'--with-xpm-dir=/usr/X11R6'
       '--with-ldap=yes' '--with-zlib=yes' '--with-bz2' '--with-gmp'
'--with-xml' '--with-ttf' '--with-t1lib' '--with-mcal=/usr'
'--with-imap=yes'
           '--with-sablot' '--with-ftp' '--with-ndbm' '--with-gdbm'
'--with-mcrypt' '--with-gettext' '--with-mm' '--with-gd=yes'
'--with-iodbc'
             '--enable-versioning' '--enable-yp' '--enable-bcmath'
'--enable-trans-sid' '--enable-inline-optimization' '--enable-track-vars'
        '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets'
'--enable-sysvsem' '--enable-sysvshm' '--enable-shmop'
'--enable-calendar'
         '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-exif'
'--enable-ftp' '--enable-memory-limit' '--enable-wddx' '--enable-filepro'
      '--enable-dbase' '--enable-ctype' '--disable-debug'
'--enable-force-cgi-redirect' '--enable-discard-path' '--enable-sigchild'
'--with-openssl'
                    '--with-imap-ssl' '--with-gd=yes'
'--with-apxs=/usr/sbin/apxs' '--with-pgsql=/usr' '--with-snmp'
'i386-suse-linux'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-11 11:18 UTC] tcurdt at dff dot st
I replace the libphp4.so with an older version 
(4.0.4pl1 Build Date Mar 8 2001) and sybase_connect
was back working. This seems to proof that the bug was introduced somewhere between 4.0.4pl1 and 4.1.1)

Actually it looks like somwhow the closing of the connection is the problem.
 [2002-05-26 13:32 UTC] derick@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.


 [2002-05-27 01:19 UTC] tcurdt at dff dot st
Derick, thanks for at least looking into it... currently I
don't have that system available and not the time to set up
a new one to get the backtrace... but expect that in 1-2
weeks. I'll get back to you - if that's ok... I know from
the projects that I am involved in that sometimes it takes
ages until a bug is reviewed again ;-)
 [2002-06-27 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jun 06 03:03:42 2023 UTC