Closed Bug 1116196 Opened 10 years ago Closed 7 years ago

Every startup, Warning: Unresponsive Script after approx 15 seconds, with system integration prompt

Categories

(Thunderbird :: Untriaged, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: nazar, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf, regression, regressionwindow-wanted, Whiteboard: [regression:TB18])

User Story

1. startup, no extensions
2. after for 10-15 seconds (Core i7 CPU with SSD RAID), gets
"A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.

Fails:
- version 18 beta

Works / problem not seen with:
- version 17
- 2012-09-24-04-35-58-comm-central/ (18.0a1 daily)
- 2012-09-25-03-05-58-comm-central/
- 2012-09-26-03-06-37-comm-central/
- 2012-09-27-03-02-12-comm-central/
- (the above 4 builds come up quickly but with empty left pane for account+folder)

Doesn't help
- safe mode TB
- accessibility.force_disabled=1
- doubled mail.db.idle_limit was 300000
- doubled mail.db.max_open was 30
- Offline mode
- Removing panacea.dat
- Removing floderTree.json
Thunderbird stuck on start for 10-15 seconds (Core i7 CPU with SSD RAID), then message:
"A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.

Script: chrome://messenger/content/mailWindowOverlay.js:1428"

Actually, I'm suffering from this bug since version around 26-29.
There are no enabled extensions, there are 4 IMAP accounts, one of which have 50+ folders, and few RSS feeds.

The interesting thing is that after TB upgrade to newer (older) version first time it starts instantly, but from second time everything is the same.
Summary: Warning: Unresponsive script → Warning: Unresponsive Script on startup
Also, What happens if you set hidden preference accessibility.force_disabled = 1 via tools | options | advanced | general | config editor ?
Well, I've tried all versions from 25 down to 17.0esr, and 17.0esr is the latest version that is not affected by this bug, 18+ are all the same - at first run everything OK, at second - freeze for some seconds.
The only difference is that new versions freeze with empty window, while elder render accounts and folders tree, home page of thunderbird, and only then freeze. Maybe, this can help somehow to narrow area where it may happen.

accessibility.force_disabled=1 doesn't change anything.
Flags: needinfo?(nazar)
Is the new bug summary accurate?
Does windows safe mode or Thunderbird safe mode help?
If not, please see https://bugzilla.mozilla.org/show_bug.cgi?id=929281#c18
Flags: needinfo?(nazar)
Summary: Warning: Unresponsive Script on startup → Warning: Unresponsive Script on every startup, except the first time after each update
Whiteboard: [regression:TB18]
1) I'm on Linux, TB safe mode doesn't help
2) I have no POP accounts, only IMAP and few RSS feeds
3) mail.db.idle_limit was 300000, doubling doesn't help
4) mail.db.max_open was 30, increasing to 60 and then to 120 doesn't help
Flags: needinfo?(nazar)
I would think on first start the foldertree.dat and panacea.dat would be refreshed  but not on subsequent starts. Given the updates that have occurred in core of late.

So freezing to build them allows time to read something else and action it. Looking at the JS script, it is still building the folder tree at that point.

Just a couple of experiments.   
Set Thunderbird to work offline and restart..  Result?
Close Thunderbird delete foldertree,json from your profile.  Result
Neither of following helps:
1) Offline mode
2) Removing panacea.dat
3) Removing floderTree.json
I'm not sure what update has to do with it, but it should not correlate to foldertree.dat nor panacea.dat. Also worth observing that 15 seconds for an SSD is likely triple for normal disk.

I hope we can use the work recently done by Guenter in bug 929281. Please test https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2012/09/2012-09-24-04-35-58-comm-central/

If it is OK, then please get a logfile for msgdb:5 on startup per https://wiki.mozilla.org/MailNews:Logging

Then test https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2012/09/2012-09-25-03-05-58-comm-central/

If it is slow, then please get a logfile for msgdb:5 on startup per https://wiki.mozilla.org/MailNews:Logging

Attach the logfiles to this bug report, or email to me.
Thanks
Flags: needinfo?(nazar)
Summary: Warning: Unresponsive Script on every startup, except the first time after each update → On every startup, Warning: Unresponsive Script after approx 15 seconds, except the first time after each update. imap
Both starts immediately, seems to load accounts (I can get to accounts settings and so on), but accounts and folders tree on the left is broken, also log file empty for both builds.
Log from TB 33 I'm sending to your email.

About SSD - I have even RAID 0 of two, it should be fast.
Flags: needinfo?(nazar)
I maybe I'm blaming the wrong bug, and am off by a day.  :(
Is https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2012/09/2012-09-26-03-06-37-comm-central/ slow compared to 2012-09-25?
Flags: needinfo?(nazar)
There was no linux amd64 build there, tried https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2012/09/2012-09-27-03-02-12-comm-central/ - starts immediately, the same bug with empty accounts and directories tree.
Flags: needinfo?(nazar)
I've tried to sumarize under User Story. Please correct anything that is incorrect

(In reply to Nazar Mokrynskyi from comment #3)
> Well, I've tried all versions from 25 down to 17.0esr, and 17.0esr is the
> latest version that is not affected by this bug, 18+ are all the same - at
> first run everything OK, at second - freeze for some seconds.

Nazar,

by version 18+, do you mean the very first version 18 daily build? 
https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2012/08/2012-08-28-03-02-08-comm-central/

Or do you mean everything starting with the first version 19 daily build?
User Story: (updated)
Flags: needinfo?(nazar)
Summary: On every startup, Warning: Unresponsive Script after approx 15 seconds, except the first time after each update. imap → Every startup, Warning: Unresponsive Script after approx 15 seconds, except the first time after each update. imap. linux
> Well, I've tried all versions from 25 down to 17.0esr,
> and 17.0esr is the latest version that is not affected by this bug

I meant stable versions. Just tried https://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2012/10/2012-10-31-03-03-22-comm-central/, starts immediately, but just like I wrote before - accounts and folders tree is empty, however stable versions work fine (I think this is somehow connected).
That was 19 Nightly, while but 18.0 stable is already affected, starts slow, while 17.0esr is fine.
Flags: needinfo?(nazar)
Thanks for testing those.  Perhaps this will be the final test...

With mail.db.idle_limit and mail.db.max_open reset to defaults, please install 38.0b1 from beta link at http://www.mozilla.org/en-US/thunderbird/channel/
Is the slowness problem gone?
Flags: needinfo?(nazar)
Unfortunately all I've got with 38.0b1 is:
> XPCOMGlueLoad error for file /media/Storage/thunderbird/libxul.so:
> libXcomposite.so.1: cannot open shared object file: No such file or directory
Couldn't load XPCOM.

But, I've tried Thunderbird trunk 38.0a1 (38.0~a1~hg20150204r17445.227385-0ubuntu1~umd1) from one of repositories I have and besides it crashed few times first, it seems to work fine.
Flags: needinfo?(nazar)
OK, it is even more interesting than before.

Just installed Thunderbird 1:38.0~b3+build2-0ubuntu0.15.04.1 and Thunderbird trunk 40.0~a1~hg20150429r17886.241647-0ubuntu1~umd1

Thunderbird stable was set as default mail client. When I start Trunk version window about system integration appears with suggestion to set Trunk version as default mail client. I'm just closing it, everything starts immediately, no freezes.

BUT, as soon as I agree to set Trunk as default mail client it starts freezing at start. The same result if disable system integration check in settings.

This works similar both for stable and trunk builds - as soon as starting build is not set as default mail client - it starts immediately (but with modal window about system integration), if it is already default - it just freezes at start with no system load.

Looks like something at start locks each other and after upgrade to new version (when window with addons check appears) or if app is not set as default mail client (with corresponding window at start) it works fine.

Hope this will narrow area where bug might happen.
what happens if you disable the check to see if Thunderbird is the default and don't make it the default.
Freezes as usual.
I haven't found anything in bugzilla fixed for the TB17,18,19 target milesstones

are you using the unity integration?
Flags: needinfo?(nazar)
Summary: Every startup, Warning: Unresponsive Script after approx 15 seconds, except the first time after each update. imap. linux → Every startup, Warning: Unresponsive Script after approx 15 seconds, with system integration prompt
If you meant extension - no, all extensions are disabled, I'm not using any currently.
Flags: needinfo?(nazar)
what might be happening here in the integration prompt?
Flags: needinfo?(mconley)
Flags: needinfo?(chrisccoulson)
Chris, Christian, are you able to reproduce?
Flags: needinfo?(chris.ramsden)
Flags: needinfo?(chriechers)
(In reply to Wayne Mery (:wsmwk, use Needinfo for questions) from comment #22)
> Chris, Christian, are you able to reproduce?

TB38b5, openSUSE13.3, Gnome 3.14.
The check to see if Thunderbird is the default is permanently disabled for this profile, and TB38 isn't the default mail application.
There is neither a freeze on start up nor any other error message.

If I enable the check to see if Thunderbird is the default I do get the integration prompt. I choose 'Skip Integration' and TB comes up just fine. There is no freeze or any other error.
Flags: needinfo?(chriechers)
(In reply to Wayne Mery (:wsmwk, use Needinfo for questions) from comment #22)
> Chris, Christian, are you able to reproduce?

Nope. TB31.7.0, Linux 3.11-2-amd64 #1 SMP Debian 3.11.8-1 (2013-11-13) x86_64 GNU/Linux

I have the integration check switch enabled, and TB is my only/default email client. It's sometimes a little slow in starting, but I don't get the "unresponsive script" warning.
Flags: needinfo?(chris.ramsden)
One more detail which confirms theory about race condition: if Thunderbird starts during 100% CPU utilization error doesn't happen. Everything is, obviously, very slow, but there is no freeze and no message about unresponsive script.
(In reply to Nazar Mokrynskyi from comment #25)
> One more detail which confirms theory about race condition: if Thunderbird
> starts during 100% CPU utilization error doesn't happen. Everything is,
> obviously, very slow, but there is no freeze and no message about
> unresponsive script.

Perhaps try disabling the global indexer and see if that has an effect.  In the past there were issues with it, but on slow systems.
Just tried - doesn't affect anything at all.
I do not normally have any performance issues - everything is fast, smooth and responsive.
Everything described in this bug report is only about startup time.
> if Thunderbird starts during 100% CPU utilization 

Nazar,
100% CPU of what - the system? Or just Thunderbird? If the later, did you force it somehow?
User Story: (updated)
Flags: needinfo?(nazar)
Flags: needinfo?(mconley)
Flags: needinfo?(chrisccoulson)
System of course:)
It was after system reboot and there was ~20 Apport instances very aggressively consuming CPU.
Flags: needinfo?(nazar)
Nazar,

During, or in the seconds before getting, the system integration prompt do you see any progress meters/throbbers, etc or any password prompts.
Flags: needinfo?(nazar)
No, nothing. Just frozen window and after un-freezing it is fast and responsive.
Just to make sure it is clear I've done this demo: https://owncloud.mokrynskyi.com/index.php/s/xM2qSE1VSuX1aKb
(it started out of the recorded region, so I've moved window and it kept background from that position)
Flags: needinfo?(nazar)
Yay!!! After update to Thunderbird 54b1 problem is gone!
Can't believe someone fixed it and my suffering for the last 2 years is over.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.