|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1313 (at least) fclose() causes PHP module SIGSEGV crash
Submitted: 1999-04-13 22:09 UTC Modified: 1999-05-16 11:16 UTC
From: simon at airdmhor dot gen dot nz Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.7 OS: Linux RH5.2 + upgrades
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.
Block user comment
Status: Assign to:
Bug Type:
From: simon at airdmhor dot gen dot nz
New email:
PHP Version: OS:


 [1999-04-13 22:09 UTC] simon at airdmhor dot gen dot nz
This might be a lib problem or something, I first noticed it after the system was upgraded by a bunch of new  libraries and stuff. (libc=5.3.12; glibc=2.1.1; apache 1.3.6, kernel=2.2.5)

The simplest program that causes the crash is: (crash.php3)

echo "fopen()=", $fh = fopen("/tmp/file.txt","w"), "<br>\n";
echo "fclose()=", fclose($fh), "<br>\n";

Yes, fopen() opens fine, tested seperately also. Can read and write from a file fine, just crashing when closes.

From apache error_log:
[notice] child pid 16580 exit signal Segmentation fault (11)

From strace output against apache
16580 13:53:50 stat("/tmp/file.txt", {st_mode=0, st_size=0, ...}) = 0
16580 13:53:50 stat("/tmp", {st_mode=0, st_size=0, ...}) = 0
16580 13:53:50 open("/tmp/file.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 5
16580 13:53:50 close(5)                 = 0
16580 13:53:50 --- SIGSEGV (Segmentation fault) ---
16580 13:53:50 chdir("/etc/httpd")      = 0
16580 13:53:50 SYS_174(0xb, 0xbfffe490, 0xbfffe404, 0x8, 0xb) = 0
16580 13:53:50 getpid()                 = 16580
16580 13:53:50 kill(16580, SIGSEGV)     = 0
16580 13:53:50 sigreturn()              = ? (mask now [])
16580 13:53:50 --- SIGSEGV (Segmentation fault) ---
16579 13:53:50 <... fcntl resumed> )    = 0

Yep, I know it's not very useful, but I'm out of places to look. It *looks* like a lib problem or something, but I don't know how to get any more low-level debugging. The system does not have gdb, so I can't generate a backtrace - will that show more info than strace? If so I can try and install that stuff. 

Feel free to contact me for more info, etc,


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-05-16 11:16 UTC] ssb at cvs dot php dot net
should be fixed now.  please check out the latest CVS
and test it.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Dec 08 06:05:52 2022 UTC