Bug 14195 - when posting a form with an <input type='file'> to 127.0.0.1, the browser simply hangs...
Summary: when posting a form with an <input type='file'> to 127.0.0.1, the browser sim...
Status: RESOLVED DUPLICATE of bug 5760
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Critical
Assignee: Nobody
URL: http://localhost
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-16 22:14 PDT by michael geary
Modified: 2007-09-08 12:57 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description michael geary 2007-06-16 22:14:26 PDT
the server doesn't even get hit, as far as i've observed. This doesn't happen every time, but it happens with at least even odds. I've observed it in the shipping version of Safari 2, the nightly build of WebKit, and the beta of Safari 3. It's quite easy to reproduce, and it's easy to observe, since a submission that should take seconds just hangs and hangs. I'm running Apache 2.x on OS X 10.4.9
Comment 1 David Kilzer (:ddkilzer) 2007-06-17 07:52:41 PDT
Thanks for the bug report, Michael!  Does it matter whether you loaded the page with the form using 127.0.0.1 versus localhost?  Are you connected to the Internet (or a LAN) when this happens?

Are you actually selecting a file to be submitted, or are you leaving the file input blank?  If selecting a file, what type of file is it?

What exact version of Apache are you using (since Apache 2.x didn't come with OS X 10.4.9)?  Did you compile it from source, or are you use a precompiled distribution?
Comment 2 michael geary 2007-06-17 11:00:28 PDT
i always connect to 127.0.0.1, rather than localhost, but i'll try localhost going forward to see if this persists. I am generally connected to a Lan (wifi) when this happens. 

The issue only happens when i have selected a file. If i just submit data, i never see the problem. The type of file doesn't seem to matter. It's happened most recently with PDF and CSV files. 

Now that i've submitted this bug, of course, the issue doesn't seem to be as reliably reproduced, but it is still there, i'm sure of it.

I compiled Apache myself. Tthe httpd -V output is below. However, it should be noted that when this problem occurs, the server never gets the request. Even putting a PHP "die()" at the top of the file receiving the upload produces no results when the bug happens.

Server version: Apache/2.2.3
Server built:   Oct 30 2006 23:55:59
Server's Module Magic Number: 20051115:3
Server loaded:  APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
Comment 3 Alexey Proskuryakov 2007-07-19 05:40:54 PDT
Could you please attach samples of WebKit and Apache when this happens? You can take a sample with Applications/Utilities/Activity Monitor.app.
Comment 4 Bernard Bernu 2007-09-08 03:03:28 PDT
I just checking for the first time this site looking for upload bugs.
I remarked that particular bug since Safari 2 and still see it in Safari 3 and WebKit (at least until r25410).
Because it I could never reproduced it I spent hours to try find where my javascript could be wrong (We are developing a Web site and I mainly develop on localhost). 
I'm under MacOSX.4.10. I'm effectively almost all time connected thru AirPort.
I do not remember I that bug appears when uploading to not localhost.
I got the impression (sorry, not very scientific) the the problem arises every around 20 uploads.

Comment 5 David Kilzer (:ddkilzer) 2007-09-08 09:25:30 PDT
The next time this happens, please run the following commands:

% sample Safari 10 10
% sample httpd 10 10

Note that you may also use Activty Monitor to take samples.

Also note that since Apache is multi-threaded, you may need to run something like "ps auwwx | grep httpd" to find the correct process ID (PID) to use with sample:

% sample PID 10 10

After doing this, please attach the sample output files created in /tmp/ to this bug.

Comment 6 David Kilzer (:ddkilzer) 2007-09-08 09:35:47 PDT
BTW, this sounds like it may be a duplicate of Bug 5760.

Comment 7 David Kilzer (:ddkilzer) 2007-09-08 09:48:59 PDT
After re-reading Bug 5760 Comment #38, this is almost certainly a duplicate of that bug.

There is no need to run sample(1) per Comment #5.



*** This bug has been marked as a duplicate of 5760 ***
Comment 8 Bernard Bernu 2007-09-08 12:52:29 PDT
(In reply to comment #7)
> After re-reading Bug 5760 Comment #38, this is almost certainly a duplicate of
> that bug.
> 
> There is no need to run sample(1) per Comment #5.
> 
> 
> 
> *** This bug has been marked as a duplicate of 5760 ***
> 
I agree, it sounds very much the same bug.
From #41 of bug 6760, do I understand correctly that there is actually no work around to this bug ?

Comment 9 David Kilzer (:ddkilzer) 2007-09-08 12:57:57 PDT
(In reply to comment #8)
> I agree, it sounds very much the same bug.
> From #41 of bug 6760, do I understand correctly that there is actually no work
> around to this bug ?

The only work-around that I can think of is to move the server off the local machine so that you're going over the network instead of hitting it locally.  I'm not positive, but I think the bug occurs when you're using localhost, 127.0.0.1, an IP address bound to an ethernet port or wireless connection, or the hostname associated with that bound IP address.

It's rather unfortunate that this hasn't really been fixed yet.