Bug 1643729

Summary: Current Firefox doesn't start on ppc64le
Product: [Fedora] Fedora Reporter: Cameron Kaiser <ckaiser>
Component: firefoxAssignee: Gecko Maintainer <gecko-bugs-nobody>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 28CC: 0xalen+redhat, anto.trande, bugproxy, dan, gecko-bugs-nobody, hannsj_uhl, jhorak, john.j5live, pjasicek, rhughes, rstrode, sandmann, stransky
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Fixed In Version: firefox-63.0.1-5.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-11 03:12:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1071880    

Description Cameron Kaiser 2018-10-28 00:22:20 UTC
The currently available Firefox 63 package doesn't start on ppc64le (62 would crash after address bar activity).

/usr/bin/gdb  --args /usr/lib64/firefox/firefox
GNU gdb (GDB) Fedora 8.1.1-3.fc28
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "ppc64le-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib64/firefox/firefox...Reading symbols from /usr/lib64/firefox/firefox...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Missing separate debuginfos, use: dnf debuginfo-install firefox-63.0-2.fc28.ppc64le
(gdb) run
Starting program: /usr/lib64/firefox/firefox 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Detaching after fork from child process 10596.
[New Thread 0x7fffe081f160 (LWP 10597)]
[New Thread 0x7fffdbfff160 (LWP 10598)]
[New Thread 0x7fffdac4f160 (LWP 10609)]
[New Thread 0x7fffd9bcf160 (LWP 10610)]
[Thread 0x7fffd9bcf160 (LWP 10610) exited]
[New Thread 0x7fffd93bf160 (LWP 10611)]
[New Thread 0x7fffd936f160 (LWP 10612)]
[New Thread 0x7fffd931f160 (LWP 10613)]
[New Thread 0x7fffd9bcf160 (LWP 10614)]
[New Thread 0x7fffd92cd160 (LWP 10615)]
[New Thread 0x7fffd90bd160 (LWP 10616)]
[New Thread 0x7fffd8ead160 (LWP 10617)]
[New Thread 0x7fffd8c9d160 (LWP 10618)]
[New Thread 0x7fffd8a8d160 (LWP 10619)]
[New Thread 0x7fffd887d160 (LWP 10620)]
[New Thread 0x7fffd866d160 (LWP 10621)]
[New Thread 0x7fffd845d160 (LWP 10622)]
[New Thread 0x7fffd1a5f160 (LWP 10623)]
[New Thread 0x7fffd184f160 (LWP 10624)]
[New Thread 0x7fffd163f160 (LWP 10625)]
[New Thread 0x7fffd142f160 (LWP 10626)]

Thread 1 "firefox" received signal SIGSEGV, Segmentation fault.
0x00007fffee30d7a0 in PrepareAndDispatch () from /usr/lib64/firefox/libxul.so
(gdb) bt 10
#0  0x00007fffee30d7a0 in PrepareAndDispatch () at /usr/lib64/firefox/libxul.so
#1  0x00007fffee30c568 in SharedStub () at /usr/lib64/firefox/libxul.so
#2  0x00007fffeec9fe3c in mozJSComponentLoader::ModuleEntry::GetFactory(mozilla::Module const&, mozilla::Module::CIDEntry const&) ()
    at /usr/lib64/firefox/libxul.so
#3  0x00007fffee2c60b0 in nsFactoryEntry::GetFactory() ()
    at /usr/lib64/firefox/libxul.so
#4  0x00007fffee2c6a6c in nsComponentManagerImpl::CreateInstanceByContractID(char const*, nsISupports*, nsID const&, void**) [clone .part.193] ()
    at /usr/lib64/firefox/libxul.so
#5  0x00007fffee2ce010 in nsComponentManagerImpl::GetServiceByContractID(char const*, nsID const&, void**) [clone .part.213] () at /usr/lib64/firefox/libxul.so
#6  0x00007fffee2ce624 in nsGetServiceByContractID::operator()(nsID const&, void**) const () at /usr/lib64/firefox/libxul.so
#7  0x00007fffee22de40 in nsCOMPtr_base::assign_from_gs_contractid(nsGetServiceByContractID, nsID const&) () at /usr/lib64/firefox/libxul.so
#8  0x00007ffff1f984fc in ProfileLockedDialog(nsIFile*, nsIFile*, nsIProfileUnlocker*, nsINativeAppSupport*, nsIProfileLock**) [clone .isra.195] ()
    at /usr/lib64/firefox/libxul.so
#9  0x00007ffff1f98860 in ProfileLockedDialog(nsIToolkitProfile*, nsIProfileUnlocker*, nsINativeAppSupport*, nsIProfileLock**) [clone .isra.196] ()
    at /usr/lib64/firefox/libxul.so
#10 0x00007ffff1f9c8b0 in SelectProfile(nsIProfileLock**, nsIToolkitProfileService*, nsINativeAppSupport*, bool*, nsTSubstring<char>*) ()
    at /usr/lib64/firefox/libxul.so

The backtrace suggests Mozilla bug 1498938 ( https://bugzilla.mozilla.org/show_bug.cgi?id=1498938 ) but there may be other issues; see also https://www.talospace.com/2018/10/patches-needed-for-firefox-63.html

Comment 1 Martin Stransky 2018-11-01 14:28:30 UTC
If you provide a patches I will put them to the Firefox package.

Comment 2 Cameron Kaiser 2018-11-01 14:54:54 UTC
On my Talos II with F28, I'm running Fx63 with the patch from Mozilla 1498938. However, I also have a different mozconfig, from the URL above. I don't think Firefox is being linked correctly. The opt mozconfig I have is this:

export CC=/usr/bin/gcc
export CXX=/usr/bin/g++

mk_add_options MOZ_MAKE_FLAGS="-j24"
ac_add_options --enable-application=browser
ac_add_options --enable-optimize="-O3 -mcpu=power9"
ac_add_options --disable-jemalloc
ac_add_options --disable-release
ac_add_options --enable-linker=bfd


Obviously adjust to taste, but I think the keys here are disabling jemalloc and release, and forcing the linker and compiler to gcc/bfd.

Comment 3 Cameron Kaiser 2018-11-01 15:13:23 UTC
(and a build fix from 1494037, but you can't compile without it)

Comment 4 Dan Horák 2018-11-01 15:29:10 UTC
Thx, I will give it a try with the packaging we have around.

Comment 5 Dan Horák 2018-11-01 17:34:43 UTC
Cameron, do you run your Talos with the Fedora kernel with 64K page size?

Comment 6 Cameron Kaiser 2018-11-01 21:21:17 UTC
I believe so (whatever the default is, I didn't change the page size). The only different option I run is that I run the kernel with hashed page tables (POWER8 and earlier) instead of the default POWER9 radix MMU so I can use KVM-PR.

Comment 7 Cameron Kaiser 2018-11-01 21:21:55 UTC
However, that shouldn't affect this ...

Comment 8 Dan Horák 2018-11-01 21:27:37 UTC
Right, I asked in the context of my other attempts to build FF trunk, which was always crashing for me. But with a fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1503968 I got FF 65-pre running.

Comment 9 Dan Horák 2018-11-01 22:13:32 UTC
Seems only the fix for mozb#1498938 is needed to have FF 63 working, I've committed it to the master branch and started a scratch build for F-28 in https://koji.fedoraproject.org/koji/taskinfo?taskID=30599946

Comment 10 Dan Horák 2018-11-02 08:29:09 UTC
And it's working OK for me.

Comment 11 Antonio T. (sagitter) 2018-11-02 10:15:01 UTC
(In reply to Dan Horák from comment #9)
> Seems only the fix for mozb#1498938 is needed to have FF 63 working, I've
> committed it to the master branch and started a scratch build for F-28 in
> https://koji.fedoraproject.org/koji/taskinfo?taskID=30599946

Should be Firefox-60.3ESR affected too? Right?

Comment 12 Dan Horák 2018-11-02 11:08:36 UTC
(In reply to Antonio Trande from comment #11)
> (In reply to Dan Horák from comment #9)
> > Seems only the fix for mozb#1498938 is needed to have FF 63 working, I've
> > committed it to the master branch and started a scratch build for F-28 in
> > https://koji.fedoraproject.org/koji/taskinfo?taskID=30599946
> Should be Firefox-60.3ESR affected too? Right?

I don't think so, IIRC FF 60 and 61 (this for sure) work fine on ppc64le. The change came in FF 63 and 62 had other issue (bug 1612601)

Comment 13 Cameron Kaiser 2018-11-03 06:08:37 UTC
(In reply to Dan Horák from comment #10)
> And it's working OK for me.

I will try this on my system first thing tomorrow (been out of town for a couple days).

Comment 14 Cameron Kaiser 2018-11-03 19:29:25 UTC
Yup, this works fine on my T2.

Comment 15 Fedora Update System 2018-11-09 09:11:04 UTC
firefox-63.0.1-5.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e485c3c4cb

Comment 16 Fedora Update System 2018-11-11 03:12:22 UTC
firefox-63.0.1-5.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.