You are not logged in.

#1 2024-03-28 02:57:51

7ate9
Member
Registered: 2024-03-28
Posts: 1

Firefox creates system hang, generally requires power interuption

Hello,

Occasionally when I am browsing with Firefox I have it freeze up. This wouldn't be so annoying if it didn't make me have to forcefully shut down the system via power interruption along with it. Also frustrating is the general lack of information left whenever this happens. I'm also hesitant to try and troubleshoot by reproducing it repeatedly as I don't want to have to keep forcefully shutting my computer down every time this happens.

The system never crashes, it just hangs indefinitely from what I can tell. (I haven't tried to wait out the stall, but I have waited at least ten minutes at one point). It is impossible to close Firefox, change TTY, etc.

I've never had this happen when viewing a webpage, only when loading (shortly clicking after a link, for example).

Typically when this happens I am also playing music from my audio player. The audio will temporarily play for a bit before halting, but it is the last thing to typically stop (my cursor freezes up before the audio stops playing). This may be a factor in the issue, as I notice rtkit-daemon *constantly* commenting on supervising audio-related threads of processes pulseaudio and Firefox in the systemctl journal.

My suspicions believe that this is due to a lack of free memory when this happens as it always happens on resource intensive websites.

My swap space is encrypted. I have before had the swap space be used it's generally noticeable from system slowdowns. I don't know if this happens when I run out of memory and my system tries to use the swap space and fails / hangs for a long time. My computer is a potato so this wouldn't shock me if disabling this stops the issue from occurring. I would prefer leaving it on though if possible.

I've had the following link hang my system twice at this point. I can get it to load on my Android phone's Firefox fine. I don't think the web browser likes the GIF files for some reason as it lags on my phone as well.
https://github.com/jghauser/papis.nvim

(I apologize for the verbosity / redundancy of any questions I have below. I would like to work on this more tomorrow so I will probably answer some of my own questions later).

$ uname -a:

Linux ArchHPStream 6.8.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 16 Mar 2024 17:15:35 +0000 x86_64 GNU/Linux

System info via neofetch: 

OS: Arch Linux x86_64 
Host: HP Stream Laptop 11-ak0012dx
Kernel: 6.8.1-arch1-1 
Shell: bash 5.2.26 
Resolution: 1920x1080 
WM: sway 
CPU: Intel Celeron N4020 (2) @ 2.800GHz 
GPU: Intel GeminiLake [UHD Graphics 600] 
Memory: 1907MiB / 3735MiB

Last few entries of sudo journalctl -b -2:

Mar 27 19:41:21 ArchHPStream systemd[1]: Starting Time & Date Service...
Mar 27 19:41:21 ArchHPStream systemd[1]: Started Time & Date Service.
Mar 27 19:41:51 ArchHPStream systemd[1]: systemd-timedated.service: Deactivated successfully.
Mar 27 19:42:15 ArchHPStream systemd[1]: Starting Time & Date Service...
Mar 27 19:42:16 ArchHPStream systemd[1]: Started Time & Date Service.
Mar 27 19:42:16 ArchHPStream rtkit-daemon[1183]: Supervising 3 threads of 1 processes of 1 users.
Mar 27 19:42:16 ArchHPStream rtkit-daemon[1183]: Supervising 3 threads of 1 processes of 1 users.
Mar 27 19:42:16 ArchHPStream rtkit-daemon[1183]: Supervising 3 threads of 1 processes of 1 users.
Mar 27 19:42:16 ArchHPStream rtkit-daemon[1183]: Supervising 3 threads of 1 processes of 1 users.
Mar 27 19:42:16 ArchHPStream rtkit-daemon[1183]: Successfully made thread 75293 of process 75188 owned by '1000' RT at priority 10.
Mar 27 19:42:16 ArchHPStream rtkit-daemon[1183]: Supervising 4 threads of 2 processes of 1 users.
Mar 27 19:42:17 ArchHPStream rtkit-daemon[1183]: Supervising 4 threads of 2 processes of 1 users.
Mar 27 19:42:17 ArchHPStream rtkit-daemon[1183]: Supervising 4 threads of 2 processes of 1 users.
Mar 27 19:42:18 ArchHPStream rtkit-daemon[1183]: Supervising 4 threads of 2 processes of 1 users.
Mar 27 19:42:18 ArchHPStream rtkit-daemon[1183]: Supervising 4 threads of 2 processes of 1 users.
Mar 27 19:42:18 ArchHPStream rtkit-daemon[1183]: Supervising 4 threads of 2 processes of 1 users.
Mar 27 19:42:18 ArchHPStream rtkit-daemon[1183]: Supervising 4 threads of 2 processes of 1 users.
Mar 27 19:42:18 ArchHPStream rtkit-daemon[1183]: Supervising 4 threads of 2 processes of 1 users.
Mar 27 19:42:18 ArchHPStream rtkit-daemon[1183]: Supervising 4 threads of 2 processes of 1 users.
Mar 27 19:42:23 ArchHPStream rtkit-daemon[1183]: Supervising 4 threads of 2 processes of 1 users.
Mar 27 19:42:23 ArchHPStream rtkit-daemon[1183]: Supervising 4 threads of 2 processes of 1 users.

$ free:

               total        used        free      shared  buff/cache   available
Mem:         3824964     2260548      758468      533412     1567592     1564416
Swap:        8000508      231424     7769084

Questions:
- Is there some way to prevent Firefox from reaching the point of freezing the system, or some way I could add a key-bound high priority kill switch for the program?
- Does Firefox leave log files anywhere that I'm unaware of? Is there a way to get information that might be useful for troubleshooting this (i.e. run Firefox from strace)?
- Any way to log memory usage based on process and have this info written to the hard drive? edit: (relevant)[https://stackoverflow.com/questions/186 … n-on-linux]
- Are there any concerns other than potential data loss if I try and troubleshoot the issue? I would prefer doing this without it corrupting some important file I am unaware is open (though I should probably do a system backup regardless).
- Is there a way to figure out the process / thread name from an old systemctl journal?
- Is there any sensitive information in the systemctl journal that I should scrub if I post it? Syncthing and iwd seem to log some obnoxious info, but didn't know if there was any other bits I should scrub (I don't think any programs would leak passwords / keys except possibly in the case of a core dump?) Any sed / awk scripts for scrubbing sensitive info from logs so I don't have to make one?
- Any other useful logs not displayed via journalctl that I should look at / are relevant?
- (How do you set the pager for journalctl? I've tried setting the PAGER and SYSTEMCTL_PAGER env vars unsuccessfully)

Offline

#2 2024-03-28 08:36:23

seth
Member
Registered: 2012-09-03
Posts: 53,676

Re: Firefox creates system hang, generally requires power interuption

https://wiki.archlinux.org/title/Improv … conditions

If you push the power button, all logs will get lost because the filesystem can't be sync'd.

Offline

#3 2024-03-30 12:26:03

quoin
Member
Registered: 2021-02-08
Posts: 15

Re: Firefox creates system hang, generally requires power interuption

From a skim of your question, it sounds like the linux kernel OOM killer might be running, though normally I think I've been able to see that in `journalctl` logs after reboot.

The linux kernel's OOM killer is notorious about appearing to hang everything for long periods, in a way unhelpful for desktop applications.  To rule that out, you could install https://github.com/rfjakob/earlyoom , which will let you know... earlier and won't lock up your system.  If that doesn't start killing things, you'll know the problem is elsewhere.

Offline

Board footer

Powered by FluxBB