# Strange hang



## Oxyd (Jun 2, 2009)

Hello,

my FreeBSD install just hung in a weird way.  The system didn't hang as a whole, X kept running, I could IM people and do ordinary desktop stuff.  But when I opened terminal and typed "dmesg", nothing happened.  And I quite mean nothing: the cursor was flashing on the line below the prompt and stayed there.  Pressing Control-C produced just a ^C printed on the terminal.

So I opened up another terminal, did "pgrep dmesg" -- it hung, the same way dmesg did.  I tried top, that hung too.  I su'd to root, and did "cat /var/log/messages" -- it hung.  So I closed all programs I was running, and wanted to log out of X -- clicked Log Out in Xfce, the screen greyed, and X hung.

So I Ctrl-Alt-F1'd, logged in as root and did "shutdown -r now".  The system started going down, stayed there for a while, and then produced an error saying "/etc/rc.shutdown terminated in an abnormal way, aborting shutdown, switching to single-user mode".  After that, the shutdown sequence continued -- it complained that "some PIDs won't terminate".  The last message I could see was "All buffers synced" and then it just hung there until I hard-reset it.

Here's a part from my /var/log/messages from before the hard-reset.


```
Jun  2 19:23:06 starlight kernel: umass0: <SONY WALKMAN, class 0/0, rev 2.00/0.01, addr 2> on uhub1
Jun  2 19:23:06 starlight root: Unknown USB device: vendor 0x054c product 0x036e bus uhub1
Jun  2 19:23:07 starlight kernel: (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 
Jun  2 19:23:07 starlight kernel: (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
Jun  2 19:23:07 starlight kernel: (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition
Jun  2 19:23:07 starlight kernel: (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0
Jun  2 19:23:07 starlight kernel: (probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed
Jun  2 19:23:07 starlight kernel: (probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data)
Jun  2 19:23:07 starlight kernel: da0 at umass-sim0 bus 0 target 0 lun 0
Jun  2 19:23:07 starlight kernel: da0: <SONY WALKMAN 1.00> Removable Direct Access SCSI-4 device 
Jun  2 19:23:07 starlight kernel: da0: 40.000MB/s transfers
Jun  2 19:23:07 starlight kernel: da0: 1877MB (961408 2048 byte sectors: 255H 63S/T 59C)
Jun  2 19:23:07 starlight kernel: GEOM_LABEL: Label for provider da0s1 is msdosfs/WALKMAN.
Jun  2 19:23:08 starlight console-kit-daemon[846]: WARNING: kvm_getenvv failed: cannot open /proc/957/mem
Jun  2 19:23:08 starlight kernel: mount option <data> is unknown
Jun  2 19:23:08 starlight kernel: mount option <data> is unknown
Jun  2 19:36:01 starlight kernel: pid 1178 (notification-daemon), uid 1001: exited on signal 6
Jun  2 19:44:17 starlight kernel: pid 1202 (notification-daemon), uid 1001: exited on signal 6
Jun  2 19:47:00 starlight kernel: pid 1225 (notification-daemon), uid 1001: exited on signal 6
Jun  2 19:55:28 starlight kernel: pid 1239 (notification-daemon), uid 1001: exited on signal 6
Jun  2 20:22:51 starlight kernel: pid 1413 (notification-daemon), uid 1001: exited on signal 6
Jun  2 20:27:28 starlight kernel: pid 1432 (notification-daemon), uid 1001: exited on signal 6
Jun  2 20:28:56 starlight kernel: pid 1447 (notification-daemon), uid 1001: exited on signal 6
Jun  2 20:41:44 starlight kernel: umass0: at uhub1 port 7 (addr 2) disconnected
Jun  2 20:41:44 starlight kernel: (da0:umass-sim0:0:0:0): lost device
Jun  2 20:41:44 starlight kernel: GEOM_LABEL: Label msdosfs/WALKMAN removed.
Jun  2 20:41:44 starlight kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x39, scsi status == 0x0
Jun  2 20:41:44 starlight kernel: (da0:umass-sim0:0:0:0): removing device entry
Jun  2 20:44:53 starlight kernel: pid 1504 (notification-daemon), uid 1001: exited on signal 6
Jun  2 20:45:20 starlight kernel: pid 1513 (notification-daemon), uid 1001: exited on signal 6
Jun  2 21:23:12 starlight kernel: pid 1519 (notification-daemon), uid 1001: exited on signal 6
Jun  2 21:25:08 starlight kernel: pid 1610 (notification-daemon), uid 1001: exited on signal 6
Jun  2 21:28:34 starlight kernel: pid 1620 (notification-daemon), uid 1001: exited on signal 6
Jun  2 21:31:26 starlight kernel: pid 1626 (notification-daemon), uid 1001: exited on signal 6
Jun  2 21:34:04 starlight kernel: pid 1649 (notification-daemon), uid 1001: exited on signal 6
Jun  2 21:37:45 starlight kernel: pid 1663 (notification-daemon), uid 1001: exited on signal 6
Jun  2 21:38:40 starlight kernel: pid 1671 (notification-daemon), uid 1001: exited on signal 6
Jun  2 21:39:34 starlight kernel: pid 1681 (notification-daemon), uid 1001: exited on signal 6
Jun  2 21:39:44 starlight kernel: pid 1683 (Thunar), uid 1001: exited on signal 6 (core dumped)
Jun  2 21:40:45 starlight kernel: pid 1712 (notification-daemon), uid 1001: exited on signal 6
Jun  2 21:41:41 starlight su: BAD SU oxyd to = on /dev/ttyp4
Jun  2 21:41:43 starlight su: oxyd to root on /dev/ttyp4
Jun  2 21:43:15 starlight login: ROOT LOGIN (root) ON ttyv0
Jun  2 21:43:45 starlight login: ROOT LOGIN (root) ON ttyv1
Jun  2 21:43:47 starlight shutdown: reboot by root: 
Jun  2 21:44:19 starlight rc.shutdown: 30 second watchdog timeout expired. Shutdown terminated.
Jun  2 21:44:19 starlight init: /bin/sh on /etc/rc.shutdown terminated abnormally, going to single user mode
Jun  2 21:44:19 starlight syslogd: exiting on signal 15
```

I'm running FreeBSD 7.2-STABLE, 
	
	



```
FreeBSD starlight 7.2-STABLE FreeBSD 7.2-STABLE #1: Thu May 28 22:54:45 CEST 2009     root@starlight:/usr/obj/usr/src/sys/STARLIGHT  i386
```


----------



## SirDice (Jun 2, 2009)

```
Jun  2 20:41:44 starlight kernel: umass0: at uhub1 port 7 (addr 2) disconnected
Jun  2 20:41:44 starlight kernel: (da0:umass-sim0:0:0:0): lost device
```

Your system freaked out because a mounted device was removed. You're lucky the thing didn't panic.


----------



## Oxyd (Jun 2, 2009)

SirDice said:
			
		

> ```
> Jun  2 20:41:44 starlight kernel: umass0: at uhub1 port 7 (addr 2) disconnected
> Jun  2 20:41:44 starlight kernel: (da0:umass-sim0:0:0:0): lost device
> ```
> ...



I suspected the USB messages are the cause.  I don't remember ever mounting the device, though.  It's an MP3 player that only supports charging via USB -- and I just wanted to let it charge.  It's possible that Xfce or HAL or something may be doing some automounting that I don't know about.  I'll check my configs.


----------



## Beastie (Jun 3, 2009)

Do you have Thunar's volume manager extension installed?


----------



## SirDice (Jun 3, 2009)

Oxyd said:
			
		

> I suspected the USB messages are the cause.  I don't remember ever mounting the device, though.  It's an MP3 player that only supports charging via USB -- and I just wanted to let it charge.  It's possible that Xfce or HAL or something may be doing some automounting that I don't know about.  I'll check my configs.


Quite likely hal mounted it. When that happens don't forget to unmount it before you disconnect it.


----------



## Oxyd (Jun 5, 2009)

Yes, I have Volume Manager Extension installed.  It's set-up to not automount anything, though.  Anyway, I disabled it.

Something's still acting weird here.  I plugged the device in again and typed mount to verify that it hasn't been automounted.  Well, the device has not been -- but my NTFS partition on my HDD has been mounted under /media/windows.  I umounted /media/windows, took the USB thing out, plugged it in again -- /media/windows-1 is now mounted and leads to the NTFS partition.


----------



## SirDice (Jun 5, 2009)

That's weird. How up to date is your hal?


----------



## Oxyd (Jun 5, 2009)

```
~ > pkg_info | grep hal
hal-0.5.11_25       Hardware Abstraction Layer for simplifying device access
```

Should be rather up-to-date.


----------

