Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 562388 - www-client/firefox >=40.0.2 can't use flash (either adobe or pepper)
Summary: www-client/firefox >=40.0.2 can't use flash (either adobe or pepper)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major with 1 vote (vote)
Assignee: Mozilla Gentoo Team
URL: https://forums.gentoo.org/viewtopic-t...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-06 11:37 UTC by jhon
Modified: 2015-11-01 07:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jhon 2015-10-06 11:37:27 UTC
Well I actually managed to work around that but it requires me to modify the source code of any future FF version prior to building it.

See this thread with all the information: https://forums.gentoo.org/viewtopic-t-1027174-highlight-.html

Reproducible: Always

Steps to Reproduce:
1.Simply go to a website that uses flash
2.
3.
Actual Results:  
Flash doesn't work.
Firefox may sometimes crash

Expected Results:  
flash should run

This function in FF's Sandbox.cpp file seems to be the cause of the problem:

MOZ_RELEASE_ASSERT(IsSingleThreaded());
Comment 1 Ian Stakenvicius (RETIRED) gentoo-dev 2015-10-12 02:05:13 UTC
So I'm not following what's wrong here, as I'm using flash from firefox-41 right now.  If I merge 40.0.3 I have no doubt it will continue to work as well.

FYI, yes, firefox may indeed crash when flash is used, especially if USE="system-cairo" is set when firefox is built.  Bug 558150 may be of interest in that case.

Also, FYI, firefox will crash when both flash and freshplayerplugin are loaded (bug 557846), so you may be seeing that one as well.
Comment 2 jhon 2015-10-12 10:36:34 UTC
Hi Ian,
Well I'm not talking about crashes specifically, I'm saying Flash doesn't even work at all.
Here's the bug trace:

[3063] WARNING: '!aObserver', file /var/tmp/portage/www-client/firefox-40.0.3/work/mozilla-release/xpcom/ds/nsObserverService.cpp, line 284
[3063] ###!!! ASSERTION: expecting a spawned plugin: 'Not Reached', file /var/tmp/portage/www-client/firefox-40.0.3/work/mozilla-release/dom/base/nsObjectLoadingContent.cpp, line 591
[3063] ###!!! ASSERTION: Got data for channel with no connected final listener: 'Not Reached', file /var/tmp/portage/www-client/firefox-40.0.3/work/mozilla-release/dom/base/nsObjectLoadingContent.cpp, line 1196
For application/x-shockwave-flash found plugin libfreshwrapper-pepperflash.so
Assertion failure: IsSingleThreaded(), at /var/tmp/portage/www-client/firefox-40.0.3/work/mozilla-release/security/sandbox/linux/Sandbox.cpp:442
[3063] WARNING: pipe error (44): Connection reset by peer: file /var/tmp/portage/www-client/firefox-40.0.3/work/mozilla-release/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 459
[3063] WARNING: '!aObserver', file /var/tmp/portage/www-client/firefox-40.0.3/work/mozilla-release/xpcom/ds/nsObserverService.cpp, line 284
--DOMWINDOW == 32 (0x7f39db644000) [pid = 3063] [serial = 51] [outer = (nil)] [url = http://www.chemgapedia.de/vsengine/help/en/flash/]

As you can see there's an "Assertion failure: IsSingleThreaded()" <- this function found in: www-client/firefox-40.0.3/work/mozilla-release/security/sandbox/linux/Sandbox.cpp:442  is causing flash not to work and for occasional crashes.
When I compile Firefox with this function commented out - then there's no crash whatsoever and flash works.

Obviously this is the bug root cause and it has to be fixed / patched.
BTW I already knew about the USE="system-cairo" bug and it's not relevant to this case.

As you're the developer, I expect you'd know a lot better than I do why "IsSingleThreaded()" function causes flash not to work at all and for occasional crashes of the browser.

I would assume this problem is due to my Gentoo configuration if it wouldn't happen to me on different machine as well running Ubuntu. 
Also, in the forum post, you can see there's at least one more Gentoo user who's affected by that
Comment 3 Jory A. Pratt gentoo-dev 2015-10-27 03:58:59 UTC
(In reply to jhon from comment #2)
> Hi Ian,
> Well I'm not talking about crashes specifically, I'm saying Flash doesn't
> even work at all.
> Here's the bug trace:
> 
> [3063] WARNING: '!aObserver', file
> /var/tmp/portage/www-client/firefox-40.0.3/work/mozilla-release/xpcom/ds/
> nsObserverService.cpp, line 284
> [3063] ###!!! ASSERTION: expecting a spawned plugin: 'Not Reached', file
> /var/tmp/portage/www-client/firefox-40.0.3/work/mozilla-release/dom/base/
> nsObjectLoadingContent.cpp, line 591
> [3063] ###!!! ASSERTION: Got data for channel with no connected final
> listener: 'Not Reached', file
> /var/tmp/portage/www-client/firefox-40.0.3/work/mozilla-release/dom/base/
> nsObjectLoadingContent.cpp, line 1196
> For application/x-shockwave-flash found plugin libfreshwrapper-pepperflash.so
> Assertion failure: IsSingleThreaded(), at
> /var/tmp/portage/www-client/firefox-40.0.3/work/mozilla-release/security/
> sandbox/linux/Sandbox.cpp:442
> [3063] WARNING: pipe error (44): Connection reset by peer: file
> /var/tmp/portage/www-client/firefox-40.0.3/work/mozilla-release/ipc/chromium/
> src/chrome/common/ipc_channel_posix.cc, line 459
> [3063] WARNING: '!aObserver', file
> /var/tmp/portage/www-client/firefox-40.0.3/work/mozilla-release/xpcom/ds/
> nsObserverService.cpp, line 284
> --DOMWINDOW == 32 (0x7f39db644000) [pid = 3063] [serial = 51] [outer =
> (nil)] [url = http://www.chemgapedia.de/vsengine/help/en/flash/]
> 
> As you can see there's an "Assertion failure: IsSingleThreaded()" <- this
> function found in:
> www-client/firefox-40.0.3/work/mozilla-release/security/sandbox/linux/
> Sandbox.cpp:442  is causing flash not to work and for occasional crashes.
> When I compile Firefox with this function commented out - then there's no
> crash whatsoever and flash works.
> 
> Obviously this is the bug root cause and it has to be fixed / patched.
> BTW I already knew about the USE="system-cairo" bug and it's not relevant to
> this case.
> 
> As you're the developer, I expect you'd know a lot better than I do why
> "IsSingleThreaded()" function causes flash not to work at all and for
> occasional crashes of the browser.
> 
> I would assume this problem is due to my Gentoo configuration if it wouldn't
> happen to me on different machine as well running Ubuntu. 
> Also, in the forum post, you can see there's at least one more Gentoo user
> who's affected by that

There is nothing we can do for binary plugins. Your best solution is to report the problem to the appropriate upstream and let them sort it out. When I say appropriate upstream I am refering to adobe, this is not a mozilla bug.
Comment 4 jhon 2015-10-27 07:01:42 UTC
OK, if that is your (as Gentoo representative) final answer. I shall not argue with that. 
Yet I still want to mention here that I totally disagree with you for the following reasons:

1) The bug trace leads to a function found inside Firefox source code files and not any of the mentioned binary plugins.

2) It's a non-arguable fact that by disabling that function in Firefox source code, suddenly everything works as it should.

3) This function did not existed prior to the aforementioned Firefox versions and there was no problem with Flash before that as well.

Suddenly Mozilla introduces a new function and then there is a bug. For me it's enough indicators that the bug comes from Firefox and not some other package.

Please feel free to do whatever you like with this bug report, I do not wish to spend any more time regarding it.
Comment 5 Slava 2015-10-28 10:02:23 UTC
I can confirm this bug on Firefox 41.0.2. Same symptoms as jhon has. But there's a nuance. I have Gentoo at work and at home. They're mostly the same (I have transfered my home system to work and then changed something at home). 

So, at home flash is not working and at work it is. 

Both firefoxes are 41.0.2. Both have the same USE flags, both systems have adobe-flash. 

The difference between the systems is package.use (home system has these lines):

media-video/mpv libmpv openal vaapi bluray
# required by media-video/mpv-0.11.0::gentoo[-libav]
# required by mpv (argument)
>=media-video/ffmpeg-2.8-r1 vaapi
# required by net-misc/remmina-1.2.0_rc3-r1::gentoo
# required by remmina (argument)
>=x11-base/xorg-server-1.17.2-r1 kdrive
# required by net-misc/remmina-1.2.0_rc3-r1::gentoo[zeroconf]
# required by remmina (argument)
>=net-dns/avahi-0.6.31-r10 gtk3
# required by @world (argument)
# required by www-plugins/freshplayerplugin-0.3.3-r1::gentoo
# required by freshplayerplugin (argument)
>=media-libs/mesa-11.0.3 gles2
Comment 6 Slava 2015-10-28 20:16:02 UTC
Just for my interest I tried to use Firefox-developer-bin-43.0_alpha2 and all the tabs crash as soon as I open them:

slava@SLV-Linux ~ $ firefox-developer-bin 

(firefox:14203): GLib-GObject-WARNING **: The property GtkSettings:gtk-menu-images is deprecated and shouldn't be used anymore. It will be removed in a future version.

(firefox:14203): GLib-GObject-WARNING **: The property GtkSettings:gtk-button-images is deprecated and shouldn't be used anymore. It will be removed in a future version.
Assertion failure: IsSingleThreaded(), at /builds/slave/m-aurora-l64-ntly-000000000000/build/src/security/sandbox/linux/Sandbox.cpp:525
[Parent 14203] WARNING: pipe error (48): Connection reset by the other side: file /builds/slave/m-aurora-l64-ntly-000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 459
[Parent 14203] WARNING: pipe error (51): Connection reset by the other side: file /builds/slave/m-aurora-l64-ntly-000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 459
[Parent 14203] WARNING: pipe error (53): Connection reset by the other side: file /builds/slave/m-aurora-l64-ntly-000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 459
[Parent 14203] WARNING: pipe error (52): Connection reset by the other side: file /builds/slave/m-aurora-l64-ntly-000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 459

###!!! [Parent][MessageChannel] Error: (msgtype=0x280086,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
Comment 7 Ian Stakenvicius (RETIRED) gentoo-dev 2015-10-30 14:49:12 UTC
(In reply to Slava from comment #5)
> I can confirm this bug on Firefox 41.0.2. Same symptoms as jhon has. But
> there's a nuance. I have Gentoo at work and at home. They're mostly the same
> (I have transfered my home system to work and then changed something at
> home). 
> 
> So, at home flash is not working and at work it is. 
> 
> Both firefoxes are 41.0.2. Both have the same USE flags, both systems have
> adobe-flash. 
> 
> # required by www-plugins/freshplayerplugin-0.3.3-r1::gentoo
> # required by freshplayerplugin (argument)

It looks like you also have freshplayerplugin installed.  There is a bug where having both installed at the same time can cause crashes.  Please try unmerging freshplayerplugin on whichever system(s) you have it installed on, and see if that helps?  See bug 557846 for more details
Comment 8 Slava 2015-10-30 14:51:56 UTC
(In reply to Ian Stakenvicius from comment #7)
> (In reply to Slava from comment #5)
> > I can confirm this bug on Firefox 41.0.2. Same symptoms as jhon has. But
> > there's a nuance. I have Gentoo at work and at home. They're mostly the same
> > (I have transfered my home system to work and then changed something at
> > home). 
> > 
> > So, at home flash is not working and at work it is. 
> > 
> > Both firefoxes are 41.0.2. Both have the same USE flags, both systems have
> > adobe-flash. 
> > 
> > # required by www-plugins/freshplayerplugin-0.3.3-r1::gentoo
> > # required by freshplayerplugin (argument)
> 
> It looks like you also have freshplayerplugin installed.  There is a bug
> where having both installed at the same time can cause crashes.  Please try
> unmerging freshplayerplugin on whichever system(s) you have it installed on,
> and see if that helps?  See bug 557846 for more details

I know about the bug and I have only one flash plugin installed at the same time. It really doesn't matter whether adobe-flash or freshplayerplugin in used - none of them works without removing the assertion.
Comment 9 Slava 2015-10-31 16:36:57 UTC
I've solved the problem. 

The reason why everything wasn't working was 
export __GL_THREADED_OPTIMIZATIONS=1 in /etc/profile

I've removed it and now everything works fine. Couldn't even imagine that nvidia proprietary driver can make firefox fail.
Comment 10 jhon 2015-11-01 07:02:26 UTC
I can confirm Slava's solution.
Changing the status to resolved