Re: What are the current available browser options for debian-ppc64?

2023-11-21 Thread John Paul Adrian Glaubitz
Hello!

On Mon, 2023-11-20 at 15:39 -0800, Ken Cunningham wrote:
> on my system I had another segfault, in libxul.

A more detailed backtrace would be useful. libxul is basically all of
Firefox, so referring to a crash in libxul is not saying much.

Try installing the debug package from here:

> https://box.fu-berlin.de/s/oLNPG2EoPtyC8tb

and then run firefox from gdb.

> hopefully others had more luck. sure be nice to get a current browser!

It would be nice if more people could step forward and help me resolve these
issues. Running gdb and testing patches isn't that difficult, for example,
and would help me a lot in the process in shaping Debian Ports architectures.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Re: What are the current available browser options for debian-ppc64?

2023-11-21 Thread Ken Cunningham
To be honest, I did run it under gdb, and ran the backtrace, but the backtrace 
was mostly uninterpretable without the debug symbols of course.

So somewhere in libxul was all I could offer.

I’ll see if adding the debug symbols narrows it down a bit.

Ken

> On Nov 21, 2023, at 02:13, John Paul Adrian Glaubitz 
>  wrote:
> 
> Hello!
> 
>> On Mon, 2023-11-20 at 15:39 -0800, Ken Cunningham wrote:
>> on my system I had another segfault, in libxul.
> 
> A more detailed backtrace would be useful. libxul is basically all of
> Firefox, so referring to a crash in libxul is not saying much.
> 
> Try installing the debug package from here:
> 
>> https://box.fu-berlin.de/s/oLNPG2EoPtyC8tb
> 
> and then run firefox from gdb.
> 
>> hopefully others had more luck. sure be nice to get a current browser!
> 
> It would be nice if more people could step forward and help me resolve these
> issues. Running gdb and testing patches isn't that difficult, for example,
> and would help me a lot in the process in shaping Debian Ports architectures.
> 
> Adrian
> 
> --
> .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer
> `. `'   Physicist
>  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Re: What are the current available browser options for debian-ppc64?

2023-11-21 Thread Ken Cunningham
Trying to run firefox under gdb with the debug symbols installed appears to 
result in an out-of-memory situation on my DualG5 with 3.5GB ram, I’m afraid.

Perhaps someone else has a system with more memory, or set up better than mine, 
that could help.

Ken

-

$ gdb firefox
GNU gdb (Debian 13.2-1) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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 "powerpc64-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 firefox...
Reading symbols from 
/usr/lib/debug/.build-id/4b/b6e1779513b3b7402680ba3c0652341bfc3155.debug...
(gdb) run
Starting program: /usr/bin/firefox 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/powerpc64-linux-gnu/libthread_db.so.1".
Killed
-


tail of dmesg:

[  858.582364] [   1641]  1000  16415653044030   493568 9100
 0 gdb
[  858.582372] [   1645]  1000  1645 3750   6449152  192
 0 firefox
[  858.582379] 
oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-2.scope,task=gdb,pid=1641,uid=1000
[  858.582447] Out of memory: Killed process 1641 (gdb) total-vm:3617920kB, 
anon-rss:2817920kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:482kB 
oom_score_adj:0





Re: What are the current available browser options for debian-ppc64?

2023-11-21 Thread Ken Cunningham
I added an 8GB swapfile, and (slowly) got this backtrace:

# cat error.txt
Thread 1 "firefox" received signal SIGSEGV, Segmentation fault.
i32_load8_u (addr=2014643200, mem=) at rlbox.wasm.c:146
146 rlbox.wasm.c: No such file or directory.
(gdb) bt
#0  i32_load8_u (addr=2014643200, mem=) at rlbox.wasm.c:146
#1  w2c_rlbox_streqci
(var_p0=var_p0@entry=262000, var_p1=2014643200, instance=)
at rlbox.wasm.c:774
#2  0x7fffe9195c48 in w2c_rlbox_getEncodingIndex
(var_p0=, instance=) at rlbox.wasm.c:66243
#3  w2c_rlbox_getEncodingIndex (var_p0=262000, instance=0x7fffd992c000)
at rlbox.wasm.c:690
#4  w2c_rlbox_MOZ_XmlInitEncodingNS_0
(instance=0x7fffd992c000, var_p0=438820, var_p1=438816, var_p2=262000)
at rlbox.wasm.c:2316
#5  0x7fffe91e305c in w2c_rlbox_initializeEncoding
(instance=instance@entry=0x7fffd992c000, var_p0=var_p0@entry=438672)
at rlbox.wasm.c:48270
#6  0x7fffe92a77a8 in w2c_rlbox_prologInitProcessor
(instance=0x7fffd992c000, var_p0=438672, var_p1=445856, var_p2=511392, 
var_p3=262140) at rlbox.wasm.c:45278
#7  0x7fffe92b82e4 in w2c_rlbox_MOZ_XML_Parse_0
(var_p3=0, var_p2=65536, var_p1=445856, var_p0=438672, 
instance=0x7fffd992c000) at rlbox.wasm.c:49293
#8  w2c_rlbox_MOZ_XML_Parse
(instance=0x7fffd992c000, var_p0=438672, var_p1=445856, var_p2=65536, 
var_p3=0) at rlbox.wasm.c:20709
--Type  for more, q to quit, c to continue without paging--
#9  0x7fffea00fd50 in 
rlbox::rlbox_wasm2c_sandbox::impl_invoke_with_func_ptr(XML_Status 
(*)(unsigned int, unsigned int, int, int), unsigned int&&, unsigned int&&, 
unsigned int&&, bool&&) (func_ptr=, this=0x7fffd992c000)
at ./build-browser/dist/include/mozilla/rlbox/rlbox_wasm2c_sandbox.hpp:763
#10 
rlbox::rlbox_sandbox::INTERNAL_invoke_with_func_ptr&, rlbox::tainted, unsigned long, bool>(char const*, void*, 
rlbox::tainted&, 
rlbox::tainted&&, unsigned long&&, 
bool&&) (func_name=, func_ptr=, this=)
at ./build-browser/dist/include/mozilla/rlbox/rlbox_sandbox.hpp:790
#11 nsExpatDriver::ParseChunk(char16_t const*, unsigned int, 
nsExpatDriver::ChunkOrBufferIsFinal, unsigned int*, unsigned long*)
(this=0x74856400, aBuffer=, aLength=aLength@entry=32768, 
aIsFinal=aIsFinal@entry=nsExpatDriver::ChunkOrBufferIsFinal::FinalChunk, 
aConsumed=0x7fffc50c, aLastLineLength=0x7fffc510) at 
./parser/htmlparser/nsExpatDriver.cpp:1248
#12 0x7fffea01015c in nsExpatDriver::ChunkAndParseBuffer(char16_t const*, 
unsigned int, bool, unsigned int*, unsigned int*, unsigned long*)
(this=this@entry=0x74856400, aBuffer=aBuffer@entry=0x7fffd8f90020 
u"\n\n

Re: What are the current available browser options for debian-ppc64?

2023-11-21 Thread John Paul Adrian Glaubitz
On Tue, 2023-11-21 at 08:32 -0800, Ken Cunningham wrote:
> I added an 8GB swapfile, and (slowly) got this backtrace:
> 
> # cat error.txt
> Thread 1 "firefox" received signal SIGSEGV, Segmentation fault.
> i32_load8_u (addr=2014643200, mem=) at rlbox.wasm.c:146
> 146   rlbox.wasm.c: No such file or directory.
> (gdb) bt
> #0  i32_load8_u (addr=2014643200, mem=) at rlbox.wasm.c:146

Looks like a crash in the WASM code.

Could you please check whether the backtrace looks different with the older
Firefox package which does not include the previously mentioned patch?

> http://ftp.ports.debian.org/debian-ports/pool-ppc64/main/f/firefox/

Please install both these packages, then re-run Firefox from gdb and post
the backtrace here. If my theory is correct, we will at least have the
confirmation that the other patch is correct and fixes the graphics format
crash.

Thanks,
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Re: What are the current available browser options for debian-ppc64?

2023-11-21 Thread John Paul Adrian Glaubitz
Hi!

On Mon, 2023-11-20 at 22:32 +0100, John Paul Adrian Glaubitz wrote:
> There is currently no up-to-date version of Firefox for 32-bit PowerPC since 
> Firefox
> currently requires NodeJS to build which is not available on 32-bit PowerPC 
> at the
> moment.
> 
> It is actually possible, however, to use transpile the JavaScript files from 
> x86_64
> for 32-bit PowerPC so that NodeJS is actually not needed. The Debian package 
> does
> not implement such a mechanism at the moment though while Oracle does it on 
> Solaris
> for SPARC [1].
> 
> Anyways, this particular crash a known upstream bug in Firefox [2]. I wonder 
> whether
> it might be fixed by this particular patch [3].

I have just been reminded by a comment in the upstream bug report [1] that the 
VoidPPC
project actually has a number of patches which fix issues in Firefox on PowerPC 
[2] and
I'm rebuilding Firefox with this patch [3] now which claims to address issues 
with the
image decoder on big-endian targets.

Let's see.

Adrian

PS: This is why it's so important to upstream patches. The VoidPPC and Solaris 
people did
so much work but didn't push for their patches to be merged upstream or at 
least, they
weren't trying hard enough.

> [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1845669
> 
> [2] 
> https://github.com/void-ppc/void-packages-ppc750/tree/master/srcpkgs/firefox/patches
> [3] 
> https://github.com/void-ppc/void-packages-ppc750/blob/master/srcpkgs/firefox/patches/big-endian-image-decoders.patch

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Re: What are the current available browser options for debian-ppc64?

2023-11-21 Thread John Paul Adrian Glaubitz
On Tue, 2023-11-21 at 20:38 +0100, John Paul Adrian Glaubitz wrote:
> I have just been reminded by a comment in the upstream bug report [1] that 
> the VoidPPC
> project actually has a number of patches which fix issues in Firefox on 
> PowerPC [2] and
> I'm rebuilding Firefox with this patch [3] now which claims to address issues 
> with the
> image decoder on big-endian targets.

Please test this build which include the image decoder big-endian fix from 
VoidPPC:

> https://people.debian.org/~glaubitz/firefox-ppc64/test002/

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Re: What are the current available browser options for debian-ppc64?

2023-11-21 Thread Johannes Brakensiek
Hi Adrian,

Am Dienstag, dem 21.11.2023 um 21:20 +0100 schrieb John Paul Adrian
Glaubitz:
> 
> Please test this build which include the image decoder big-endian fix
> from VoidPPC:
> 
> > https://people.debian.org/~glaubitz/firefox-ppc64/test002/
> 
> Adrian
> 

thanks for providing the binary. It still segfaults. Could you provide
debug symbols as well, please? I'd send a backtrace.

Johannes



Re: What are the current available browser options for debian-ppc64?

2023-11-21 Thread John Paul Adrian Glaubitz
Hi!

On Tue, 2023-11-21 at 22:05 +0100, Johannes Brakensiek wrote:
> Am Dienstag, dem 21.11.2023 um 21:20 +0100 schrieb John Paul Adrian
> Glaubitz:
> > 
> > Please test this build which include the image decoder big-endian fix
> > from VoidPPC:
> > 
> > > https://people.debian.org/~glaubitz/firefox-ppc64/test002/
> > 
> > Adrian
> > 
> 
> thanks for providing the binary. It still segfaults. Could you provide
> debug symbols as well, please? I'd send a backtrace.

Here you go: https://box.fu-berlin.de/s/RAPxkDspfHBzG48

I am starting to fear that we're seeing a new bug here on ppc64 for which
there is no patch yet.

FWIW, if we manage to fix Firefox on ppc64, I do actually have some sort of
commit access for Firefox to get patches landed.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913