Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1514531 - [flash?] Busy loop
Summary: [flash?] Busy loop
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-17 16:58 UTC by Milan Crha
Modified: 2017-12-01 08:56 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-30 09:18:55 UTC


Attachments (Terms of Use)
1st backtrace (deleted)
2017-11-17 16:59 UTC, Milan Crha
no flags Details
2nd backtrace (deleted)
2017-11-17 16:59 UTC, Milan Crha
no flags Details
3rd backtrace (deleted)
2017-11-17 16:59 UTC, Milan Crha
no flags Details

Description Milan Crha 2017-11-17 16:58:43 UTC
This is firefox-56.0-5.fc26.x86_64. I sometimes, I do not know when and why, as I could not reproduce using the same steps, get firefox into a busy loop, which makes it nearly unusable with one core at its top usage by firefox. I've three backtraces, which I'll attach (they are pretty long). As the last mentions, yes, I have also installed AdobeReader_enu-9.5.5-1.i486.

Comment 1 Milan Crha 2017-11-17 16:59:11 UTC
Created attachment 1354215 [details]
1st backtrace

Comment 2 Milan Crha 2017-11-17 16:59:33 UTC
Created attachment 1354216 [details]
2nd backtrace

Comment 3 Milan Crha 2017-11-17 16:59:53 UTC
Created attachment 1354217 [details]
3rd backtrace

Comment 4 Jan Horak 2017-11-28 10:31:43 UTC
Please attach output of
print DumpJSStack()
to show javascript stacktrace.

Comment 5 Milan Crha 2017-11-28 16:40:26 UTC
I updated to Fedora 27 which currently has firefox-57.0-2.fc27.x86_64 and it happened again. The backtrace from gdb says:

Thread 1 (Thread 0x7f95ec894b80 (LWP 2603)):
#0  0x00007f95eb609b45 in vfprintf () at /lib64/libc.so.6
#1  0x00007f95eb6e2701 in __vasprintf_chk () at /lib64/libc.so.6
#2  0x00007f95e726d689 in g_vasprintf () at /lib64/libglib-2.0.so.0
#3  0x00007f95e7247add in g_strdup_vprintf () at /lib64/libglib-2.0.so.0
#4  0x00007f95e7247b99 in g_strdup_printf () at /lib64/libglib-2.0.so.0
#5  0x00007f95e7221e0d in g_key_file_get_locale_string () at /lib64/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#6  0x00007f95e7831382 in g_desktop_app_info_load_from_keyfile () at /lib64/libgio-2.0.so.0
#7  0x00007f95e78343eb in g_desktop_app_info_new_from_filename () at /lib64/libgio-2.0.so.0
#8  0x00007f95e7834c1c in g_app_info_get_default_for_type () at /lib64/libgio-2.0.so.0
#9  0x00007f95df3a61ee in nsGIOService::GetAppForMimeType(nsTSubstring<char> const&, nsIGIOMimeApp**) (this=this@entry=0x7f95adb09e10, aMimeType=..., aApp=0x7ffda893be18)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/toolkit/system/gnome/nsGIOService.cpp:295
#10 0x00007f95dce0c81d in nsGNOMERegistry::GetFromType(nsTSubstring<char> const&) (aMIMEType=...) at /usr/src/debug/firefox-57.0-2.fc27.x86_64/uriloader/exthandler/unix/nsGNOMERegistry.cpp:97
#11 0x00007f95dce0d86a in nsMIMEInfoUnix::GetHasDefaultHandler(bool*) (this=0x7f95b0b37740, _retval=0x7ffda893c097) at /usr/src/debug/firefox-57.0-2.fc27.x86_64/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp:37
#12 0x00007f95dcdfde54 in nsOSHelperAppService::GetMIMEInfoFromOS(nsTSubstring<char> const&, nsTSubstring<char> const&, bool*) (this=0x7f95c5620fa0, aType=..., aFileExt=..., aFound=0x7ffda893c1be)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/uriloader/exthandler/unix/nsOSHelperAppService.cpp:1465
#13 0x00007f95dce09e3e in nsExternalHelperAppService::GetFromTypeAndExtension(nsTSubstring<char> const&, nsTSubstring<char> const&, nsIMIMEInfo**) (this=0x7f95c5620fa0, aMIMEType=..., aFileExt=..., _retval=0x7ffda893c548)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/uriloader/exthandler/nsExternalHelperAppService.cpp:2595
#14 0x00007f95dc5d2262 in NS_InvokeByIndex () at /usr/src/debug/firefox-57.0-2.fc27.x86_64/xpcom/reflect/xptcall/md/unix/xptcinvoke_asm_x86_64_unix.S:106
#15 0x00007f95dcd3f83b in CallMethodHelper::Invoke() (this=0x7ffda893c4d0) at /usr/src/debug/firefox-57.0-2.fc27.x86_64/js/xpconnect/src/XPCWrappedNative.cpp:1996
#16 0x00007f95dcd3f83b in CallMethodHelper::Call() (this=0x7ffda893c4d0) at /usr/src/debug/firefox-57.0-2.fc27.x86_64/js/xpconnect/src/XPCWrappedNative.cpp:1315
---Type <return> to continue, or q <return> to quit---
#17 0x00007f95dcd3f83b in XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) (ccx=..., mode=mode@entry=XPCWrappedNative::CALL_METHOD)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/js/xpconnect/src/XPCWrappedNative.cpp:1282
#18 0x00007f95dcd47756 in XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) (cx=0x7f95d19db000, argc=2, vp=0x7ffda893c7d8) at /usr/src/debug/firefox-57.0-2.fc27.x86_64/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:929
#19 0x0000204bb6285391 in  ()
#20 0x0000204bb628558a in  ()
#21 0x00007ffda893c7b0 in  ()
#22 0x0000000000000000 in  ()

and the output of forefox, also after calling the print gdb command as requested above:

---------------------------------------------------------------------------

[Parent 2603, Gecko_IOThread] WARNING: pipe error (118): Connection reset by peer: file /builddir/build/BUILD/firefox-57.0/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 353
Vector smash protection is enabled.

(/usr/lib64/firefox/firefox:2669): dconf-WARNING **: Unable to open /var/lib/flatpak/exports/share/dconf/profile/user: Permission denied

0 isDefaultHandlerApp() ["resource://pdf.js/PdfjsChromeUtils.jsm":304]
1 isDefaultHandler() ["resource://pdf.js/PdfJs.jsm":78]
2 _isEnabled() ["resource://pdf.js/PdfJs.jsm":283]
    this = [object Object]
3 checkEnabled() ["resource://pdf.js/PdfJs.jsm":317]
4 updateRegistration() ["resource://pdf.js/PdfJs.jsm":197]
5 observe(aSubject = [unavailable], aTopic = [unavailable], aData = [unavailable]) ["resource://pdf.js/PdfJs.jsm":332]

---------------------------------------------------------------------------

I do not know when each of the runtime warnings happened, this is just all output on the firefox console.

Comment 6 Milan Crha 2017-11-28 18:30:44 UTC
My reproducer:
a) open site: https://finance.google.com/finance?q=NYSE%3ARHT
b) download flash-plugin-27.0.0.187-release.x86_64 from the Adobe site
c) install flash-plugin
d) close firefox
e) open firefox and open site from a)
f) enable flash plugin for this site
g) close firefox
h) open firefox and open site from a)
i) left it on its own

After several hours (I had it opened in a pretty clean virtual machine, it could be an hour or few hours) Firefox begins to use high CPU. It doesn't do that without flash installed and enabled (or I didn't wait long enough). The Firefox close&open might not be necessary, but open the site at least twice. It changes the content at the left-bottom side (Recent Quotes part). I didn't have opened any other tab in Firefox, only this Google page when testing.

May Firefox update its mime database only once per day? That would explain that reproducing it several times is harder. I'll try again tomorrow.

Comment 7 Milan Crha 2017-11-30 09:00:22 UTC
Further more observation, with pretty clean Fedora 27 virtual machine and GNOME in Wayland:
a) have installed the flash plugin as above
b) I expect the site from comment #6 had been already opened, thus enough
   to start firefox (firefox-57.0-2.fc27.x86_64)
c) open the site from comment #6, point a); there will be only one tab, not more
d) left it on its own.

After ~7 minutes the firefox gets crazy, but this time without any javascript involved, or at least not in time when I got the backtrace:

#0  0x00007f458834d59c in pr_UnlockedFindLibrary () from /lib64/libnspr4.so
#1  0x00007f458834db68 in PR_LoadLibraryWithFlags () from /lib64/libnspr4.so
#2  0x00007f458aecf309 in nsPluginFile::LoadPlugin (this=this@entry=0x7ffff591fac0, 
    outLibrary=outLibrary@entry=0x7ffff591faa8)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/dom/plugins/base/nsPluginsDirUnix.cpp:292
#3  0x00007f458aed0631 in nsPluginFile::GetPluginInfo (this=this@entry=0x7ffff591fac0, info=..., 
    outLibrary=outLibrary@entry=0x7ffff591faa8)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/dom/plugins/base/nsPluginsDirUnix.cpp:315
#4  0x00007f458aebc08a in nsPluginHost::ScanPluginsDirectory (this=this@entry=0x7f456433c5e0, 
    pluginsDir=<optimized out>, aCreatePluginList=aCreatePluginList@entry=false, 
    aPluginsChanged=aPluginsChanged@entry=0x7ffff591fc80)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/dom/plugins/base/nsPluginHost.cpp:2116
#5  0x00007f458aebc7f7 in nsPluginHost::ScanPluginsDirectoryList (this=this@entry=0x7f456433c5e0, dirEnum=
    0x7f455ec8c940, aCreatePluginList=aCreatePluginList@entry=false, 
    aPluginsChanged=aPluginsChanged@entry=0x7ffff591fcf3)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/dom/plugins/base/nsPluginHost.cpp:2211
#6  0x00007f458aebca63 in nsPluginHost::FindPlugins (this=this@entry=0x7f456433c5e0, 
    aCreatePluginList=aCreatePluginList@entry=false, aPluginsChanged=aPluginsChanged@entry=0x7ffff591fd77)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/dom/plugins/base/nsPluginHost.cpp:2442
#7  0x00007f458aec05e4 in nsPluginHost::ReloadPlugins (this=this@entry=0x7f456433c5e0)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/dom/plugins/base/nsPluginHost.cpp:385
#8  0x00007f458afadad9 in mozilla::dom::ContentParent::RecvMaybeReloadPlugins (this=<optimized out>)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/dom/ipc/ContentParent.cpp:5419
#9  0x00007f4589a69e80 in mozilla::dom::PContentParent::OnMessageReceived (this=0x7f455ecbf000, msg__=...)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/objdir/ipc/ipdl/PContentParent.cpp:6814
#10 0x00007f45897d806f in mozilla::ipc::MessageChannel::DispatchAsyncMessage (this=this@entry=0x7f455ecbf108, 
    aMsg=...) at /usr/src/debug/firefox-57.0-2.fc27.x86_64/ipc/glue/MessageChannel.cpp:2119
#11 0x00007f45897df813 in mozilla::ipc::MessageChannel::DispatchMessage (this=0x7f455ecbf108, aMsg=...)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/ipc/glue/MessageChannel.cpp:2049
#12 0x00007f45897e0fb0 in mozilla::ipc::MessageChannel::RunMessage (this=<optimized out>, aTask=...)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/ipc/glue/MessageChannel.cpp:1895
#13 0x00007f45897e11dd in mozilla::ipc::MessageChannel::MessageTask::Run (this=0x7f45534351b0)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/ipc/glue/MessageChannel.cpp:1928
#14 0x00007f45893c85ce in nsThread::ProcessNextEvent (this=<optimized out>, aMayWait=<optimized out>, 
---Type <return> to continue, or q <return> to quit---
    aResult=0x7ffff5920327, this=<optimized out>)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/xpcom/threads/nsThread.cpp:1039
#15 0x00007f45893c6ab8 in NS_ProcessNextEvent (aThread=<optimized out>, aThread@entry=0x7f4598149e80, 
    aMayWait=aMayWait@entry=false)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/xpcom/threads/nsThreadUtils.cpp:521
#16 0x00007f45897d0a52 in mozilla::ipc::MessagePump::Run (this=0x7f457ebdab40, aDelegate=0x7f4598168380)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/ipc/glue/MessagePump.cpp:97
#17 0x00007f45897a7b70 in MessageLoop::RunInternal (this=<optimized out>)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/ipc/chromium/src/base/message_loop.cc:326
#18 MessageLoop::RunHandler (this=<optimized out>)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/ipc/chromium/src/base/message_loop.cc:319
#19 MessageLoop::Run (this=<optimized out>)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/ipc/chromium/src/base/message_loop.cc:299
#20 0x00007f458b1e9348 in nsBaseAppShell::Run (this=0x7f45738a20a0)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/widget/nsBaseAppShell.cpp:158
#21 0x00007f458c0e50be in nsAppStartup::Run (this=0x7f4574ce49c0)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/toolkit/components/startup/nsAppStartup.cpp:288
#22 0x00007f458c1764a3 in XREMain::XRE_mainRun (this=this@entry=0x7ffff59205d0)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/toolkit/xre/nsAppRunner.cpp:4703
#23 0x00007f458c1774d6 in XREMain::XRE_main (this=this@entry=0x7ffff59205d0, argc=argc@entry=1, 
    argv=argv@entry=0x7ffff5921908, aConfig=...)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/toolkit/xre/nsAppRunner.cpp:4867
#24 0x00007f458c177822 in XRE_main (argc=1, argv=0x7ffff5921908, aConfig=...)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/toolkit/xre/nsAppRunner.cpp:4962
#25 0x000055e7e9fb477c in do_main (argc=1, argv=0x7ffff5921908, envp=<optimized out>)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/browser/app/nsBrowserApp.cpp:236
#26 0x000055e7e9fb3e0c in main (argc=1, argv=0x7ffff5921908, envp=0x7ffff5921918)
    at /usr/src/debug/firefox-57.0-2.fc27.x86_64/browser/app/nsBrowserApp.cpp:309

Comment 8 Martin Stransky 2017-11-30 09:18:55 UTC
You install flash, you install Adobe reader...you got what you deserve :) We're not going to fix any flash/adobe related bugs. Please reopen if you can reproduce that in safe mode ($firefox -safe-mode).

Comment 9 Milan Crha 2017-12-01 08:01:50 UTC
(In reply to Milan Crha from comment #7)
> Further more observation, with pretty clean Fedora 27 virtual machine and
> GNOME in Wayland:
> a) have installed the flash plugin as above

Well, no Adobe reader on the machine I ran the test with. ^^^

Thus it's only related to flash.

Comment 10 Milan Crha 2017-12-01 08:20:52 UTC
(In reply to Martin Stransky from comment #8)
> Please reopen if you can reproduce that in safe mode ($firefox -safe-mode).

The safe mode, if I confirm it in the GUI, disables flash. I already said that in the comment #7.

Do *you* see anything related to flash in the backtrace of comment #7? I do not know firefox code, but it looks like that the firefox decided to check what plugins are available and it does it in a loop. Or?

The thing is, I noticed this behaviour only after I updated firefox to version 56. I do not recall seeing it before that, and there didn't change the flash plugin, only firefox version. I will try with older version and with other browser(s).

You can always say that you do not care, that's your option, but if the Google site is doing something nasty in the background, then it can be a security issue, which are usually important, thus even if you'd not be able (or willing, as you indicated) to fix this issue, you could at least investigate *why* the firefox got crazy and decide on that what to do.

Comment 11 Martin Stransky 2017-12-01 08:56:45 UTC
(In reply to Milan Crha from comment #10)
> You can always say that you do not care, that's your option, but if the
> Google site is doing something nasty in the background, then it can be a
> security issue, which are usually important, thus even if you'd not be able
> (or willing, as you indicated) to fix this issue, you could at least
> investigate *why* the firefox got crazy and decide on that what to do.

Please test with upstream firefox donwloaded from mozilla.com and if you can reproduce the issue please report at bugzilla.mozilla.org. We're not going to work on that as we don't recommend to use flash and we don't have time to work on that.


Note You need to log in before you can comment on or make changes to this bug.