# System stops responding and repeats a message about the mouse



## Swapjim (Nov 18, 2015)

I'm running FreeBSD 10.2 with all latest updates in core and ports. I'm using the stock kernel.

I connected two USB 3 external HDDs (to USB 2 ports) and used a rsync to sync the data from one drive (UFS) to the other (NTFS). I let it run the whole night.

When I woke up I couldn't ssh (connection refused) so I went to the machine itself and saw a message being repeated:


```
ums0: 3 buttons and [XYZ] coordinates ID=0
ugen4.2: <PixArt> at usbus4
ums0: <PixArt Microsoft USB Optical Mouse, class 0/0, rev 1.10/1.00, addr 2> on usbus4
```

I couldn't switch from one virtual console to the next (ctrl-alt-f2) and I couldn't restart (ctrl-alt-del). Normally, when I press the power button, the machine shuts down, but in this case it wouldn't.

I pressed the Num Lock key and the led on the keyboard didn't turn off. So I disconnected the USB mouse and the USB keyboard and connected just the keyboard. The message stopped popping on the screen and I saw a message about a keyboard being connected.

I was able to press Scroll Lock and run up-down in the framebuffer but nothing more than that. I had to pull the power plug. When I powered it back, the machine booted (I don't remember if it normally does that). I went away from the machine after I plugged in (didn't expect to just boot) so I don't know if there was any message that I should pay attention to something.

After that the OS booted normally and runs as we speak.

So, what was that? Am I looking at a hardware issue? A motherboard problem? A mouse problem? And why did SSHd stopped? I must say I'm a bit worried about the data in the two drives that synced, but that belongs to another topic.

I don't have any lines related to moused in /etc/rc.conf.

I use sc as my framebuffer.

I have kept connected this particular mouse in this FreeBSD machine in the past two months, and I have used it a bit inside Xorg. It's the first time this thing happens.

Lets check my /var/log/messages.

You'll notice this entry:


```
Nov 18 08:02:32 freebsd pkg: png upgraded: 1.6.18 -> 1.6.19
Nov 18 08:02:32 freebsd pkg: libvpx upgraded: 1.4.0.488 -> 1.4.0.488_1
Nov 18 08:02:32 freebsd shutdown: reboot by root:
```

That's because I've set this machine to update the core OS and the ports automatically every few hours. There was an update and then a machine restart.

There is a skip of a few hours after that:


```
Nov 18 08:02:42 freebsd syslogd: exiting on signal 15
Nov 18 15:09:46 freebsd syslogd: kernel boot file is /boot/kernel/kernel
```

That's all I can notice in /var/log/messages.


----------



## SirDice (Nov 18, 2015)

Not sure if it's the case here but FreeBSD really, really doesn't like it when filesystems suddenly disappear. There's no mention of it in the logs but if a mounted filesystem suddenly disappears bad things happen. Not too long ago this would even trigger a panic(9). Nowadays it just appears to hang. Like I said, not sure if that's the case but with USB devices it is a possibility.


----------



## Swapjim (Nov 18, 2015)

Oh my! I didn't know that. I have pulled a USB pen drive (ZFS formated) a couple of times by accident. Nothing bad happened. I was either lucky or the OS wasn't using that filesystem.

As for the two USB HDDs, well, I didn't unplug them. Perhaps the FUSE driver crashed, the filesystem vanished and FreeBSD hanged? Does that sound plausible? I can't find a log file for fuse in /var/log...


----------



## SirDice (Nov 18, 2015)

Swapjim said:


> Perhaps the FUSE driver crashed, the filesystem vanished and FreeBSD hanged? Does that sound plausible?


That certainly sounds plausible. But as you also had (USB) keyboard and mouse issues another plausible one is some problem with USB or its driver. It's going to be difficult to diagnose if there are no logs though.


----------



## wblock@ (Nov 18, 2015)

Swapjim said:


> I don't have any lines related to moused in /etc/rc.conf.


devd(8) starts moused(8) when USB mice are detected.



Swapjim said:


> I use sc as my framebuffer.


sc(4) is not a framebuffer, it's just an old-style text console.



Swapjim said:


> I've set this machine to update the core OS and the ports automatically every few hours.


Unattended updates can be dangerous.  It assumes that no manual steps will be needed, and could leave the machine vulnerable.


----------



## Swapjim (Nov 18, 2015)

Did someone edited my original post? Some of the files got a [ file ] tag but the link to the log vanished.



SirDice said:


> TBut as you also had (USB) keyboard and mouse issues another plausible one is some problem with USB or its driver.



You mean the thread where I couldn't get a PS2 mouse working? Because I don't remember having problems with my keyboard. Not that I exclude the keyboard as a problem cause. And as you said, the USB port might have a problem.

A problem with the driver, meaning the FreeBSD driver? So in this case I should debug it if possible and file a bug report? I would do that if it's not too advanced for my level.



SirDice said:


> It's going to be difficult to diagnose if there are no logs though.



Besides /var/log/messages, what other logfile can help diagnose this?



wblock@ said:


> Unattended updates can be dangerous. It assumes that no manual steps will be needed, and could leave the machine vulnerable.



Yeah, I've heard that. It's always in the back of my head to find out what's the best approach to update the system. I have some questions about it, but it belongs to another thread, and after I first check some stuff online.

I've checked the update log:


```
Updating the ports on Wed Nov 18 08:02:15 2015
Updating FreeBSD repository catalogue...
Fetching meta.txz: . done
Fetching packagesite.txz: .......... done
Processing entries: .......... done
FreeBSD repository update completed. 24632 packages processed.
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking for upgrades (2 candidates): .. done
Processing candidates (2 candidates): .. done
The following 2 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
  png: 1.6.18 -> 1.6.19
  libvpx: 1.4.0.488 -> 1.4.0.488_1

The process will require 94 KiB more space.
1 MiB to be downloaded.
Fetching png-1.6.19.txz: .......... done
Fetching libvpx-1.4.0.488_1.txz: .......... done
Checking integrity... done (0 conflicting)
[1/2] Upgrading png from 1.6.18 to 1.6.19...
[1/2] Extracting png-1.6.19: .......... done
[2/2] Upgrading libvpx from 1.4.0.488 to 1.4.0.488_1...
[2/2] Extracting libvpx-1.4.0.488_1: .......... done
```

And it seems to me very unlikely that any of these two ports could have effected anything that was taking place in the system. pkg doing it's stuff though, maybe?

Or perhaps it was the reboot. The cronjob attempted to reboot while the syncing was taking place. Maybe the FUSE process didn't terminate well. From what I see in the log, the system attempted a reboot at 08:02:32 but never managed it. I did it manually on 15:09:46.


```
Nov 18 08:00:25 freebsd ntfs-3g[26005]: Could not convert filename to Unicode: '[REDACTED]': Illegal byte sequence
Nov 18 08:02:32 freebsd pkg: png upgraded: 1.6.18 -> 1.6.19
Nov 18 08:02:32 freebsd pkg: libvpx upgraded: 1.4.0.488 -> 1.4.0.488_1
Nov 18 08:02:32 freebsd shutdown: reboot by root:
Nov 18 08:02:37 freebsd kernel: .
Nov 18 08:02:40 freebsd kernel: .
Nov 18 08:02:40 freebsd ntpd[608]: ntpd exiting on signal 15 (Terminated)
Nov 18 08:02:41 freebsd kernel: , 608.
Nov 18 08:02:42 freebsd kernel: .
Nov 18 08:02:42 freebsd syslogd: exiting on signal 15
Nov 18 15:09:46 freebsd syslogd: kernel boot file is /boot/kernel/kernel
Nov 18 15:09:46 freebsd kernel: Copyright (c) 1992-2015 The FreeBSD Project.
```


----------



## wblock@ (Nov 19, 2015)

Swapjim said:


> Did someone edited my original post? Some of the files got a [ file ] tag but the link to the log vanished.


Sorry, I think I fixed it now.


----------

