Announcement

Collapse
No announcement yet.

How can I investigate why my system hangs?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [DESKTOP] How can I investigate why my system hangs?

    I have installed 18.04 a few days before it was released, and since then I have had 6 system 'hang's:

    1) 3 were when the monitor went to sleep, and I could not wake it up again
    2) 3 were completely unexpected while editing files using vim in a kde term

    Type (1) have been there all the way from kUbuntu 15, on different machines. My guess is there is some problem involving nVidia drivers (which I really need).

    Where I've learned to live with type (1), type (2) is new for 18.04. This is really very bad, in all cases I was just editing a some files using vim on kterm's, nothing really going on. While moving the mouse, the mouse movement stops and all system response is off. Total freeze, screen still filled but nothing responds anymore. The keyboard doesn't even respond to num lock (the led is still on). Ctrl-backspace, Ctrl-alt-del, etc. - nope. Only solution is to turn the system off with the button on the back (or pull the power cord).

    My question: how can I investigate what causes this?

    #2
    What do the system logs show?
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Do they show anything after a reboot? How can I see that?

      Comment


        #4
        #2 - Possibly a memory leak somewhere, and it has gobbled up your ram.

        Can you give us some of your system specs/info?

        My first suggestion is to update Plasma using Kubuntu's Updates PPA:
        https://launchpad.net/~kubuntu-ppa/+archive/ubuntu/ppa
        There is an upgrade from Plasma 5.12.4 to Plasma 5.12.5 in there, which may help in this regard.
        Another thing to do is monitor your ram using ksysguard, or a plasma widget, and see if you can watch it grow as you go along.
        For me, there was a bad memory leak using the slideshow wallpaper, which made plasmashell use all my ram, and swap after a period of time (both on Neon and Kubuntu, on different systems). It has since been fixed, but another program or process could be causing it.

        #1 - Are you talking about the screen turning off for power saving, or are you suspending the system and the monitor does not come on when you wake it?
        Last edited by claydoh; May 12, 2018, 07:38 PM.

        Comment


          #5
          Generally, the beginnings of boot up trouble-shooting are to first remove "quiet splash" from the boot line so you can see what's happening and most importantly where it's hanging/failing.

          If trouble occurs after boot-up and log in, the first thing I do is check logs for activity matching the time of the problem. So note the time as exactly as possible when an issue occurs and then review the logs. If nothing is logged, it's usually hardware. Almost all the log files are in /var/log.

          Also, if lock up occurs during desktop use the first suspect is available RAM. A widget or some other part of the desktop or application (like a web browser) could have a memory leak that's filling up RAM. So what you perceive as locking up is actually a total system overload. A common symptom of this is the mouse cursor will appear to stop responding, but if you wait awhile (like 5-10 minutes) the cursor will move the direction of the last mouse movement a bit then stop again. The keyboard would also exhibit the same behavior. You can open ksysguard immediately after boot and leave it open and watch your RAM stats while working.

          Please Read Me

          Comment


            #6
            Originally posted by BertBril View Post
            Do they show anything after a reboot? How can I see that?
            From a Terminal
            dmesg | less
            and page through. The time of events is on the left.

            From the desktop
            KGear menu -->Applications --> System -->System Log Viewer
            If you don't see System Log Viewer then add it
            sudo apt install ksystemlog
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Ok thx all for thinking about this. Let's go through the suggestions:

              1) @GreyGeek: The system log. Unfortunately, the system log starts where the boot starts. But my problem is *before* that: remember, when the system hangs I need to physically turn off the system. Then with the new boot a new system log appears. Thus, the system log says nothing about what happened. I would need the system log of the *previous* Linux 'session'.

              2) @oshunluvr: This is not a bootup problem. This is a 'system hangs silently' problem. And when it hangs, I can't do anything anymore. Only power-off and reboot helps.

              3) @oshunluvr and @claydoh: System memory. That is 100% sure not the problem. I have tons of memory, check this often, have system monitor on a lot. As I said this is completely unpredictable. It happened after a week uptime with crazy stuff being processed, bundles of tools used, megabytes on the clipboards, many memory checks, and then, when you do not expect anything it happens. But also, yesterday I had the computer on for 15 minutes (!), all I did was a bit of editing (using vim) and it happened again. Since then, I have had one day of uptime with loads more on the screen.

              3) @claydoh: This is not related to the system suspending; I turned this off long ago because it simply always gave problems with many many things. The only power 'saver' I use is 'screen energy saving'.

              I guess my best bet is to update Plasma. I have to say that the stability has gone down with 18.04:
              * I get 'Desktop effects restarted due to a graphics reset' so often I do not pay attention anymore.
              * The panel and system tray stop being updated from time to time. Maybe log out and in would help but I prefer reboot (almost as fast as I have SSD disks).

              @claydoh: The 'Insert image' doesn't do anything. Try
              https://drive.google.com/open?id=1yokYjeln2vRK__v5h8OJSy-tMVg4Ub4o

              Comment


                #8
                To be honest, I'm not keen on using PPA stuff, especially as the change log doesn't suggest anything is fixed in this respect. All I'd like to do is to figure out what exactly is causing this.

                Maybe a tool that saves the syslog every minute or so to a file and syncs. With that, I could wait for a minute when the system hangs again, before turning the system off. Of course, the hang may be not Plasma-only but the Linux kernel itself. In that case, that strategy would fail miserably, too.

                Comment


                  #9
                  Originally posted by BertBril View Post
                  The system log...I would need the system log of the *previous* Linux 'session'.
                  And you can have it (assuming your kubuntu is set up like mine). Have a look in /var/log. In mine:
                  Code:
                  $ ls -l syslog*
                  -rw-r----- 1 syslog adm 375256 May 13 21:27 syslog
                  -rw-r----- 1 syslog adm  91128 May 13 11:01 syslog.1
                  -rw-r----- 1 syslog adm  14281 May 12 10:05 syslog.2.gz
                  -rw-r----- 1 syslog adm  12836 May 11 11:15 syslog.3.gz
                  -rw-r----- 1 syslog adm  21871 May 10 09:45 syslog.4.gz
                  -rw-r----- 1 syslog adm  18672 May  9 11:57 syslog.5.gz
                  -rw-r----- 1 syslog adm 137407 May  8 13:06 syslog.6.gz
                  -rw-r----- 1 syslog adm   6235 May  7 00:09 syslog.7.gz
                  I rebooted this evening at about 21:27. Don't be deterred by the .gz, modern editors like vim and kate will decompress them automatically on opening. Some of the other logs there, like kern.log and Xorg.0.log could possibly have something.

                  ...memory...
                  Ok, you're on to it running out, I think. But a hardware failure in the memory is a possibility. Reseating the RAM, after cleaning the contacts with an eraser, has worked for me a couple of times (albeit years ago).
                  Running a memory test overnight might be an idea. The old memtest86 distributed with grub or ubuntu or something won't work with UEFI, but your motherboard might support a legacy boot from something that has memtest86, or you could download the new version from memtest86.com.
                  Regards, John Little

                  Comment


                    #10
                    @jlittle: OK, didn't know these were saved. Unfortunately, there is absolutely nothing in those system logs (the log from the the latest hang after 15 mins ends with boot-up stuff from Apache).

                    My system is very new (half a year old), it didn't have these problems on 17.10. Wouldn't it be a real coincidence if the memory just happened to start failing after installing 18.04?

                    I'll take a look at the memtest anyway.

                    BTW Plasma 5.12.5 just became available in the regular updates, I installed it, rebooted, and have not had a single 'Desktop effects restarted' since! Encouraging!

                    Comment

                    Working...
                    X