Bug 13352 - REGRESSION: Gmail hangs on send message
Summary: REGRESSION: Gmail hangs on send message
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P1 Major
Assignee: Nobody
URL: http://mail.google.com/
Keywords: GoogleBug, InRadar, Regression
Depends on:
Blocks:
 
Reported: 2007-04-15 00:32 PDT by Ruben Bakker
Modified: 2008-04-16 10:44 PDT (History)
5 users (show)

See Also:


Attachments
The Gmail window when an infinite "Sending..." is shown (43.45 KB, image/png)
2007-04-15 00:39 PDT, Ruben Bakker
no flags Details
Contents of activity window while the infinite "Sending..." is shown (46.10 KB, image/png)
2007-04-15 00:40 PDT, Ruben Bakker
no flags Details
Ethereal screenshot of network pakets when send is OK (71.30 KB, image/png)
2007-04-15 00:41 PDT, Ruben Bakker
no flags Details
Ethereal screenshot of network pakets when send is hanging (45.22 KB, image/png)
2007-04-15 00:42 PDT, Ruben Bakker
no flags Details
Contents of the POST network paket when the send is OK (7.09 KB, text/plain)
2007-04-15 00:44 PDT, Ruben Bakker
no flags Details
Contents of the POST network paket when the send is hanging (7.23 KB, text/plain)
2007-04-15 00:45 PDT, Ruben Bakker
no flags Details
Original ethereal file when send is OK (8.06 KB, application/octet-stream)
2007-04-15 00:46 PDT, Ruben Bakker
no flags Details
Original ethereal file when send is hanging (4.79 KB, application/octet-stream)
2007-04-15 00:47 PDT, Ruben Bakker
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ruben Bakker 2007-04-15 00:32:10 PDT
When I send a Gmail message by pressing the "Send" button, the message is not delivered and the status message (right upper corner) stays on "Sending...". A second click can resolve the problem. However, this is unusable, as there may be a big upload (file attachments) going on. This does not happen always, but often: maybe about one out of ten to 20 times. 
See attached screenshots (gmail and activity window) for how it looks like for the user. 
The problem cannot be reproduced with Webkit 419.3. 

Steps to reproduce:
1) start Webkit.app
2) goto mail.google.com and log in.
3) click the link "compose message"
4) fill "To", "Subject" and message text
5) click the "Send" button
6) goto 3) until you see the infinite "Sending..." status message

I did some analyzing, and I have tried to find out why it is happening:

Console log:
I have started a debugger in the WebCore project. There are not errors shown in the console log. 

Webkit:
In my application I have registered a FrameLoadDelegate. When the faulty send happens, the delegate gets called with webView:didStartProvisionalLoadForFrame: but never with the webView:didCommitLoadForFrame:, webView:didFailProvisionalLoadWithError:forFrame:frame or webView:didFailLoadWithError:forFrame:

ethereal:
I have traced the network traffic with "ethereal". When you send a Gmail message Webkit sends a POST and then waits for a response. The POST is always sent, but there is no Google response when the problem happens. I have attached this ethereal information always for the OK and PROBLEM case: Screenshots of network traffic, text file of POST, and the original ethereal files.

Spoofing as FF:
I tried spoofing as Firefox to rule out a problem on the Google servers. It was more difficult to reproduce the problem, but it still happened.

Hint:
It seems to happen more often just before, during, or just after a Gmail autosave.
Comment 1 Ruben Bakker 2007-04-15 00:39:31 PDT
Created attachment 14036 [details]
The Gmail window when an infinite "Sending..." is shown
Comment 2 Ruben Bakker 2007-04-15 00:40:50 PDT
Created attachment 14037 [details]
Contents of activity window while the infinite "Sending..." is shown
Comment 3 Ruben Bakker 2007-04-15 00:41:59 PDT
Created attachment 14038 [details]
Ethereal screenshot of network pakets when send is OK
Comment 4 Ruben Bakker 2007-04-15 00:42:28 PDT
Created attachment 14039 [details]
Ethereal screenshot of network pakets when send is hanging
Comment 5 Ruben Bakker 2007-04-15 00:44:51 PDT
Created attachment 14040 [details]
Contents of the POST network paket when the send is OK
Comment 6 Ruben Bakker 2007-04-15 00:45:41 PDT
Created attachment 14041 [details]
Contents of the POST network paket when the send is hanging
Comment 7 Ruben Bakker 2007-04-15 00:46:45 PDT
Created attachment 14042 [details]
Original ethereal file when send is OK

Open in ethereal (use MacPorts or Fink)
Comment 8 Ruben Bakker 2007-04-15 00:47:31 PDT
Created attachment 14043 [details]
Original ethereal file when send is hanging
Comment 9 Brady Eidson 2007-04-15 10:07:07 PDT
Hello Ruben,

You state this is a regression, but don't mention which revision of WebKit you were using when you encountered these results.

Using the WebKit nightlies at nightly.webkit.org could you found out between which two revisions this broke, if it was indeed a recent regression?

Thanks!
Comment 10 Ruben Bakker 2007-04-15 13:09:35 PDT
(In reply to comment #9)

Hello Brady,
I tested different versions between 20648 (4/1/07) and 20895 (4/15/07) with the same results.
When trying 20895 today: 
- Pressing "Save now," waiting for the "Draft saved ...." message beside the button and then immediately pressing Send provoked the error "Sending...", too.
- I noticed that the same problem can be reproduced with "Save now", I got an infinite "Saving..." notification.
I do not know when the regression happened. Webkit shipping with 10.4 (tiger) works, Webkit nightly between 20648 to 20895 don't.
HTH
Kind regards,
Ruben
Comment 11 Brady Eidson 2007-04-15 13:22:04 PDT
Ruben,

http://nightly.webkit.org/ has nightly builds of Webkit dating all the way back to October 2005.  It might end up being valuable if you could narrow down when this actually broke - starting with the very earliest nightly, then binary searching from there.  I suspect it might not take too long to find out when it broke!  :)
Comment 12 Ruben Bakker 2007-04-15 14:39:20 PDT
(In reply to comment #11)
Hi Brady,
3/8/07 r20057 works, I was not able to reproduce the bug.
3/9/07 r20077 is so bad, the Sending.../Saving... problem happens on first click!
HTH
Ruben
Comment 13 Gregory Block 2007-04-18 13:19:42 PDT
Sidenote....

1) this works for me, right now.
2) This might be because The Google had gmail problems on that particular day, and we were all encountering this... on pretty much every browser.  I, too, thought it might have been a nightly build but the reality probably has more to do with it being 4/15, when gmail was a bit borked.

I'd ask the original author to retest his browser on this - I'll bet this isn't actually happening anymore.
Comment 14 Mark Rowe (bdash) 2007-04-19 19:32:19 PDT
Ruben, can you please retest with the latest nightly to confirm Gregory's suspicions?
Comment 15 Ruben Bakker 2007-04-20 02:53:44 PDT
(In reply to comment #14)
I will re-test as soon as I can. 

Please keep in mind that the error could be reproduced on different days. I still get user bug reports for my application (using Webkit nightly) with the same kind of error. And no problems on same days could be reproduced with build #20057 and the Webkit installed on Tiger. If it was a server problem, I would have experienced the problem in all browser...
Comment 16 Ravi Grover 2007-05-02 22:47:46 PDT
I see this all the time too.  Have to switch to regular Safari and then everything works fine
Comment 17 Andres Gonzalez-Mancera 2007-05-14 09:49:25 PDT
I have the exact same problem and can verify that this is still happening with the current nightly build.
Comment 18 Ruben Bakker 2007-05-14 13:01:45 PDT
I have re-tested with the very latest WebKit nightly (#21448): I still get the infinite Saving... or Sending... as described in the bug. 

This is the easiest way to reproduce it:
1 compose a new message
2 write some text
3 save
4 repeat 2 + 3 until you get an infinite "Saving..." status message.

If the Google servers are at fault you get a "Oops the server was unable to perform..." after some time. In my case there is nothing, WebKit just shows the infinite red status message.

PS: In fact I have re-tested three weeks ago. I discovered today that my bug comment is missing - I somehow didn't commit it... 
Comment 19 Rachael Worthington (cheers) 2007-05-24 16:31:12 PDT
I see this in OmniWeb off of a recent webkit rev as well
Comment 20 Viktor Szathmary 2007-05-28 16:28:08 PDT
Consistently reproducible with several latest webkits. Sending e-mail in GMail is extremely unreliable - and only w/ WebKit. Other browsers (incl. Safari) work perfectly at the same time. Definitely not an issue with the GMail service itself.

Would love to see this fixed.
Comment 21 Kevin McCullough 2007-06-04 11:22:53 PDT
I can dupe this fairly easily, and the reduction information here is very helpful.  I'll start looking at this.
Comment 22 Ruben Bakker 2007-06-04 13:35:45 PDT
(In reply to comment #21)
> I can dupe this fairly easily, and the reduction information here is very
> helpful.  I'll start looking at this.
> 
This is great news! If I can help you by providing more information or do some testing, just let me know. 
Comment 23 Kevin McCullough 2007-06-04 16:47:02 PDT
I suspect the culprit checkin is related to 20074.  However I synced with the tip of tree and of course can no longer dupe with my previous steps.  I'll keep trying but can others try to find a set of steps to dupe this on TOT?
Comment 24 Ruben Bakker 2007-06-04 22:26:20 PDT
(In reply to comment #23)
> I suspect the culprit checkin is related to 20074.  However I synced with the
> tip of tree and of course can no longer dupe with my previous steps.  I'll keep
> trying but can others try to find a set of steps to dupe this on TOT?
> 

As mentioned in comment #11 I found #20057 to be the last working build:
3/8/07 r20057 works, I was not able to reproduce the bug.
3/9/07 r20077 is so bad, the Sending.../Saving... problem happens on first
click!


Comment 25 Kevin McCullough 2007-06-05 13:46:47 PDT
Have you tried r21970 or after?  I can't seem to dupe anymore.

-Kevin

(In reply to comment #24)
> (In reply to comment #23)
> > I suspect the culprit checkin is related to 20074.  However I synced with the
> > tip of tree and of course can no longer dupe with my previous steps.  I'll keep
> > trying but can others try to find a set of steps to dupe this on TOT?
> > 
> 
> As mentioned in comment #11 I found #20057 to be the last working build:
> 3/8/07 r20057 works, I was not able to reproduce the bug.
> 3/9/07 r20077 is so bad, the Sending.../Saving... problem happens on first
> click!
> 

Comment 26 Andres Gonzalez-Mancera 2007-06-05 14:05:21 PDT
I have had problems even with today's build. It seem to me that it happens mostly when you take longer composing an email.

(In reply to comment #25)
> Have you tried r21970 or after?  I can't seem to dupe anymore.
> 
> -Kevin
> 
> (In reply to comment #24)
> > (In reply to comment #23)
> > > I suspect the culprit checkin is related to 20074.  However I synced with the
> > > tip of tree and of course can no longer dupe with my previous steps.  I'll keep
> > > trying but can others try to find a set of steps to dupe this on TOT?
> > > 
> > 
> > As mentioned in comment #11 I found #20057 to be the last working build:
> > 3/8/07 r20057 works, I was not able to reproduce the bug.
> > 3/9/07 r20077 is so bad, the Sending.../Saving... problem happens on first
> > click!
> > 
> 
Comment 27 Kevin McCullough 2007-06-05 14:13:22 PDT
I had that sense too.  For my previous reproducible cases I would start drafting an e-mail, then wait for the autosave to happen, then enter a lot of information (usually through a paste).  And it would always hit the sending issue.  Now those steps aren't working for me.  I just tried typing a long e-mail that took about 5 minutes to fully draft and still didn't hit it.

If someone has reproducible steps with TOT please let me know.  I'll keep looking at it.

-Kevin

(In reply to comment #26)
> I have had problems even with today's build. It seem to me that it happens
> mostly when you take longer composing an email.
> 
> (In reply to comment #25)
> > Have you tried r21970 or after?  I can't seem to dupe anymore.
> > 
> > -Kevin
> > 
> > (In reply to comment #24)
> > > (In reply to comment #23)
> > > > I suspect the culprit checkin is related to 20074.  However I synced with the
> > > > tip of tree and of course can no longer dupe with my previous steps.  I'll keep
> > > > trying but can others try to find a set of steps to dupe this on TOT?
> > > > 
> > > 
> > > As mentioned in comment #11 I found #20057 to be the last working build:
> > > 3/8/07 r20057 works, I was not able to reproduce the bug.
> > > 3/9/07 r20077 is so bad, the Sending.../Saving... problem happens on first
> > > click!
> > > 
> > 
> 

Comment 28 Ruben Bakker 2007-06-05 14:15:09 PDT
I tried #21970 (todays  build) and was able to reproduce the hanging save problem. (see instructions in comment #18 for reproducing the "hanging save").
Comment 29 Kevin McCullough 2007-06-05 16:27:03 PDT
I think I got it.  The form data boundary is constructed via base64Encode() which can include the AlphaNumeric characters as well as + and /.  Whenever the / char is included in the boundary gmail seems to hang, or rather does not ever respond.  The reason clicking send or save again causes the mail to work, is that the new random boundary generated probably doesn't have the / character in it.

On the W3C's site it said it used RFC 2045 for boundary standards (same as MIME types), which in tern sited RFC 2046, which says that the boundary can be made up of 7bit ASCII characters including numbers, alpha characters, ',(,),+,_,,,-,.,/,:,=, and ?.  This set includes / which is the problematic character.

By my testing the following characters also caused the non-reply from Google, although not all of these chars are legal according to RFC 2045: #, /, &, *, (, ), =, [, ], {, }, \, :, ", ,, ., <, > and ;.

I'll contact Google to double check my findings, but in the mean time I'll implement a new getUniqueBoundaryString() functions that returns only AlphaNumeric characters.

-Kevin
Comment 30 Kevin McCullough 2007-06-05 16:27:58 PDT
man I can't spell

-Kevin
Comment 31 Kevin McCullough 2007-06-05 19:50:55 PDT
fixed in r22013
Comment 32 Ruben Bakker 2007-06-05 23:08:25 PDT
I have done a quick test with nighly #22014 and I was not able to dup the bug. I will continue to use this build and see if is OK in the long run. 

Kevin: Thanks for fixing this!!
Comment 33 Ruben Bakker 2007-06-07 14:10:57 PDT
Test update: I have sent about 40 mails today and it worked every time...
Comment 34 Viktor Szathmary 2007-06-07 14:16:27 PDT
(In reply to comment #33)
> Test update: I have sent about 40 mails today and it worked every time...
> 

I can confirm this as well, r22014 functions perfectly in this regard.

Thanks for fixing this!
Comment 35 Kevin McCullough 2007-06-07 14:21:09 PDT
Great I'm glad this is working!  It was annoying me as well.
Comment 36 Mark Malone 2007-07-05 11:17:42 PDT
rdar://5314478
Comment 37 David Kilzer (:ddkilzer) 2008-04-16 10:44:56 PDT
Adding keyword for future searches:  WebKitFormBoundary