Opened 11 years ago

Closed 11 years ago

#2025 closed bug (fixed)

usb_disk + installer causes system instability/KDL

Reported by: netster403 Owned by: mmlr
Priority: normal Milestone: R1
Component: Drivers/USB Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

1) First I setup my flash disk as the following layout: (nice and simple)

Disk /dev/sdb: 513 MB, 513802240 bytes 16 heads, 62 sectors/track, 1011 cylinders Units = cylinders of 992 * 512 = 507904 bytes Disk identifier: 0x8078cf73

Device Boot Start End Blocks Id System

/dev/sdb1 * 1 1011 501425 eb BeOS fs

2) edited VMX to enable usb

3) let the system to boot fully.

4) attach usb drive in vmware

5) Run Drive setup, initialize haiku partition as HaikuDisk, blocksize 2048. Everything ok so far.

6) mount "HaikuDisk"

7) run Haiku installer

8) Installer begins to copy files

9) The first time I tried this I got a kernel panic, i didn't capture a backtrace (me==dumb) The second time I did this the tracker locked up and went off to zombie land.

10) Serial logs show....

bfs: Replay log, disk was not correctly unmounted... bfs: replay block run 0:1:1 in log at 18! bfs: replay block run 0:9:1 in log at 19! bfs: replay block run 0:2065:1 in log at 20! bfs: replay block run 0:2066:1 in log at 21! bfs: replay block run 0:2098:1 in log at 22! bfs: replay block run 0:2099:1 in log at 23! bfs: replay block run 0:2131:1 in log at 24! bfs: replay block run 0:2132:1 in log at 25! bfs: replay block run 0:2164:1 in log at 26! bfs: replay block run 0:2165:1 in log at 27! bfs: replay block run 8:0:1 in log at 28! bfs: replay block run 8:1:1 in log at 29! bfs: mounted "HaikuDisk" (root node at 131072, device = /dev/disk/usb/0/0/0) bfs: bfs_stat_index:1945: No such file or directory SCSI_DSK -- synchronize_cache: usb_disk: sending or receiving of the data failed usb_disk: write fails with 0xffffffff usb_disk: command status wrapper is not valid

See attachments for full serial logs and screenshot.

Thanks! The new USB_disk stack is great though :D

Attachments (8)

haiku-serial-port.txt (47.9 KB) - added by netster403 11 years ago.
serial log
Screenshot-Haiku.png (93.0 KB) - added by netster403 11 years ago.
screenshot
usb device info (2.6 KB) - added by netster403 11 years ago.
USB flash drive info (lsusb -v)
Screenshot-Haiku2.png (111.3 KB) - added by netster403 11 years ago.
after VMWARE suspend..
Screenshot-Haiku3.png (53.7 KB) - added by netster403 11 years ago.
after copy of haiku image to usb flash drive
haiku-serial-port2.txt (54.0 KB) - added by netster403 11 years ago.
deadbeef ftw
HAIKU-KDL-ON-COPY.txt (45.0 KB) - added by netster403 11 years ago.
HAIKU-KDL-ON-COPY.png (84.1 KB) - added by netster403 11 years ago.

Download all attachments as: .zip

Change History (19)

Changed 11 years ago by netster403

Attachment: haiku-serial-port.txt added

serial log

Changed 11 years ago by netster403

Attachment: Screenshot-Haiku.png added

screenshot

Changed 11 years ago by netster403

Attachment: usb device info added

USB flash drive info (lsusb -v)

comment:1 Changed 11 years ago by netster403

almost forgot... Version.24782 VMWARE build

comment:2 Changed 11 years ago by marcusoverhagen

Component: Drivers/DiskDrivers/USB
Owner: changed from marcusoverhagen to mmlr

comment:3 Changed 11 years ago by koki

Cc: koki added

comment:4 Changed 11 years ago by mmlr

Status: newassigned

The log indicates that the BFS was not cleanly unmounted. With the recent changes, is it possible that the volume got corrupted? It would be most helpful if you could initialize the volume again so it is clean and then try to reproduce the KDL again.

comment:5 Changed 11 years ago by netster403

ok...

Formatted flash disk

Ran installer, same thing happened at end of install (tracker freaked out)

I suspended vmware and restarted it.. kernel panic right off the bat. (see Screenshot-Haiku2.png)

rebooted vmware.

tried to mount flash drive after crash, bad filesystem.

Formatted flash drive in haiku as befs

Mounted flash drive

Tried to copy all files from Haiku disk image onto empty flash disk and got KDL at end of copy process... see Screenshot-Haiku3.png and haiku-serial-port2.txt

Changed 11 years ago by netster403

Attachment: Screenshot-Haiku2.png added

after VMWARE suspend..

Changed 11 years ago by netster403

Attachment: Screenshot-Haiku3.png added

after copy of haiku image to usb flash drive

Changed 11 years ago by netster403

Attachment: haiku-serial-port2.txt added

deadbeef ftw

comment:6 Changed 11 years ago by netster403

it seems anytime a flash disk is formatted and then mounted I get the unclean mount message. I wonder if I format the flash disk in haiku, reboot, then try and mount it? Also I noticed once that when I renamed the filesystem when I formatted it the "mount" menu on the desktop kept the same volume name and did not update to the new one.

comment:7 Changed 11 years ago by mmlr

You don't by any chance have the serial log of the first KDL? The one with "could not write back block x"? Because that's the one that really interests me as this should show if the usb_disk driver somehow failed and returned errors. Generally initializing a partition under Haiku is at least fragile right now especially in combination with falsh media. That the name was not updated indicates that the partition was not actually rescanned - which is currently also the case when un- and replugging flash media. This easily leads into a KDL. You could try to initialize and then reboot, but the best thing would be if you could initialize from a BeOS installation. Anyway the serial log does not really look good as it contains a really long list of log replays. This could easily be related to the recent block cache issues.

comment:8 Changed 11 years ago by netster403

Summary: usb_disk + installer causes system instability.usb_disk + installer causes system instability/KDL

HA! I got it to KDL while writing again this morning!

here are my steps...

erased first half of flash disk in linux:

alex@eris:~/haikuos$ dd if=/dev/zero of=/dev/sdb bs=512 218217+0 records in 218217+0 records out 111727104 bytes (112 MB) copied, 65.0182 s, 1.7 MB/s

Repartitioned...

Disk /dev/sdb: 513 MB, 513802240 bytes 16 heads, 62 sectors/track, 1011 cylinders Units = cylinders of 992 * 512 = 507904 bytes Disk identifier: 0xb3014c39

Device Boot Start End Blocks Id System

/dev/sdb1 * 1 1011 501425 eb BeOS fs

booted haiku

formated flash disk (default settings, named HaikuDisk)

mounted flash disk

ran installer, halfway through it KDL'ed

Attaching HAIKU-KDL-ON-COPY.png and HAIKU-KDL-ON-COPY.txt

Changed 11 years ago by netster403

Attachment: HAIKU-KDL-ON-COPY.txt added

Changed 11 years ago by netster403

Attachment: HAIKU-KDL-ON-COPY.png added

comment:9 Changed 11 years ago by netster403

also it should be noted that I left the HaikuDisk tracker window open this time. Maybe the cause?

comment:10 Changed 11 years ago by mmlr

From the serial log I take it you are running hrev24782. Those revisions have serious issues with the block cache (see bug #2008) which most probably cause these KDLs. You should update to a current revision that has those issues fixed first and then try that again. The KDL and serial log at least do not indicate an actual problem with usb_disk.

comment:11 Changed 11 years ago by mmlr

Resolution: fixed
Status: assignedclosed

Closing this as it was probably caused by #2008 and not usb_disk. Please reopen if necessary.

Note: See TracTickets for help on using tickets.