Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927959 - www-client/firefox-124.0.1 segfault when parsing XML document
Summary: www-client/firefox-124.0.1 segfault when parsing XML document
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-27 13:06 UTC by David Carlos Manuelda
Modified: 2024-04-14 16:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
backtrace (backtrace.txt,35.69 KB, text/plain)
2024-04-03 18:35 UTC, David Carlos Manuelda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Carlos Manuelda 2024-03-27 13:06:56 UTC
I am using firefox--124.0.1 and whenever I try to load an XML document (regardless if it is remote or local) it says the "Browser tab have just failed".

I can see in dmesg the following message when this happens:
[ 1982.189894] traps: Isolated Web Co[12859] general protection fault ip:7fd1c18fe0dc sp:7ffd45bbd980 error:0 in libxul.so[7fd1bc224000+58a4000]

And when I start firefox via CLI I get the following output:
[Parent 12661, IPC I/O Parent] WARNING: process 12859 exited on signal 11: file /tmp/portage/www-client/firefox-124.0.1/work/firefox-124.0.1/ipc/chromium/src/base/process_util_posix.cc:265


Reproducible: Always
Comment 1 Mike Gilbert gentoo-dev 2024-03-28 19:45:06 UTC
Please try to get a backtrace.

https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
Comment 2 David Carlos Manuelda 2024-03-28 19:47:19 UTC
(In reply to Mike Gilbert from comment #1)
> Please try to get a backtrace.
> 
> https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces

I've tried to debug it with -g -ggdb and gdb debugger.

The problem is that all of this happens on a subthread and gdb only tells me that subprocess died (like dmesg) but since the program continues, gdb is not allowing me to type "bt".

Sorry, but  I have no more knowledge of gdb to debug only the tab subthread
Comment 3 Sven B. 2024-03-28 21:23:16 UTC
(In reply to David Carlos Manuelda from comment #2)
> (In reply to Mike Gilbert from comment #1)
> > Please try to get a backtrace.
> > 
> > https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
> 
> I've tried to debug it with -g -ggdb and gdb debugger.
> 
> The problem is that all of this happens on a subthread and gdb only tells me
> that subprocess died (like dmesg) but since the program continues, gdb is
> not allowing me to type "bt".
> 
> Sorry, but  I have no more knowledge of gdb to debug only the tab subthread

You can try attaching gdb to the sub processes with gdb --pid
Comment 4 cyrillic 2024-03-29 01:04:45 UTC
I think I just ran across this bug when I was trying to file my taxes. I went to irs.gov and followed the link for "IRS Direct File pilot", and the tab promptly crashed. I am not sure if this is an XML document, but it seems like a related problem.
Comment 5 David Carlos Manuelda 2024-04-03 07:59:09 UTC
(In reply to Sven B. from comment #3)
> (In reply to David Carlos Manuelda from comment #2)
> > (In reply to Mike Gilbert from comment #1)
> > > Please try to get a backtrace.
> > > 
> > > https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
> > 
> > I've tried to debug it with -g -ggdb and gdb debugger.
> > 
> > The problem is that all of this happens on a subthread and gdb only tells me
> > that subprocess died (like dmesg) but since the program continues, gdb is
> > not allowing me to type "bt".
> > 
> > Sorry, but  I have no more knowledge of gdb to debug only the tab subthread
> 
> You can try attaching gdb to the sub processes with gdb --pid

Yes, I know, but the problem is: There are (at least) 8 subthreads of firefox: Which is the one that is processing the tab where I will load the XML file?

And if I gdb the main thread, since the abnormal exited is handled gracefully and firefox does not crash I can not run a bt on gdb because the program continues.
Comment 6 Sven B. 2024-04-03 09:01:44 UTC
> Yes, I know, but the problem is: There are (at least) 8 subthreads of
> firefox: Which is the one that is processing the tab where I will load the
> XML file?

You could try reducing the number of processes firefox spawns (somewhere in settings iirc or alternatively in about:config) and open only a single window with a single tab. The processes are also named e.g. Web Content, Socket, etc. I would guess attach it to a Web Content process.

Alternatively run some heavy workload in the tab you want to crash with the xml document, check your system monitor which process is heavily using cpu and attach the gdb to it then open the xml. You could also check which processes stay after a crash, and which spawns new after opening a new tab afterwards.
Comment 7 Joonas Niilola gentoo-dev 2024-04-03 10:24:19 UTC
Does Firefox-bin work?
Comment 8 David Carlos Manuelda 2024-04-03 18:34:55 UTC
(In reply to Joonas Niilola from comment #7)
> Does Firefox-bin work?

Yes, bin does work.

I managed to get a backtrace which I will attach
Comment 9 David Carlos Manuelda 2024-04-03 18:35:35 UTC
Created attachment 889375 [details]
backtrace

The XML used for testing this crash is: https://www.w3schools.com/xml/note.xml
Comment 10 Joonas Niilola gentoo-dev 2024-04-05 17:05:06 UTC
I don't see anything obvious in that backtrace. I guess firefox isn't built with "+debug" use flag?

What use flags firefox is built with? Does toggling "clang" +- help? (Or system* flags) Anyway, you might have to recompile with +debug to provide useful backtrace.

There was one patch for new glibc and Firefox's sandbox pushed to 124.0.2 update. While I don't see anything in here related to those, you may want to give 124.0.2 a try.
Comment 11 David Carlos Manuelda 2024-04-14 16:25:41 UTC
I did some system management during the weekend and somehow this is no longer valid but I think it is worth to write down some facts that may or may not be relevant:

* This is a LLVM profile ~arch
* I had installed llvm17 and llvm18 as part of a normal update
  * But not all of those components are slotted, like libcxx, lld and libomp
* I package.masked llvm:18 and all of its components and removed them to have only version 17
* I emerged -e world

And now the problem is gone, I am not sure if something on the above can be the culprit.