Re: firefox broken on arm64

From: Nuno Teixeira <eduardo_at_freebsd.org>
Date: Fri, 08 Dec 2023 07:58:21 UTC
(...)

https://hg.mozilla.org/integration/autoland/rev/d314be784675 fixes build.

120.0.1: Fixed a startup crash affecting Linux users on some aarch64
systems with page sizes other than 4KB. (bug 1866025
<https://bugzilla.mozilla.org/show_bug.cgi?id=1866025>)

Tested with aslr enabled/disabled and webgl off, same problem. crash.

I can do more tests at my rpi4 if needed, just tell me what to do and then
I publish results.

Cheers

Nuno Teixeira <eduardo@freebsd.org> escreveu no dia quinta, 7/12/2023 à(s)
11:06:

> Compiling with patch at PR 275247 :)
>
> Nuno Teixeira <eduardo@freebsd.org> escreveu no dia quarta, 6/12/2023
> à(s) 14:07:
>
>> Nice, I'm following PR.
>>
>> Thanks!
>>
>> Ronald Klop <ronald-lists@klop.ws> escreveu no dia quarta, 6/12/2023
>> à(s) 13:53:
>>
>>> BTW it also fails on the official pkg build servers.
>>>
>>>
>>> https://portsfallout.com/fallout?port=www%2Ffirefox%24&maintainer=&env=arm64&category=&flavor=
>>>
>>> Which also has a PR open:
>>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275247 (opened by
>>> Jesper who is also in the cc of this mail-thread).
>>>
>>> Regards,
>>> Ronald.
>>>
>>>
>>>
>>> *Van:* Ronald Klop <ronald-lists@klop.ws>
>>> *Datum:* woensdag, 6 december 2023 14:21
>>> *Aan:* Nuno Teixeira <eduardo@freebsd.org>
>>> *CC:* Jesper Schmitz Mouridsen <jsm@freebsd.org>,
>>> freebsd-arm@freebsd.org
>>> *Onderwerp:* Re: firefox broken on arm64
>>>
>>>
>>>
>>> The only clue I see in the log is:
>>>
>>> gmake[4]: Entering directory '/wrkdirs/usr/ports/www/firefox/work/.build/mozglue/build'
>>> mkdir -p '.deps/'
>>> mozglue/build/dummy.o
>>> /usr/local/bin/clang++15 -std=gnu++17 -o dummy.o -c [...] /wrkdirs/usr/ports/www/firefox/work/firefox-120.0.1/mozglue/build/dummy.cpp
>>> In file included from Unified_cpp_mozglue_baseprofiler0.cpp:110:
>>> In file included from /wrkdirs/usr/ports/www/firefox/work/firefox-120.0.1/mozglue/baseprofiler/core/platform.cpp:2492:
>>> /wrkdirs/usr/ports/www/firefox/work/firefox-120.0.1/mozglue/baseprofiler/core/platform-linux-android.cpp:125:69: error: expected ')'
>>>   aRegs.mR11 = reinterpret_cast<Address>(mcontext.mc_gpregs.gp_x[11];
>>>                                                                     ^
>>> /wrkdirs/usr/ports/www/firefox/work/firefox-120.0.1/mozglue/baseprofiler/core/platform-linux-android.cpp:125:41: note: to match this '('
>>>   aRegs.mR11 = reinterpret_cast<Address>(mcontext.mc_gpregs.gp_x[11];
>>>                                         ^
>>> gmake[4]: Leaving directory '/wrkdirs/usr/ports/www/firefox/work/.build/mozglue/build'
>>>
>>>
>>> But I have no experience in compiling Firefox on RPI4. And don't know why this ')' is missing. Maybe just a little patch is needed.
>>>
>>> Regards,
>>> Ronald.
>>>
>>>
>>>
>>> *Van:* Nuno Teixeira <eduardo@freebsd.org>
>>> *Datum:* woensdag, 6 december 2023 13:18
>>> *Aan:* Ronald Klop <ronald-lists@klop.ws>
>>> *CC:* Jesper Schmitz Mouridsen <jsm@freebsd.org>,
>>> freebsd-arm@freebsd.org
>>> *Onderwerp:* Re: firefox broken on arm64
>>>
>>> Tested on rpi4, current 1500004: Fails to build
>>>
>>> https://people.freebsd.org/~eduardo/logs/firefox-120.0.1%2C2.log
>>>
>>> Any clues?
>>>
>>> I remember compiling ok until about a month or so...
>>>
>>> Ronald Klop <ronald-lists@klop.ws> escreveu no dia quarta, 6/12/2023
>>> à(s) 09:32:
>>>
>>>> Yes, I was triggered to this issue because it is mentioned in the
>>>> release notes of 120.0.1.
>>>>
>>>> https://www.mozilla.org/en-US/firefox/120.0.1/releasenotes/
>>>>
>>>> Regards,
>>>> Ronald.
>>>>
>>>>
>>>> *Van:* Nuno Teixeira <eduardo@freebsd.org>
>>>> *Datum:* dinsdag, 5 december 2023 21:43
>>>> *Aan:* Ronald Klop <ronald-lists@klop.ws>
>>>> *CC:* Jesper Schmitz Mouridsen <jsm@freebsd.org>,
>>>> freebsd-arm@freebsd.org
>>>> *Onderwerp:* Re: firefox broken on arm64
>>>>
>>>> Port is at 120.0.1 (rc1) and for what I understanded in mozilla PR,
>>>> patch will be included in 120.0.1 release.
>>>> If I had the time I will apply patch and try it on rpi4.
>>>>
>>>> Thanks
>>>>
>>>> Ronald Klop <ronald-lists@klop.ws> escreveu no dia terça, 5/12/2023
>>>> à(s) 17:39:
>>>>
>>>>> Could it be that you are experiencing this issue?
>>>>>
>>>>> Bug 1866025 - Firefox 120.0 segfaults at startup (Linux with 16KiB
>>>>> pages) <https://bugzilla.mozilla.org/show_bug.cgi?id=1866025> [1]
>>>>>
>>>>> Regards,
>>>>>
>>>>> Ronald.
>>>>>
>>>>> [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1866025
>>>>>
>>>>>
>>>>>
>>>>> *Van:* Jesper Schmitz Mouridsen <jsm@FreeBSD.org>
>>>>> *Datum:* zondag, 3 december 2023 11:59
>>>>> *Aan:* freebsd-arm@freebsd.org
>>>>> *Onderwerp:* Re: firefox broken on arm64
>>>>>
>>>>>
>>>>>
>>>>> On 03.12.2023 09.38, void wrote:
>>>>> > On Sun, Dec 03, 2023 at 08:34:21AM +0100, Jesper Schmitz Mouridsen
>>>>> wrote:
>>>>> >>
>>>>> >> Just build firefox-esr-115.5.0_1,1  and firefox-116.0.3_1,2 the
>>>>> first >> runs with aslr disabled, the latter signals 4.
>>>>> >>
>>>>> >> Any suggestions on what is going on are appreciated.
>>>>> >
>>>>> > What's the uname -aKU ?
>>>>>
>>>>> FreeBSD generic 14.0-RELEASE FreeBSD 14.0-RELEASE #0
>>>>> releng/14.0-n265380-f9716eee8ab4: Fri Nov 10 09:12:14 UTC 2023
>>>>> root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC
>>>>> arm64 1400097 1400097
>>>>>
>>>>>   did you build from ports or poudriere?
>>>>>  From ports.
>>>>>
>>>>> If the
>>>>> > latter, what's the /etc/make.conf contain?
>>>>> >
>>>>> > Please post sysctl -a | grep aslr
>>>>> >
>>>>>
>>>>> kern.elf32.aslr.shared_page: 0
>>>>> kern.elf32.aslr.stack: 1
>>>>> kern.elf32.aslr.honor_sbrk: 0
>>>>> kern.elf32.aslr.pie_enable: 0
>>>>> kern.elf32.aslr.enable: 0
>>>>> kern.elf64.aslr.shared_page: 1
>>>>> kern.elf64.aslr.stack: 1
>>>>> kern.elf64.aslr.honor_sbrk: 0
>>>>> kern.elf64.aslr.pie_enable: 1
>>>>> kern.elf64.aslr.enable: 1
>>>>> vm.aslr_restarts: 256
>>>>>
>>>>> I did the esr build to test the build setup, since also the pkg in the
>>>>> official pkg repo behaves the same i.e the one before 115.5 since 115.5 did
>>>>> not hit the pkg repo yet, which works without aslr (set by proccontrol) So
>>>>> unless 116 introduces something which requires sysctl changes for the
>>>>> building tool chain while building my test should be valid.
>>>>>
>>>>> Thanks
>>>>>
>>>>> /jsm
>>>>>
>>>>>
>>>>> ------------------------------
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Nuno Teixeira
>>>> FreeBSD Committer (ports)
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Nuno Teixeira
>>> FreeBSD Committer (ports)
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Nuno Teixeira
>> FreeBSD Committer (ports)
>>
>
>
> --
> Nuno Teixeira
> FreeBSD Committer (ports)
>


-- 
Nuno Teixeira
FreeBSD Committer (ports)