Bug #15316 Updated: Segmentation fault on Interbase blob creation

From: Date: Thu, 21 Feb 2002 23:59:11 +0000
Subject: Bug #15316 Updated: Segmentation fault on Interbase blob creation
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-768@lists.php.net to get a copy of this message
ID: 15316 Updated by: bknotts@europa.com Reported By: bknotts@europa.com Status: Feedback Bug Type: InterBase related Operating System: Linux 2.4.17-xfs PHP Version: 4.1.1 New Comment: Incidentally, I have tried every which way to get a core dump, but even after running apache on port 1025 as a non-root user, and checking permissions on the CoreDumpDirectory, no core file is created. So, I tried attaching gdb to specific processes, but for some reason, when I attach gdb to a particular process, the process no longer accepts connections. Any hints? Previous Comments: ------------------------------------------------------------------------ [2002-02-21 17:55:53] bknotts@europa.com Still unable to generate a backtrace, but running strace reveals this: [pid 27126] recv(5, "\0\0\0\t\377\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 8192, 0) = 32 [pid 27126] semop(32769, 0xbfffb5f8, 2) = 0 [pid 27126] semop(32769, 0xbfffb5fc, 1) = 0 [pid 27126] send(5, "\0\0\0C\0\0\0\5\0\0\0\2", 12, 0) = 12 [pid 27126] select(6, [5], NULL, NULL, {60, 0}) = 1 (in [5], left {60, 0}) [pid 27126] recv(5, "\0\0\0\t\377\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 8192, 0) = 32 [pid 27126] semop(32769, 0xbfffb5f8, 2) = 0 [pid 27126] semop(32769, 0xbfffb5fc, 1) = 0 [pid 27126] open("/www/heritage.legacyunlimited.com/pages/footer.php", O_RDONLY|O_LARGEFILE) = 8 [pid 27126] getcwd("/www/heritage.legacyunlimited.com/pages/customize", 4095) = 50 [pid 27126] lstat64("/www", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0 [pid 27126] lstat64("/www/heritage.legacyunlimited.com", {st_mode=S_IFDIR|0775, st_size=156, ...}) = 0 [pid 27126] lstat64("/www/heritage.legacyunlimited.com/pages", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0 [pid 27126] lstat64("/www/heritage.legacyunlimited.com/pages/footer.php", {st_mode=S_IFREG|0664, st_size=4322, ...}) = 0 [pid 27126] ioctl(8, SNDCTL_TMR_TIMEBASE, 0xbfffb67c) = -1 EINVAL (Invalid argument) [pid 27126] fstat64(8, {st_mode=S_IFREG|0664, st_size=4322, ...}) = 0 [pid 27126] old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40277000 [pid 27126] read(8, "<?\n/* OLD COPYRIGHT LINKS---\nAc"..., 8192) = 4322 [pid 27126] read(8, "", 4096) = 0 [pid 27126] read(8, "", 8192) = 0 [pid 27126] ioctl(8, SNDCTL_TMR_TIMEBASE, 0xbfffa658) = -1 EINVAL (Invalid argument) [pid 27126] close(8) = 0 [pid 27126] munmap(0x40277000, 4096) = 0 [pid 27126] munmap(0x403a1000, 94208) = 0 [pid 27126] chdir("/") = 0 [pid 27126] send(6, "\0\0\0\25\0\0\0\0", 8, 0) = 8 [pid 27126] select(7, [6], NULL, NULL, {60, 0}) = 1 (in [6], left {60, 0}) [pid 27126] recv(6, "\0\0\0\t\0\0\0\0\0\0\0\0@3\256L\0\0\0\0\0\0\0\1\0\0\0\0"..., 8192, 0) = 32 [pid 27126] send(6, "\0\0\0\6", 4, 0) = 4 [pid 27126] shutdown(6, 2 /* send and receive */) = 0 [pid 27126] close(6) = 0 [pid 27126] close(7) = 0 [pid 27126] munmap(0x40276000, 4096) = 0 [pid 27126] open("/opt/interbase/interbase.msg", O_RDONLY) = 6 [pid 27126] read(6, "\1\0\0\4\10\377\1\0\0\0\0\0\3\0\r@", 16) = 16 [pid 27126] lseek(6, 130824, SEEK_SET) = 130824 [pid 27126] read(6, "\177\r\3\0`\363\1\0\377\377\377\377\370\376\1\0", 1024) = 16 [pid 27126] lseek(6, 127840, SEEK_SET) = 127840 [pid 27126] read(6, "\25\0\0\0\20\0\0\0*\0\0\0\350\3\0\0>\0\0\0\310\7\0\0[\0"..., 1024) = 1024 [pid 27126] lseek(6, 16, SEEK_SET) = 16 [pid 27126] read(6, "\0\0\0\0\0\0\0\0\1\0\0\0<\0\0\0arithmetic excep"..., 1024) = 1024 [pid 27126] --- SIGSEGV (Segmentation fault) --- [pid 27125] <... select resumed> ) = ? ERESTARTNOHAND (To be restarted) [pid 27125] --- SIGCHLD (Child exited) --- ------------------------------------------------------------------------ [2002-02-13 12:04:14] bknotts@europa.com Having trouble getting apache to listen to a port when run under gdb. Will keep trying. Can't seem to get a core file any other way. ------------------------------------------------------------------------ [2002-02-01 04:15:20] sander@php.net Can you provide a backtrace? (see http://bugs.php.net/bugs-generating-backtrace.php) ------------------------------------------------------------------------ [2002-01-31 13:08:32] bknotts@europa.com Here is my configure line: ./configure --with-apxs --with-mysql=/usr --enable-track-vars --with-ldap --with-unixODBC=/usr --with-mcrypt --with-interbase=/opt/interbase --with-gd=/usr ------------------------------------------------------------------------ [2002-01-31 13:04:21] bknotts@europa.com When I try to insert an image into a blob, a segmentation fault occurs in apache. This all worked fine in previous versions of php that I used (4.0.4 - 4.0.6). I have recreated this segfault on two different machines, with PHP as DSO, and compiled-in. Here is what seems to be the offending code in my script: if ($ibaseconn) { $blob_id = ibase_blob_create(); $blob_id_str = ibase_blob_close($blob_id); if ($noDB != "1") { ibase_query("UPDATE WN_Client_Data SET WN_Client_DataLogo=?, WN_Client_DataLogoType = '$thisType' WHERE WN_ClientID = '$WN_ClientID'",$blob_id_str); } else { ibase_query("INSERT INTO WN_Client_Data (WN_ClientID, WN_Client_DataLogo, WN_Client_DataLogoType, WN_Client_DataBriefDesc, WN_Client_DataExtDesc) VALUES ((SELECT WN_ClientID FROM WN_User WHERE WN_UserUserName='$HTTP_COOKIE_VARS[directUser]'), ?, ,'','', '');",$blob_id_str); } } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15316&edit=1

« previous php.bugs (#768) next »