Closed Bug 929849 Opened 12 years ago Closed 12 years ago

Shumway breaks browser initialization on platforms lacking profiler support

Categories

(Firefox Graveyard :: Shumway, defect)

All
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 28

People

(Reporter: stevensn, Assigned: ttaubert)

References

Details

(Keywords: regression)

Attachments

(2 files)

Tabs in firefox on recent mozilla-central builds don't close. Clicking on the 'X' icon on a tab doesn't do anything. Selecting any of the tab related options when I right click on a tab "Close Other Tabs", "Close Tabs To the Right" also has no effect. I first noticed this on a mozilla-central build from around October 10'th but it could have been introduced as early as two weeks before. I have tried a new profile and safe-mode same results. I am building Debian Linux ppc32.
Actually I first noticed this in a build based on mozilla-central from around Oct 17 but I don't think I had done a build in the previous week or two.
Steve, if you could find a regression range that would be helpful. At least, the Nightly build that it first happened in.
Flags: needinfo?(steve)
423b9c30c73d is good (the tabs close) 4e7d1e2c93a6 is bad (the tabs don't close) The would correspond to sometime between nightly 20131017030201 and 20131018030206
Flags: needinfo?(steve)
This is the pushlog for that range https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=423b9c30c73d&tochange=4e7d1e2c93a6 Could you try narrowing it down further to find the first bad changeset?
The regression was likely introduced with changeset 151237:1374158dab4b (https://hg.mozilla.org/mozilla-central/rev/1374158dab4b). 151236:1cb3ba2ab9c1 still worked okay (see https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ae5e6dc9bce9&tochange=4e7d1e2c93a6). The text for "Undo Close Tabs" in the tabs' context menu also disappeared (only the icon is shown).
Blocks: 900910
Hardware: PowerPC → All
Version: unspecified → Trunk
Steve, can you please provide some steps to reproduce the issue? That would be very helpful, it seems that no one else has been able to reproduce it so far.
Flags: needinfo?(steve)
Keywords: steps-wanted
All I need to do is open a tab on ANY site and I can't close a tab. In my effected builds. I am building on a platform with JS_ION disabled. I am working on narrowing the regression range, but at 530 minute build times for most builds it takes time. so far I have found that 0792108113b0 is bad b082b86b2cac is good I am building 1374158dab4b now.
Flags: needinfo?(steve)
I can reproduce it on a FreeBSD box (amd64). Fortunately my build times are around 20min. If there are some build options or patches that might help, I'd be more than happy to try them out. Or if there's anything else I should log just let me know.
I can now confirm that 1374158dab4b is causing this 1cb3ba2ab9c1bg works fine but 1374158dab4b has the issue.
I'm not sure how to proceed here. We will need some more help to reproduce this. It doesn't seem to be a common issue, bug 900910 is on Aurora and we surely would have had a lot more reports then. I see that it is reproducible on FreeBSD and Linux 32bit, right? You also said that it's still occurring in safe-mode and with a new profile. Is there something else that you're doing here? Can you still reproduce this in the latest Nightly? Can you reproduce this on any Nightly or is this specific to your custom build config?
Keywords: qawanted
Yes, current trunk builds still suffer from this bug. My setup is quite simple, using clang v3.3 and adding just the options --enable-alsa and --enable-pulseaudio (it won't build otherwise). Adding --disable-optimize and --enable-debug didn't help. Neither did disabling the additional CPU cores. But the 64bit Linux builds from https://nightly.mozilla.org work just fine on the same machine (running Ubuntu 12.04 LTS).
I am building with gcc with the following options --disable-updater --prefix=/usr/local/mozilla27 --disable-ion --host powerpc-unknown-linux-gnu --target powerpc-unknown-linux-gnu --disable-gold
I just tried with the default build options on my Ubuntu 13.10 and I can't reproduce it. Do you see any errors in the error console that could maybe tell what's failing when you try to close a tab?
The browser console does in fact emit "uncaught exception: 2147942487" when trying to close a tab. This also occurs when opening the tab context menu. According to the entries in xpcom/base/ErrorList.h 0x80070057 translates to NS_ERROR_ILLEGAL_VALUE.
This is probably caused by SessionStore throwing NS_ERROR_INVALID_ARG (which has the same value) because of something trying to call the SessionStore API by passing an untracked window.
I double-checked our startup code path and I have no idea how a window could end up untracked with the current code. We add a "domwindowopened" observer when "final-ui-startup" is fired here: http://mxr.mozilla.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp#3942 Shortly afterwards the command line handler is run which then opens the first browser window: http://mxr.mozilla.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp#3949 Are there any custom patches you have applied or is it just a vanilla Firefox build you're doing for fun?
The only patch I'm applying is https://bug780531.bugzilla.mozilla.org/attachment.cgi?id=763100. But even without it this bug's still triggered.
I don't have any patches applied either. I wonder if this is being triggered by some flag/switch set by configure (like what that audio-float patch does). There are a bunch of flags different on FreeBSD and PowerPC builds than the stock x86/x64 Linux builds.
Building on FreeBSD now, let's see...
This is a log from a short session where I - started Firefox - opened a second tab - tried to close it - shut down Firefox This is using safe-mode but with updates and some checks disabled in an earlier session. This build has webrtc and optimizations disabled and debug enabled. No patches or other options applied.
Ok, great. FreeBSD up and running and my build finished. I can reproduce it but have no clue yet what the problem is.
Ok, this was pretty easy with a machine at hand. The startup code in nsBrowserGlue calls ShumwayUtils.init() in Nightly builds: http://mxr.mozilla.org/mozilla-central/source/browser/components/nsBrowserGlue.js#475 Which causes: ************************************************************ * Call to xpconnect wrapped JSObject produced this error: * [Exception... "'[JavaScript Error: "Cc['@mozilla.org/tools/profiler;1'] is undefined" {file: "resource://shumway/ShumwayStreamConverter.jsm" line: 52}]' when calling method: [nsIObserver::observe]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0" data: yes] ************************************************************ And thus aborts the rest of the startup routine initializing SessionStore etc. This means we should fix Shumway to handle not having a profiler around but also that only Nightly builds are broken.
Assignee: nobody → ttaubert
Status: NEW → ASSIGNED
Yury, how often do you uplift Shumway's extension code to mozilla-central? We're particularly interested in the issue mentioned above.
Flags: needinfo?(ydelendik)
Summary: Tabs won't close → Shumway breaks browser initialization on platforms lacking profiler support
Component: Tabbed Browser → Shumway
(In reply to Tim Taubert [:ttaubert] from comment #24) > Yury, how often do you uplift Shumway's extension code to mozilla-central? > We're particularly interested in the issue mentioned above. At least one time per Firefox release cycle, when it's stable enough. Here is cherry-picked fix for this issue.
Attachment #823968 - Flags: review?(till)
Flags: needinfo?(ydelendik)
Comment on attachment 823968 [details] [diff] [review] Delays profiler initialization in Shumway Review of attachment 823968 [details] [diff] [review]: ----------------------------------------------------------------- yup
Attachment #823968 - Flags: review?(till) → review+
Awesome, thanks to you both!
Keywords: checkin-needed
I can confirm that with this patch applied the tabs close for me. Tim, thanks for tracking this down.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 28
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: