[DragonFlyBSD - Bug #3348] (New) Panic when trying to mount_hammer2 a file

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Thu Mar 30 13:41:10 PDT 2023

Issue #3348 has been reported by zabolekar.

Bug #3348: Panic when trying to mount_hammer2 a file

* Author: zabolekar
* Status: New
* Priority: Normal
* Target version: 6.4
* Start date: 2023-03-30
Dragonfly 6.4.0.

Observed behavior: when I create a HAMMER2 file system on a regular file and try to mount it, I get a panic.
Expected behavior: Maybe the program should exit with an error message? I suspect I'm not supposed to do this kind of thing: the man page of mount_hammer2 says the file should be _special_.

To reproduce, as root:

<pre><code class="shell">
truncate -s 1G hammer2.img
newfs_hammer2 hammer2.img
mkdir mnt
mount_hammer2 ~/hammer2.img mnt

This is the output after the last command:

hammer2_mount: devstr="/root/hammer2.img at DATA"
hammer2_mount: device="/root/hammer2.img" label="DATA" rdonly=0
panic: assertion "strncmp(path, "/dev/", 5) == 0" failed in hammer2_init_devvp a
t /usr/src/sys/vfs/hammer2/hammer2_ondisk.c:197
cpuid = 0
Trace beginning at frame 0xfffff800a9bbac18                                     
hammer2_init_devvp() at hammer2_init_devvp+0x48b 0xffffffff8098589b             
hammer2_init_devvp() at hammer2_init_devvp+0x48b 0xffffffff8098589b             
hammer2_vfs_mount() at hammer2_vfs_mount+0x379 0xffffffff8096a4d9
sys_mount() at sys_mount+0x33b 0xffffffff80702d7b
syscall2() at syscall2+0x11e 0xffffffff80bdc0ae

CPU0 stopping CPUs: 0x00000000
Stopped at      Debugger+0x7c:  movb    $0,0xbcbd09(%rip)

You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

More information about the Bugs mailing list