"Sending of message failed" dialog needs 100% of one CPU as long as it is open.

Bug #1012858 reported by PeterPall on 2012-06-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Thunderbird
Confirmed
Medium
thunderbird (Ubuntu)
Medium
Unassigned

Bug Description

Priority: Low
How to reproduce:
 - Attach a large file to a message to make the sending process need enough time for the third step.
 - press the "send" button
 - Interrupt the internet connection before the sending of the message can be completed
Problem:
 The Dialog that pops up now telling the message could not be sent creates 100% CPU load for one CPU.
What was to be expected:
 The dialog pops up and does not need any CPU power until a button is clicked.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: thunderbird 14.0~b1+build2-0ubuntu1
ProcVersionSignature: Ubuntu 3.4.0-5.11-generic 3.4.0
Uname: Linux 3.4.0-5-generic x86_64
ApportVersion: 2.2.2-0ubuntu2
Architecture: amd64
Date: Wed Jun 13 22:49:39 2012
EcryptfsInUse: Yes
ExecutablePath: /usr/lib/thunderbird/thunderbird-bin
LocalLibraries: /<email address hidden>/lib/tray_x86_64-gcc3.so
SourcePackage: thunderbird
UpgradeStatus: No upgrade log present (probably fresh install)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0
Build ID: 20120312181643

Steps to reproduce:

1) Set SMTP server to one that timeout, particularly my network doesn't allow pings or more specific limitation. The SMTP definitely works outside this network.
2) Try to send an email

Actual results:

3) Message that connection to SMTP timeouted
4) CPU usage is raised to 50% (one core) until the message is clicked

Expected results:

3) Message that connection to SMTP timeouted
4) CPU usage is standard

(In reply to Marek Nos from comment #0)
Found 2 similar bugs: bug 311663 & bug 189738.

Marek can you follow the instructions at https://developer.mozilla.org/en/How_to_get_a_stacktrace_with_WinDbg and get us a stack trace of your issue ?

Created attachment 613600
stacktrace

Running this tool for the first time. Excuse any incompleteness. This is what I got.

Is that SMTP server public so that you could tell us the host name? We do NOT need any username/password. We can try to connect to it and wait for the timeout.

smtp.centrum.cz:25

note: CPU usage is raised right after Thunderbird starts connecting to SMTP server, not after timeout message is shown.

nothing useful in that stack trace, unfortunately.

I got the raised CPU usage just after pressing Send, but I assume that is the spinning progressbar about "Connected to server XXX". It was just about 25% of a 3Ghz core.

I could not get the timeout from the server. I connected to it but did not provide any password. I let TB hang in the dialog requesting the password. After several minutes I gave a wrong password. The dialog closed and the send failed. But I didn't get any high CPU usage.

What should I try next?

Created attachment 614146
Steps to reproduce

To be correct it took 50% on my machine. Now I checked per core and it took more or less equally around 50% from each core. So maybe its natural load. But the load is there since I clicked send [1], then timeout message appeared. Load was still there until I clicked either cancel sending [2] or OK on timeout message [3] which in turn cancels sending. But when cancel sending [2] is clicked then timeout message is still there, but load drops. So it's definitely not caused by timeout message, but the connecting part, and it takes load (quite high) even timeout message is there. See attached image for more explanation on steps.

From user perspective, this SMTP is supposed to be available and should require log in. Don't know why it timeouts for me or if the error is somewhere else. Try at different networks with same result. It might be related to this high load.

Secure connection is none, authentication is set to password.

C:\Users\Marek Nos>telnet smtp.centrum.cz 25
Connecting To smtp.centrum.cz...Could not open connection to the host, on port 25: Connect failed

It does work for you?

Yes, I can connect to the server via telnet. Also TB log file shows it talked to the server.

Maybe that is the problem, that you do not even connect to the server and get the timeout. I used a nonexistent server now. I got timeout immediately and the progressbar still spinning.
Also notice there is another small progress bar in the bottom right corner of the compose window. So all those animations could be quite heavy, maybe they are redrawing too frequently. I can confirm this part of the bug.

Just for reference, what is your CPU?

Intel Core2 duo U9400, 1.4 ghz

PeterPall (peterpall) wrote :

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:14.0) Gecko/20100101 Firefox/14.0
Build ID: 20120613200924

Steps to reproduce:

 - Attach a large file to a message to make the sending process need enough time for the third step.
 - press the "send" button
 - Interrupt the internet connection before the sending of the message can be completed

Actual results:

The Dialog that pops up now telling the message could not be sent creates 100% CPU load for one CPU.
The same thing seems to happen on mac computers with thunderbird version 16, too, even if I currently have none available to double-check.

Expected results:

The dialog pops up and does not need any CPU power until a button is pressed.

Detailled infos about my system can be found at:
http://bugs.launchpad.net/ubuntu/+source/thunderbird/+bug/1012858

Changed in thunderbird:
importance: Unknown → Medium
status: Unknown → New

*** Bug 764701 has been marked as a duplicate of this bug. ***

PeterPall (peterpall) on 2012-06-14
no longer affects: thunderbird
Micah Gersten (micahg) wrote :

Thanks for upstreaming this, marking it triaged.

Changed in thunderbird (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in thunderbird:
importance: Unknown → Medium
status: Unknown → Confirmed

I'll see if there aren't too many updates of the progress bar in http://mxr.mozilla.org/comm-central/source/mailnews/compose/content/sendProgress.js.

(In reply to :aceman from comment #13)
> I'll see if there aren't too many updates of the progress bar in
> http://mxr.mozilla.org/comm-central/source/mailnews/compose/content/
> sendProgress.js.

aceman, what were you able to determine?

Perhaps this is similar to what I'm seeing as high CPU with progress meter during stalled imap syncing, and most of the cpu is in Paint http://people.mozilla.com/~bgirard/cleopatra/?1354620938776#report=6210e70a7a1f640f9bcbb57e9af8c95997b58917

My findings are in bug 791535.

*** Bug 875298 has been marked as a duplicate of this bug. ***

FWIW, I see the CPU spike on Linux but can't reproduce on Windows 7...

This bug still exists. Until the connection timeouts, I get 12-13% CPU load in my i5 macbook.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.