Opened 8 years ago

Closed 3 years ago

Last modified 3 years ago

#12847 closed bug (fixed)

Unmounting a busy BFS image results in a continuable KDL (block_cache still has partial slabs)

Reported by: Giova84 Owned by: axeld
Priority: normal Milestone: R1/beta4
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #10061, #14466, #14624
Platform: All

Description

hrev50382 but I notice this behaviour since a long time, maybe is similar to ticket:6683.

Well, on my system I have a secondary BFS disk but this bug doesn't occurs when I unmount this phisical disk, and not even occurs as described in ticket:6683, because in my case this issue occurs just with a different way/disks: I use to backup my data by mounting a VHD file formatted as BFS: I mount this VHD file as:

diskimage register "$VHDFILE"
device=$(diskimage register "$VHDFILE")
disk=$(echo $device | cut -d\" -f2)
cd /
mkdir /HaikuBK
mount $disk /HaikuBK

and after that i saved my data I just unmount this disk by:

unmount /HaikuBK

But immediately after the unmounting, Haiku will drop in a KDL (from which, however, I can exit by the "es" command) and this KDL, luckily, doesn't cause any corruption on such disk.

Attachments (5)

KDL.jpg (140.2 KB ) - added by Giova84 8 years ago.
KDL_stacktrace.jpg (110.0 KB ) - added by Giova84 8 years ago.
unmount-bfs-image-kdl.txt (3.8 KB ) - added by ahwayakchih 6 years ago.
Unmount BFS image KDL
unmount-bfs-image-kdl-hrev53167.txt (3.8 KB ) - added by ahwayakchih 6 years ago.
Another one, from latest hrev
haiku_hrev55865_x64-packagefs-KDL_cocobean.jpg (426.1 KB ) - added by cocobean 3 years ago.
KDL when unmounting packageFS within haikuporter build - Haiku hrev55865 x64

Download all attachments as: .zip

Change History (36)

comment:1 by Giova84, 8 years ago

Update: now, instead, to mount and unmount such disk I simply use the mountvolume cli utility. However this bug still occurs; however today I was able to take a pair of picture from the KDL: pics attached.

by Giova84, 8 years ago

Attachment: KDL.jpg added

by Giova84, 8 years ago

Attachment: KDL_stacktrace.jpg added

comment:2 by Giova84, 8 years ago

Sorry, this ticket seems a dup of ticket:10061

comment:3 by Giova84, 8 years ago

I noticed a thing which is able to avoid this KDL: I will attempt to give a comprehensive description:

As I've said I use this disk to backup my data, and obviously i wait that all data is written to the disk, before to do the unmounting of the disk: well, I noticed that also for some minutes after the copy, the HDD LED on my computer's case, still indicate an HDD activity: but if unmount the disk in this situation, I don't see the classic alert window which told me that the disk is busy (and usually this window offers "force unmount"): well, if I wait until the HDD LED will turn off, I can umount the disk without see the KDL.

comment:4 by axeld, 8 years ago

Component: File Systems/BFSSystem/Kernel

It's indeed a duplicate. However, it since you have provided a bit more info here that might allow reproducing the issue, I'm closing the other ticket instead.

comment:5 by axeld, 8 years ago

Blocking: 10061 added

(In #10061) Duplicate of #12847 which contains more useful information on how to possibly reproduce the issue.

comment:6 by axeld, 8 years ago

Milestone: UnscheduledR1

comment:7 by Giova84, 8 years ago

Since i switched to hrev51089, if before to unmount the disk i run the sync command, such KDL seems that no longer occurs. I'm quite sure That I tried the sync command in past, but still with the described KDL. Please leave this open ticket: I do daily backups and I will give you to a better confirm.

P.S: When i switched to hrev51089 I was no longer able to backup files using rsync (i got a lot of "file has vanished" warnings), but with hrev51094 everything is fine again :-)

in reply to:  3 comment:8 by Giova84, 8 years ago

Replying to Giova84:

I noticed that also for some minutes after the copy, the HDD LED on my computer's case, still indicate an HDD activity: but if unmount the disk in this situation, I don't see the classic alert window which told me that the disk is busy (and usually this window offers "force unmount"): well, if I wait until the HDD LED will turn off, I can umount the disk without see the KDL.

This defenitely works - at least for me - to avoid the KDL. The last night I hit again the KDL after unmounting the disk: I didn't wait some minutes for unmount the disk (the HDD led was showing an activity of the disk). Today, after the backup, i went away for about five minutes and when I back I unmounted the disk without the KDL (the HDD led wasn't active).

In facts when I started to used the sync command I waited some minutes before to unmount the disk.

comment:9 by diver, 7 years ago

Still here in hrev51983.

comment:10 by diver, 6 years ago

Blocking: 14624 added

comment:11 by waddlesplash, 6 years ago

Blocking: 14466 added

comment:12 by waddlesplash, 6 years ago

Summary: Unmount a BFS disk (from a VHD file) will results in a KDLUnmount a BFS disk results in a KDL

comment:13 by waddlesplash, 6 years ago

Milestone: R1R1/beta2

by ahwayakchih, 6 years ago

Attachment: unmount-bfs-image-kdl.txt added

Unmount BFS image KDL

comment:14 by ahwayakchih, 6 years ago

Still happening on Haiku x86_64 at hrev53144 running inside QEMU/KVM (for more info check description in #14466).

Last edited 6 years ago by ahwayakchih (previous) (diff)

by ahwayakchih, 6 years ago

Another one, from latest hrev

comment:15 by diver, 6 years ago

Still here in hrev53200.

comment:16 by luroh, 5 years ago

hrev53269: Possibly gone, or at least harder for me to reproduce since around hrev53241 or so. Diver?

comment:17 by diver, 5 years ago

It doesn't seem to crash but mounting another bfs image in already mounted one creates all sorts of issues.

comment:18 by vidrep, 5 years ago

I just had this crash today, after installing a raw image to a second BFS partition with Installer.

in reply to:  17 comment:19 by diver, 5 years ago

Replying to diver:

It doesn't seem to crash but mounting another bfs image in already mounted one creates all sorts of issues.

Yep, the crash is still here in hrev53496.

comment:20 by pulkomandy, 5 years ago

Summary: Unmount a BFS disk results in a KDLUnmounting a busy BFS image results in a continuable KDL (block_cache still has partial slabs)

comment:21 by pulkomandy, 5 years ago

Had this happen yesterday as well (hrev53632). After it happens the first time, the panic occurs again everytime you unmount a device.

comment:22 by waddlesplash, 5 years ago

Milestone: R1/beta2

Ticket retargeted after milestone closed

comment:23 by waddlesplash, 5 years ago

Milestone: R1/beta3

comment:24 by X512, 4 years ago

I get this after confirming force unmount dialog. hrev54942 x86_64.

comment:25 by X512, 4 years ago

Script to reproduce:

mkdir /HaikuRiscV
mount haiku-minimum.image /HaikuRiscV

(cd /HaikuRiscV/system ; package extract /boot/data/packages/haiku/generated.riscv64/objects/haiku/riscv64/packaging/packages/haiku.hpkg)

unmount /HaikuRiscV
rmdir /HaikuRiscV

Peplace paths if needed.

Last edited 4 years ago by X512 (previous) (diff)

comment:26 by pulkomandy, 3 years ago

Milestone: R1/beta3R1/beta4

Move unsolved issues to beta 4 since there is no chance of fixing them now.

comment:27 by X512, 3 years ago

Can't reproduce bug with comment:25. Maybe fixed in hrev55862.

comment:28 by waddlesplash, 3 years ago

Resolution: fixed
Status: newclosed

Well, if it consistently reproduced before and doesn't now, let's presume so!

comment:29 by cocobean, 3 years ago

Unmounting packageFS crashes on hrev55862 -> hrev55865 x64 for full haikuporter package builds/packaging. Not consistent if you conduct haikuporter non-builds (patch only).

KDL Message: 'Deleted referenceable object that's not on the stack...'

Steps to reproduce:

  1. haikuporter <package>

Expected Results: 'waiting for build package <package> to be deactivated' should complete all build deactivations and unmount successfully.

Last edited 3 years ago by cocobean (previous) (diff)

comment:30 by X512, 3 years ago

This is probably packagefs, not BFS. Can you get full stack trace from KDL?

by cocobean, 3 years ago

KDL when unmounting packageFS within haikuporter build - Haiku hrev55865 x64

comment:31 by waddlesplash, 3 years ago

That is indeed a totally unrelated KDL to this ticket.

Note: See TracTickets for help on using tickets.