Bug 813095 - Firefox freezes on Fedora 17 Alpha for PPC64
Firefox freezes on Fedora 17 Alpha for PPC64
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: firefox (Show other bugs)
17
ppc64 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Martin Stransky
Fedora Extras Quality Assurance
: Reopened
Depends On: 824463
Blocks: 855919
  Show dependency treegraph
 
Reported: 2012-04-16 16:58 EDT by Gustavo Luiz Duarte
Modified: 2012-09-10 11:35 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 855919 (view as bug list)
Environment:
Last Closed: 2012-06-20 09:52:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
strace -s 1024 -ff -o firefox /usr/lib64/firefox/firefox (1.15 MB, application/x-gzip)
2012-04-16 16:58 EDT, Gustavo Luiz Duarte
no flags Details
gdb full backtrace (21.79 KB, text/plain)
2012-04-16 17:49 EDT, Gustavo Luiz Duarte
no flags Details
the patch from mozilla bug 691898 backported to xulrunner 12 (9.68 KB, patch)
2012-05-04 10:49 EDT, Dan Horák
no flags Details | Diff
fix build on secondary arches (1.71 KB, patch)
2012-05-04 10:50 EDT, Dan Horák
no flags Details | Diff

  None (edit)
Description Gustavo Luiz Duarte 2012-04-16 16:58:32 EDT
Created attachment 577842 [details]
strace -s 1024 -ff -o firefox /usr/lib64/firefox/firefox

Description of problem:
Firefox freezes after a few minutes of usage. I'm not sure what triggers the issue, though a few minutes browsing random pages has been enough to reproduce the issue.
I've attached an strace. Firefox seems to be stuck, there is a LOT of messages in the strace like this:
madvise(0xfff574ce000, 4096, MADV_DONTNEED) = -1 EINVAL (Invalid argument)


Version-Release number of selected component (if applicable):
firefox-10.0.1-1.fc17.ppc64
xulrunner-10.0.1-5.fc17.ppc64
libX11-1.4.99.1-3.fc17.ppc64
glibc-2.15-32.fc17.ppc64
kernel-3.3.1-5.fc17.ppc64


How reproducible:
A few minutes browsing random pages has been enough to reproduce the issue.

Steps to Reproduce:
1. Install Fedora 17 Alpha release for PPC64 from http://download.fedoraproject.org/pub/fedora-secondary/releases/test/17-Alpha
2. Install updates: yum update --nogpgcheck
3. Run firefox
4. Browse some random pages for a few minutes (1 or 2 minutes has been enough to me)
  
Actual results:
Firefox freezes (UI stops responding and/or updating)


Expected results:
Firefox UI should continue working.

Additional info:
I've tested only using vnc. I don't have a graphical terminal to this machine.
Comment 1 Gustavo Luiz Duarte 2012-04-16 17:49:19 EDT
Created attachment 577846 [details]
gdb full backtrace

Attached gdb backtrace.
Comment 2 Martin Stransky 2012-04-17 08:42:49 EDT
Moved upstream - https://bugzilla.mozilla.org/show_bug.cgi?id=746112
Comment 3 Martin Stransky 2012-04-17 09:13:54 EDT
From upstream BZ:

Do you happen to be using JACK on that machine?
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=660960 is a similar issue triggered by JACK locking memory it doesn't own.
Comment 4 Martin Stransky 2012-04-25 08:19:15 EDT
I'm unable to reproduce the hang with Firefox 10.0.4 for RHEL which contains the workaround patch. You may need to build and test the package on Fedora ppc64 too. And don't forget to disable all JIT there, like it's in the RHEL package.
Comment 5 Martin Stransky 2012-04-25 08:36:05 EDT
The workaround works fine on RHEL6:

https://bugzilla.redhat.com/show_bug.cgi?id=795563

so this issue has to be something Fedora 17 specific.
Comment 6 Gustavo Luiz Duarte 2012-04-30 16:43:55 EDT
A few comments on what I've done trying to narrow down this issue:

1) Since RHEL6.2 has a newer version of firefox (10.0.4 as opposed to 10.0.1 on f17), I built a firefox/xulrunner-10.0.4 on f17. It still freezes.

2) Installing RHEL6.2 binaries of xulrunner makes firefox to work fine on f17. Here is what I did to get RHEL binaries of xulrunner on f17:

rpm -Uvh --force --nodeps  xulrunner-10.0.4-1.el6_2.ppc64.rpm (from RHEL repo)
rpm -Uvh firefox-10.0.4-1.fc17.ppc64.rpm (my custom firefox-10.0.4)
ln -s /usr/lib64/libhunspell-1.3.so.0 /usr/lib64/libhunspell-1.2.so.0 (otherwise firefox refuses to start)

3) As the previous configuration worked fine, I built the src.rpm of xulrunner from RHEL on f17. The following patches from fedora source were needed to get the RHEL src.rpm of xulrunner building on f17 (probably because of different gcc version):

mozilla-706724.patch  http://pkgs.fedoraproject.org/gitweb/?p=xulrunner.git;a=blob;f=mozilla-706724.patch;h=b0792ed6bc352e31483877c9996c9a667d0f2a36;hb=0a9b6b4f83ce8001e67a1138e76d0571709ace9e

mozilla-file.patch  http://pkgs.fedoraproject.org/gitweb/?p=xulrunner.git;a=blob;f=mozilla-file.patch;h=14b01824e60903cf8a82109eed05e4647f6e547d;hb=0a9b6b4f83ce8001e67a1138e76d0571709ace9e

xulrunner-10.0-gcc47.patch  http://pkgs.fedoraproject.org/gitweb/?p=xulrunner.git;a=blob;f=xulrunner-10.0-gcc47.patch;h=91a948a751403b5d064df8529a0f789434e91d38;hb=0a9b6b4f83ce8001e67a1138e76d0571709ace9e

The RHEL src.rpm built on f17 (as describe above) also freezes. Since the above patches are quite minimal, this leads us to believe that it must be something in the build environment.

4) Talking to Martin in the IRC:
(11:30:25 AM) stransky: gustavold, or take the rhel one and disable optimalization in the spec file - in MOZ_OPT_FLAGS. plus change --disable-optimize/--enable-debug in spec
(11:30:50 AM) stransky: gustavold, you need to remove the -O2 flag from MOZ_OPT_FLAGS

Only removing -O2 from MOZ_OPT_FLAGS doesn't help. It still freezes.

Adding --disable-optimize makes the build fail with:
/home/gustavold/rpmbuild/BUILD/xulrunner-10.0.4/mozilla-esr10/xulrunner/installer/../../toolkit/mozapps/installer/precompile_cache.js:73: TypeError: Cc is null
Comment 7 Gustavo Luiz Duarte 2012-05-02 13:43:25 EDT
This issue is related to the gcc version used in f17. I installed gcc-4.6.3-2.fc16 with its dependencies in my f17 mock environment used to compile xulrunner. Firefox works fine on f17 using the xulrunner compiled with gcc-4.6.3-2.fc16.

This is how I installed gcc 4.6 on my f17 mock environment:

<mock-chroot>[root@coho gcc]# rpm -ivh --force cpp-4.6.3-2.fc16.ppc64.rpm gcc-c++-4.6.3-2.fc16.ppc64.rpm libgomp-4.6.3-2.fc16.ppc64.rpm libstdc++-devel-4.6.3-2.fc16.ppc64.rpm gcc-4.6.3-2.fc16.ppc64.rpm gmp-4.3.2-4.fc16.ppc64.rpm libstdc++-4.6.3-2.fc16.ppc64.rpm

Should I file a new bug for the --disable-optimize and --enable-debug build issues?
Comment 8 Dan Horák 2012-05-04 10:49:25 EDT
Created attachment 582135 [details]
the patch from mozilla bug 691898 backported to xulrunner 12
Comment 9 Dan Horák 2012-05-04 10:50:24 EDT
Created attachment 582136 [details]
fix build on secondary arches
Comment 10 Brent Baude 2012-05-23 10:16:22 EDT
Update: We have firefox and xulrunner working locally here but it requires two fixes.

1. RH bugz 824463 which is a gcc fix to fix a small regression.
2. the nodecommit patch in https://bugzilla.mozilla.org/show_bug.cgi?id=746112
Comment 11 Martin Stransky 2012-05-28 03:43:12 EDT
The patch has been added to git.
Comment 12 Peter Lemenkov 2012-05-30 01:05:59 EDT
(In reply to comment #11)
> The patch has been added to git.

Works on powerpc with this patch. Thanks folks - I can use ff12 now!
Comment 13 Gustavo Luiz Duarte 2012-05-30 17:27:18 EDT
Martin,

The patch we need is https://bug746112.bugzilla.mozilla.org/attachment.cgi?id=616080

The patch you added on your last commit (9ccd78f5a81ca7c84a8381e99b473a39e0f07914) is not needed now that we have fixed gcc.

The confusion comes from the fact that there are two different bugs being discussed on that bugz (probably my fault).

Thanks
Comment 14 Martin Stransky 2012-05-31 08:41:55 EDT
Okay, uploaded to CVS.
Comment 15 Martin Stransky 2012-06-20 09:52:04 EDT
It should be already fixed on F17, please reopen if not.

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