Web lists-archives.com

Re: KDE hang? (not computer, not X11?)




Hi Kevin,
   Responses inline below.

On Sun, Mar 5, 2017 at 1:37 AM, Kevin Krammer <krammer@xxxxxxx> wrote:
>
> On Saturday, 2017-03-04, 13:23:37, Mark Knecht wrote:
> > Hi all,
> >    I experienced a rather weird hang yesterday which logically seemed like
> > a KDE problem but I'm unsure. No long-term lasting problems resulted but I
> > wondered how to debug it or just best deal with it if it happens again.
> > Thanks in advance for any ideas.
> >
> >    The machine is Gentoo, mostly stable with kde-meta-16.08.3 installed and
> > generally updated every couple of days or so.
> >
> >    The symptoms of the event were:
> >
> > 1) The machine was up all day. I had been running 2 Virtualbox Windows VMs
> > and had Matlab running in Linux, along with Chrome and other smaller apps.
> > The machine was fine all day.
> >
> > 2) At 2PM local time the stock market closed so I shut down everything
> > except 1 Windows VM which downloads data in the afternoon.
> >
> > 3) At some point KDE became non-responsive to either the mouse or keyboard.
> > The mouse worked, the cursor moved, but nothing responded. The upper-left
> > trigger to see all windows didn't work, the KDE menu was non-responsive and
> > the Windows VM was non-responsive. However the programs running in the VM
> > were still working and completed normally. I just had no apparent way to
> > use KDE.
>
> Could you still interact with the VM?
>

No. The VM was visually still updating - downloading data was proceeding and the program inside of Windows was doing everything as expected. However neither the keyboard or mouse had any impact on what it was doing.

As I said, the cursor pointer in KDE was still visible and moveable around the screen. It covered all 3 monitors and stopped at the boundary as expected but clicking the mouse did nothing. Also, rolling the roller on the mouse usually changes the virtual desktop being displayed but at this point it didn't work.

> Do you have any regularily updating element on your desktop/panels, e.g. a
> clock? If yes, check if it still updates.
>

The clock in the VM continued to update. I do not remember if the KDE Task Manager widget clock updated.

> > 4) I was able to shell to the console using Ctrl-Alt-F1 where I could log
> > in as root and also in my user account. Ctrl-Alt-F7 brought me back to X11
> > which was still non-responsive.
>
> Only mouse not responding or keyboard functions also?
> E.g. Alt+F2 (KRunner)?
>

I sadly didn't think to try any KDE specific key combinations like Alt-F2 however Alt-tab did not appear to work. However when there's only 1 app open I'm not sure it shows anything. Anyway, Alt-F2 is now on my list of things to try if this happens again.

> >    My question is was there something I might have tried to regain control
> > of KDE instead of having to do the reboot? One thing I thought of after the
> > event was maybe hot plug the mouse and/or keyboard to see if that work
> > anything up.
>
> It depends a bit, hence asking the questions above.
>
> One cause of no longer being able to interact can be a global "grab".
> X11 has the concept of application grabbing control of keyboard and/or mouse,
> e.g. popup windows such as menus do that.
>
> If a program grabs control that way no other program can get mouse or keyboard
> events.
>

I wondered about that thinking maybe the VM grabbed to mouse but the VM cursor wasn't moving. The KDE cursor appeared to be what was active.

> The only way to recover from that is to get that "lock" released, e.g. by
> closing the window that grabbed input or killing the respective process.
>
> If it is just a process hanging, e.g. plasmashell or kwin, then killing that
> and restarting it would already solve the problem.
>

As I was able to shell to the console is there something I could have run to tell me who owns the mouse at any given time? After the VM shut down I still couldn't switch virtual desktops and there didn't appear to be any apps open, at least by looking at the 6 Pager icons. However if the application that grabbed the keyboard and/or mouse was minimized I wouldn't have seen it anyway. (Or so I think.)

After the VM was gone I couldn't log out of KDE as the KDE Launcher menu still wasn't responding. 

Also, when I rebooted the machine I didn't see any messages but recent Gentoo kernels and recent NVidia drivers have been having some problems, at least when using Matlab, so possibly it's something at that level inhibiting what KDE was receiving. 

Thanks,
Mark

> Cheers,
> Kevin
> --
> Kevin Krammer, KDE developer, xdg-utils developer
> KDE user support, developer mentoring