Bug 236452 - [ext2fs] panic: mutex EXT2FS not owned at ../../../kern/kern_mutex.c:281, vmcore.23
Summary: [ext2fs] panic: mutex EXT2FS not owned at ../../../kern/kern_mutex.c:281, vmc...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-fs mailing list
URL:
Keywords: panic, stress2
Depends on:
Blocks:
 
Reported: 2019-03-10 13:59 UTC by Peter Holm
Modified: 2019-03-15 15:03 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Holm freebsd_committer 2019-03-10 13:59:39 UTC
20190306 15:27:47 all (309/617): crossmp10.sh
panic: mutex EXT2FS not owned at ../../../kern/kern_mutex.c:281
cpuid = 9
time = 1551882471
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00bfb3f480
vpanic() at vpanic+0x1b4/frame 0xfffffe00bfb3f4e0
panic() at panic+0x43/frame 0xfffffe00bfb3f540
__mtx_unlock_flags() at __mtx_unlock_flags+0x13a/frame 0xfffffe00bfb3f570
ext2_valloc() at ext2_valloc+0x530/frame 0xfffffe00bfb3f620
ext2_makeinode() at ext2_makeinode+0x56/frame 0xfffffe00bfb3f680
ext2_create() at ext2_create+0x2d/frame 0xfffffe00bfb3f6a0
VOP_CREATE_APV() at VOP_CREATE_APV+0x86/frame 0xfffffe00bfb3f6d0
vn_open_cred() at vn_open_cred+0x2c3/frame 0xfffffe00bfb3f820
kern_openat() at kern_openat+0x1fd/frame 0xfffffe00bfb3f990
amd64_syscall() at amd64_syscall+0x291/frame 0xfffffe00bfb3fab0
fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe00bfb3fab0

Details @ https://people.freebsd.org/~pho/stress/log/crossmp10-2.txt
Seems to be introduced by r344752.
Comment 1 Pedro F. Giffuni freebsd_committer 2019-03-12 03:35:45 UTC
Hi Peter;

Any chance of bisecting this? If we can pinpoint the specific change that needs reverting it would really help.

- r344753 and r344754 added some locks which were not there before so they look as good suspects.
Comment 2 Fedor Uporov freebsd_committer 2019-03-12 07:41:09 UTC
Hi, Pedro.

I am started to work on it.
And keeping the communication with Peter.
As, I can see now, the problem is in the r344756.
We can revert it, but we will get back to admbugs issues, so I am working on understanding the issue and finding correct fix.
Comment 3 commit-hook freebsd_committer 2019-03-15 11:50:37 UTC
A commit references this bug:

Author: fsu
Date: Fri Mar 15 11:49:46 UTC 2019
New revision: 345179
URL: https://svnweb.freebsd.org/changeset/base/345179

Log:
  Remove unneeded mount point unlock function calls.

  The ext2_nodealloccg() function unlocks the mount point
  in case of successful node allocation.
  The additional unlocks are not required and should be removed.

  PR:		236452
  Reported by:	pho
  MFC after:	3 days

Changes:
  head/sys/fs/ext2fs/ext2_alloc.c