Closed grahamperrin closed 7 years ago
With an assumption that mount had not occurred
In retrospect:
– now I see, the lines relating to fsync(1).
If false:
In any case:
I wonder what happens when a simple USB flash drive with msdosfs is hot unplugged. I'll test. …
$ date ; uptime ; uname -v
Sat 10 Dec 2016 14:39:25 GMT
2:39p.m. up 8:51, 2 users, load averages: 1.29, 0.90, 0.87
FreeBSD 12.0-CURRENT #55 4fde044(drm-next-4.7): Fri Dec 9 20:03:40 UTC 2016 root@gauntlet:/usr/obj/usr/src/sys/GENERIC
$ mount | grep msdosfs
/dev/da0s1 on /media/DOLLY (msdosfs, local)
$ ls -dl /media/DOLLY
ls: /media/DOLLY: No such file or directory
$ # hey ho but probably good enough for a test in relation to
$ # https://github.com/trueos/trueos-core/issues/190#issuecomment-266210335
$ # -- I'll paste this to the issue and then pull the flash drive from the
$ # frontmost right-hand USB port of this HP EliteBook 850 G2 ...
$
No blackout, although (above) let's note that the mounted file system was not browseable before this hot unplug:
$ date ; tail -n 28 /var/log/messages
Sat 10 Dec 2016 14:45:57 GMT
Dec 10 11:20:33 momh167-gjp4-hpelitebook850g2-trueos kernel: pid 58062 (WebKitWebProcess), uid 1004: exited on signal 11
Dec 10 12:06:15 momh167-gjp4-hpelitebook850g2-trueos kernel: ugen0.8: <JetFlash Mass Storage Device> at usbus0 (disconnected)
Dec 10 12:06:15 momh167-gjp4-hpelitebook850g2-trueos kernel: umass0: at uhub2, port 4, addr 7 (disconnected)
Dec 10 12:06:15 momh167-gjp4-hpelitebook850g2-trueos kernel: da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
Dec 10 12:06:15 momh167-gjp4-hpelitebook850g2-trueos kernel: da0: <JetFlash Transcend 2GB 1100> s/n FTRR0IBTVZ58PPPJ detached
Dec 10 12:06:15 momh167-gjp4-hpelitebook850g2-trueos kernel: (da0:umass-sim0:0:0:0): Periph destroyed
Dec 10 12:06:15 momh167-gjp4-hpelitebook850g2-trueos kernel: umass0: detached
Dec 10 12:27:59 momh167-gjp4-hpelitebook850g2-trueos sshd[71242]: warning: /etc/hosts.allow, line 35: host name/address mismatch: 95.215.199.253 != ip-199-253.omega.net.pl
Dec 10 14:37:25 momh167-gjp4-hpelitebook850g2-trueos kernel: ugen0.9: <Android Android> at usbus0 (disconnected)
Dec 10 14:37:55 momh167-gjp4-hpelitebook850g2-trueos kernel: ugen0.8: <Verbatim STORE N GO> at usbus0
Dec 10 14:37:55 momh167-gjp4-hpelitebook850g2-trueos kernel: umass0 on uhub2
Dec 10 14:37:55 momh167-gjp4-hpelitebook850g2-trueos kernel: umass0: <Verbatim STORE N GO, class 0/0, rev 2.00/1.00, addr 9> on usbus0
Dec 10 14:37:55 momh167-gjp4-hpelitebook850g2-trueos kernel: umass0: SCSI over Bulk-Only; quirks = 0xc100
Dec 10 14:37:55 momh167-gjp4-hpelitebook850g2-trueos kernel: umass0:1:0: Attached to scbus1
Dec 10 14:37:55 momh167-gjp4-hpelitebook850g2-trueos kernel: da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
Dec 10 14:37:55 momh167-gjp4-hpelitebook850g2-trueos kernel: da0: <Verbatim STORE N GO 5.00> Removable Direct Access SCSI device
Dec 10 14:37:55 momh167-gjp4-hpelitebook850g2-trueos kernel: da0: Serial Number 070B29D2DF235960
Dec 10 14:37:55 momh167-gjp4-hpelitebook850g2-trueos kernel: da0: 40.000MB/s transfers
Dec 10 14:37:55 momh167-gjp4-hpelitebook850g2-trueos kernel: da0: 3815MB (7814304 512 byte sectors)
Dec 10 14:37:55 momh167-gjp4-hpelitebook850g2-trueos kernel: da0: quirks=0x2<NO_6_BYTE>
Dec 10 14:42:47 momh167-gjp4-hpelitebook850g2-trueos sshd[93769]: warning: /etc/hosts.allow, line 35: can't verify hostname: getaddrinfo(45.32.158.170.vultr.com, AF_INET) failed
Dec 10 14:42:52 momh167-gjp4-hpelitebook850g2-trueos sshd[93781]: warning: /etc/hosts.allow, line 35: can't verify hostname: getaddrinfo(45.32.158.170.vultr.com, AF_INET) failed
Dec 10 14:43:50 momh167-gjp4-hpelitebook850g2-trueos kernel: ugen0.8: <Verbatim STORE N GO> at usbus0 (disconnected)
Dec 10 14:43:50 momh167-gjp4-hpelitebook850g2-trueos kernel: umass0: at uhub2, port 4, addr 9 (disconnected)
Dec 10 14:43:50 momh167-gjp4-hpelitebook850g2-trueos kernel: da0 at umass-sim0 bus 0 scbus1 target 0 lun 0
Dec 10 14:43:50 momh167-gjp4-hpelitebook850g2-trueos kernel: da0: <Verbatim STORE N GO 5.00> s/n 070B29D2DF235960 detached
Dec 10 14:43:50 momh167-gjp4-hpelitebook850g2-trueos kernel: (da0:umass-sim0:0:0:0): Periph destroyed
Dec 10 14:43:50 momh167-gjp4-hpelitebook850g2-trueos kernel: umass0: detached
$ ls -al /media/
total 18
drwxr-xr-x 2 root wheel 2 10 Dec 14:38 .
drwxr-xr-x 22 root wheel 30 10 Dec 14:38 ..
$
I was able to reproduce this with earlier builds. I am no longer able to reproduce. If it is still an issue let me know, and I will re-open.
:+1:
Whilst I had no opportunity to retest with the same camcorder, over a period of around two weeks I did experiment with (ungraceful) hot unplugging of other devices, in various states, from USB. Not many, only a handful of experiments.
For me the blackout was a one-off.
Reopened. I have encountered this as well recently. I think we can fix with the new mounting system.
Mounttray is being depreciated this week. I have sent in the pull requests for the new devd based automounter to replace it.
HP EliteBook 850 G2 in a dock, with a JVC camcorder at one of the two USB ports on the left of the notebook.
I made two, probably no more, mount tray attempts to mount the FAT32 volume that is offered by the camcorder. Both attempts failed and given other known issues affecting msdosfs, I decided to make no further attempt. With an assumption that mount had not occurred and that disconnection would be safe, I removed the USB plug from the port of the notebook.
A blackout occurred. From
/var/log/messages
here are lines from the time of the incident:The OS seemed unresponsive to a simple press on the power button, eventually I forced off the computer.
messages.txt