How to debug Linux crashes ?

Usjes

New Member
Joined
Dec 30, 2018
Messages
4
Reaction score
0
Credits
24
Hi,

Generally all I use my laptop for is web browsing and I repeatedly see the same crashing behaviour. It generally happens when I have many tabs open (like 30+) and suddenly the disk access (as indicated by an LED) will start going crazy and after a few seconds I will loose all control of the system (no response to keystrokes or to mouse movements). The only solution is to yank the power cable and start again.
If I am quick enough I can hit CTRL-ALT-M (which I have mapped to xkill) and then after a while the cursor will change to the fat x and if I still have mouse control I can move it to the offending application (usually Firefox) and click on it, if I am lucky it will then die after a while and I can continue on without having to power-cycle the laptop.
I have seen this crashing behaviour repeatedly over a couple of years on multiple versions of Ubuntu. I know it has happened with:
- Chromium
- Firefox
- The TOR Browser
It may also have happened with GIMP.
So, I would like a way to debug this. It seems there are two possibilities:
1. Run the application in some sort of 'sand-boxed' mode which would strictly limit the max resources it is allowed use. Here I am assuming that if I could limit the max amount of any given resource (RAM, disk access, etc ) that an application is allowed to use then I would never end up in the situation where the machine would become unresponsive to keystrokes/mouse movements. Then when the crash happens I could simply open a terminal and try to see what is going on or at least simply kill the offending process and continue without having to power-cycle
2. Run some script in the background to continually log key system parameters (eg the output of top) so that next time the crash happens I could power-cycle the machine and then look at the log to figure out what went wrong

So, what is the best way to proceed here ? Or indeed are there any logs which would already be created by default which could give me insights into what is happening during these crashes and how to prevent them ?

For reference I am currently running Ubuntu 14.04 but this has been happening for a couple of years now so it is not specific to 14.04, moreover it is not something that resolves itself if given enough time I have left it for ~10 hours overnight and in the morning it is still hammering away at the hard-disk and unresponsive to inputs. This is the most perplexing aspect of the problem the fact that it seems to be one application which is malfunctioning yet it take down the entire system. Historically I saw this as one of the key differences between Linux and Windows from the point of view of usability; when something on Windows crashes it takes the entire system down in BSOD style whereas in Linux it used to just mean opening a terminal and killing a process. It seems that, in Ubuntu at any rate, you can now get the full 'Microsoft experience' on Linux.
 


OP
U

Usjes

New Member
Joined
Dec 30, 2018
Messages
4
Reaction score
0
Credits
24
Too many?
There's a max number of tabs that Linux supports now ? This is news to me. Don't suppose there's an official reference listing the max number of tabs allowed before the system becomes unusable ?
Anyway, leaving aside such absurd notions my question was how to debug issues like this not soliciting general guesses as to what might be wrong without any actionable path to resolution.
 

arochester

Moderator
Gold Supporter
Joined
Apr 25, 2017
Messages
1,578
Reaction score
1,248
Credits
2,722
It's a matter of memory. Extensions use memory. Tabs use memory.

If your computer is totally running out of memory there may be no error logs - it just doesn't have the memory to do it.

Some web browsers limit the number of tabs you open at one time or ask for confirmation that you really mean it.

Two extensions that might be useful (bearing in mind that extensions use memory) are "Auto Tab Discard" and "OneTab"
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
6,870
Reaction score
5,661
Credits
21,544
G'day @Usjes and welcome to linux.org :)

There are no logs per se for Firefox crashes, however have there been instances of its Crash Reporter showing up and have you submitted any reports?

In your address bar in FF, you could type in

about:crashes

and

about:memory

and see if there are any useful outcomes to be found there.

Personally, I have had up to 122 tabs open on a rig with 8GB of RAM and not crashed it, only stopped there because I got bored :)

Don't suppose there's an official reference listing the max number of tabs allowed before the system becomes unusable ?

Not that I am aware of, but you could try at Mozilla

https://support.mozilla.org/en-US/

The fact that you mention FF, Chromium and Tor suggests to me there is more of a problem with your system, perhaps.

You are likely aware that support for 14.04 finishes April next, so you might also consider upgrading and see if the problem persists.

Anyway, leaving aside such absurd notions my question was how to debug issues like this not soliciting general guesses as to what might be wrong without any actionable path to resolution.

I would suggest a slight attitudinal adjustment on your part, as you are seeking help from us, not the other way around. But I understand if the problem is frustrating you.

If you wish, you could give us the output of

Code:
inxi -Fxz

... and it might provide an idea of whether your system might have some limitations.

Cheers

Chris Turner
wizardfromoz
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Staff online

Members online


Top