|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-09-08 22:04 UTC] davidb at pins dot net
Description: ------------ Greetings. I'm currently observing a reproducible version of bug #26647 in the PHP 5.1 train. For a subset of users running mostly Mac but some PC browsers, the PHP process unceremoniously exists witout comment when the form is POST'ed. A truss of the PHP FastCGI process shows PHP reading in the text (incidently, it's also pointed out a performance issue where php's doing a read() of 8 bytes at a time from the FastCGI stream instead of 8kB at at a time, but I digress). The problem appears to go away when I switch to a non-FastCGI version. The broken users are broken consistently - it would be possible (and easy) to gdb trace it and see why it's exiting. Here's the start/end of the truss: accept(0, 0xFFBEDA50, 0xFFBED99C, 1) = 4 fcntl(0, F_SETLK, 0xFFBEDA28) = 0 poll(0xFFBED8F0, 1, 1000) = 0 shutdown(4, 1, 1) = 0 recv(4, "0101\001\0\b\0\0", 8, 0) = 8 recv(4, "\001\0\0\0\0\0\0", 8, 0) = 8 recv(4, "0104\001\015\0\0", 8, 0) = 8 recv(4, "0E05 C O N T E N", 8, 0) = 8 recv(4, " T _ L E N G T H", 8, 0) = 8 recv(4, " 8 3 5 1 90104\0", 8, 0) = 8 recv(4, "01\0 d\0\0\f V C", 8, 0) = 8 recv(4, " O N T E N T _ T", 8, 0) = 8 recv(4, " Y P E m u l t i", 8, 0) = 8 recv(4, " p a r t / f o r", 8, 0) = 8 recv(4, " m - d a t a ; ", 8, 0) = 8 recv(4, " b o u n d a r y", 8, 0) = 8 recv(4, " m L b O u N d A", 8, 0) = 8 (many many lines) recv(4, " r Y - -\r\n0105", 8, 0) = 8 recv(4, "\001\0\0\0\0", 8, 0) = 6 recv(4, 0xFFBEDA28, 8, 0) = 0 close(4) = 0 fcntl(0, F_SETLKW, 0xFFBEDA28) = 0 accept(0, 0xFFBEDA50, 0xFFBED99C, 1) (sleeping...) Bam. Goodbye. No error, no nothing. Reproduce code: --------------- <html> <head> </head> <body> <form method="post" action="response.php" enctype="multipart/form-data"> <input name="test" type="file"> <input name="submit" value="submit" type="submit" /> </form> </body> </html> Expected result: ---------------- The response.php should work - note, however, that php never even attempts to open the response.php file, which is just a trivial "file uploaded" message, no attempt to save. Actual result: -------------- See above truss - php just exits. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 17:00:01 2025 UTC |
A few other quick comments: - Perl + CGI::Fast hasn't reported any of these problems - This is only affecting a small subset of users, but those users tend to continue to have the problems recur - The users with recurring problems will sometimes suddenly, and without warning, start working again I strongly suspect some odd network interaction, but I'm not entirely sure where to dig deeper just yet. The FastCGI PHP instance is linked as a local UNIX socket: FastCgiServer /export/httpd/DOMAINS/host.forward.com/cgi-bin/php -port 9050 AddHandler php-fastcgi .php <Location /cgi-bin/php> SetHandler fastcgi-script </Location> Action php-fastcgi /cgi-bin/php There are several other vhosts that use teh FastCgiExternalServer directive. We are using the PHP process manager to front-end the PHP work threads by setting PHP_FCGI_CHILDREN.Greetings. I tried with the latest 5.2 (downloaded today). It doesn't seem to make a difference. The poll() still exits with 0, then proceeds to read everything in anyway. Heres the truss, with timestamps this time: 94.3878 accept(0, 0xFFBEDC78, 0xFFBEDBC4, 1) = 4 AF_UNIX name = 94.3880 fcntl(0, F_SETLK, 0xFFBEDC50) = 0 typ=F_UNLCK whence=SEEK_SET start=0 len=0 sys=4290697848 pid=2086536 95.3952 poll(0xFFBEDB18, 1, 1000) = 0 fd=4 ev=POLLRDNORM rev=0 95.3959 shutdown(4, 1, 1) = 0 recv(4, 0xFFBEDC50, 8, 0) (sleeping...) signotifywait() (sleeping...) lwp_sema_wait(0xFD70DE60) (sleeping...) sema type: USYNC_THREAD count = 0 103.4047 recv(4, "0101\001\0\b\0\0", 8, 0) = 8 103.4050 recv(4, "\001\0\0\0\0\0\0", 8, 0) = 8 103.4051 recv(4, "0104\001\016\0\0", 8, 0) = 8 103.4051 recv(4, "0E06 C O N T E N", 8, 0) = 8 103.4052 recv(4, " T _ L E N G T H", 8, 0) = 8 103.4053 recv(4, " 1 2 8 9 9 00104", 8, 0) = 8 103.4054 recv(4, "\001\0 E\0\0\f 7", 8, 0) = 8 103.4055 recv(4, " C O N T E N T _", 8, 0) = 8 103.4055 recv(4, " T Y P E m u l t", 8, 0) = 8 .... I guess the big question is why is poll exiting with 0 when there's a pile of valid data? David.Greetings. I pulled the file out of CVS and built it. I see that the line you changed is the struct tv{} stuff. After some testing, it looks like moving it to 5 seconds helped, but did not fix the problem 100% of the time. I moved it to 20 seconds, and that seems to fix the problem for our developers in Australia who were experiencing it the most. I also backported this into 5.1.6 (it was only the single line change) and that seems to work there as well. Can we put this on closed for now, and I'll reopen it if it doesn't fix it permenantly?