[Bug 262897] [ufs] [panic] Crash during chflags operation

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 28 Mar 2022 20:19:24 UTC

            Bug ID: 262897
           Summary: [ufs] [panic] Crash during chflags operation
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: chris@cretaforce.gr

FreeBSD 13.0-RELEASE-p6

The panic happened during a "chflags -R nosimmutable /home/username/dir"

I have 150+ servers with exactly the same setup and almost the same hardware
and it's the first time I see such panic.

I don't know if it was hardware related (this server runs fine after after a
fsck for few days).

Also I have no way to reproduce the crash.

Core dump is available.


kgdb /boot/kernel/kernel vmcore.0
GNU gdb (GDB) 11.2 [GDB v11.2 for FreeBSD]
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd13.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /boot/kernel/kernel...
Reading symbols from /usr/lib/debug//boot/kernel/kernel.debug...

Unread portion of the kernel message buffer:

Fatal trap 9: general protection fault while in kernel mode
cpuid = 2; apic id = 02
instruction pointer     = 0x20:0xffffffff80f11999
stack pointer           = 0x28:0xfffffe0197890720
frame pointer           = 0x28:0xfffffe0197890740
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 61025 (chflags)
trap number             = 9
panic: general protection fault
cpuid = 2
time = 1648258800
KDB: stack backtrace:
#0 0xffffffff80c57525 at kdb_backtrace+0x65
#1 0xffffffff80c09f01 at vpanic+0x181
#2 0xffffffff80c09d73 at panic+0x43
#3 0xffffffff8108b1b7 at trap_fatal+0x387
#4 0xffffffff8108a67e at trap+0x8e
#5 0xffffffff81061b18 at calltrap+0x8
#6 0xffffffff80f126da at ufs_stat+0x8a
#7 0xffffffff80cf412b at kern_statat+0x11b
#8 0xffffffff80cf47bf at sys_fstatat+0x2f
#9 0xffffffff8108babc at amd64_syscall+0x10c
#10 0xffffffff8106243e at fast_syscall_common+0xf8
Uptime: 72d2h51m24s
Dumping 4040 out of 65280 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%

__curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
warning: Source file is more recent than executable.
55              __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct
(kgdb) backtrace
#0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
#1  doadump (textdump=<optimized out>) at /usr/src/sys/kern/kern_shutdown.c:399
#2  0xffffffff80c09af6 in kern_reboot (howto=260) at
#3  0xffffffff80c09f70 in vpanic (fmt=<optimized out>, ap=<optimized out>) at
#4  0xffffffff80c09d73 in panic (fmt=<unavailable>) at
#5  0xffffffff8108b1b7 in trap_fatal (frame=0xfffffe0197890660, eva=0) at
#6  0xffffffff8108a67e in trap (frame=0xfffffe0197890660) at
#7  <signal handler called>
#8  0xffffffff80f11999 in ufs_itimes_locked (vp=vp@entry=0xfffff80da1c00d58) at
#9  0xffffffff80f126da in ufs_stat (ap=0xfffffe0197890870) at
#10 0xffffffff80cf412b in VOP_STAT (vp=<optimized out>, sb=0xfffffe01978908d8,
active_cred=<optimized out>, file_cred=0x0, td=0xfffffe0198557500) at
#11 kern_statat (td=0xfffffe0198557500, flag=<optimized out>, fd=<optimized
out>, path=<optimized out>, pathseg=pathseg@entry=UIO_USERSPACE,
sbp=sbp@entry=0xfffffe01978908d8, hook=0x0) at
#12 0xffffffff80cf47bf in sys_fstatat (td=0xfffff80120070aa0,
uap=0xfffffe01985578e8) at /usr/src/sys/kern/vfs_syscalls.c:2377
#13 0xffffffff8108babc in syscallenter (td=0xfffffe0198557500) at
#14 amd64_syscall (td=0xfffffe0198557500, traced=0) at
#15 <signal handler called>
#16 0x00000008003812ba in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffffffe7b8

You are receiving this mail because:
You are the assignee for the bug.