Bug 216171 - [ipfw] [panic] stable/11: repeating KASSERT("rm_rlock: recursed on non-recursive rmlock") crash
Summary: [ipfw] [panic] stable/11: repeating KASSERT("rm_rlock: recursed on non-recurs...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Andrey V. Elsukov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-17 10:08 UTC by Eugene Grosbein
Modified: 2020-07-03 13:26 UTC (History)
2 users (show)

See Also:


Attachments
kgdb script (8.40 KB, text/plain)
2017-01-17 10:08 UTC, Eugene Grosbein
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Grosbein 2017-01-17 10:08:31 UTC
Created attachment 178985 [details]
kgdb script

One of my uniprocessor systems (11.0-STABLE/i386 r307472) having debugging kernel repeatedly panices with same backtrace generating crashdumps:

total 1248464
-rw-r--r--  1 root  wheel          2 Jan 17 04:25 bounds
-rw-------  1 root  wheel        538 Jan 12 03:07 info.0
-rw-------  1 root  wheel        537 Jan 12 05:01 info.1
-rw-------  1 root  wheel        538 Jan 12 10:53 info.2
-rw-------  1 root  wheel        539 Jan 13 19:22 info.3
-rw-------  1 root  wheel        539 Jan 14 11:54 info.4
-rw-------  1 root  wheel        539 Jan 15 13:28 info.5
-rw-------  1 root  wheel        539 Jan 16 11:46 info.6
-rw-------  1 root  wheel        538 Jan 16 20:16 info.7
-rw-------  1 root  wheel        538 Jan 17 04:25 info.8
-rw-------  1 root  wheel        536 Jan 11 16:48 info.9
lrwxr-xr-x  1 root  wheel          6 Jan 17 04:25 info.last -> info.8
-rw-r--r--  1 root  wheel          5 Oct  3  2012 minfree
-rw-------  1 root  wheel  165212160 Jan 12 03:07 vmcore.0
-rw-------  1 root  wheel   94773248 Jan 12 05:01 vmcore.1
-rw-------  1 root  wheel   94265344 Jan 12 10:54 vmcore.2
-rw-------  1 root  wheel  160993280 Jan 13 19:22 vmcore.3
-rw-------  1 root  wheel  150310912 Jan 14 11:54 vmcore.4
-rw-------  1 root  wheel  150302720 Jan 15 13:28 vmcore.5
-rw-------  1 root  wheel  160186368 Jan 16 11:46 vmcore.6
-rw-------  1 root  wheel   94715904 Jan 16 20:16 vmcore.7
-rw-------  1 root  wheel  160612352 Jan 17 04:25 vmcore.8
-rw-------  1 root  wheel   94748672 Jan 11 16:48 vmcore.9
lrwxr-xr-x  1 root  wheel          8 Jan 17 04:25 vmcore.last -> vmcore.8

List of ipfw rules:

# ipfw show
00100     0       0 allow ip from any to any via lo0
00200     0       0 deny ip from any to 127.0.0.0/8
00300     0       0 deny ip from 127.0.0.0/8 to any
01010     0       0 allow tcp from 62.231.161.0/24{66,72,80} to me dst-port 23,3001-3006 in
01020     0       0 allow tcp from 62.231.161.216/29,62.231.161.232/29 to me dst-port 23,3001-3006 in
01020     0       0 unreach port udp from not 62.231.160.18 to me dst-port 1812,1813,21645-21844 in
01030     0       0 allow tcp from 62.231.161.71 to me dst-port 23,3001-3006 in
01090   489   20408 reset tcp from any to me dst-port 23,3001-3006 in
65000 11822 2211829 allow ip from any to any
65535     0       0 deny ip from any to any

kgdb script is attached.
Compressed kernel.debug, crashinfo and vmcore are available here: http://www.grosbein.net/freebsd/crash/20170117/
Comment 1 commit-hook freebsd_committer 2017-01-17 10:50:51 UTC
A commit references this bug:

Author: ae
Date: Tue Jan 17 10:50:28 UTC 2017
New revision: 312341
URL: https://svnweb.freebsd.org/changeset/base/312341

Log:
  Initialize IPFW static rules rmlock with RM_RECURSE flag.

  This lock was replaced from rwlock in r272840. But unlike rwlock, rmlock
  doesn't allow recursion on rm_rlock(), so at this time fix this with
  RM_RECURSE flag. Later we need to change ipfw to avoid such recursions.

  PR:		216171
  Reported by:	Eugene Grosbein
  MFC after:	1 week

Changes:
  head/sys/netpfil/ipfw/ip_fw_private.h
Comment 2 Andrey V. Elsukov freebsd_committer 2017-01-17 11:05:31 UTC
Gleb, what you think, is it a candidate for errata?
Comment 3 Eugene Grosbein 2017-01-17 11:22:06 UTC
(In reply to commit-hook from comment #1)

Thanks, this fix really solves the problem.
Comment 4 commit-hook freebsd_committer 2017-01-24 00:38:53 UTC
A commit references this bug:

Author: ae
Date: Tue Jan 24 00:38:35 UTC 2017
New revision: 312677
URL: https://svnweb.freebsd.org/changeset/base/312677

Log:
  MFC r312341:
    Initialize IPFW static rules rmlock with RM_RECURSE flag.

    This lock was replaced from rwlock in r272840. But unlike rwlock, rmlock
    doesn't allow recursion on rm_rlock(), so at this time fix this with
    RM_RECURSE flag. Later we need to change ipfw to avoid such recursions.

    PR:		216171

Changes:
_U  stable/11/
  stable/11/sys/netpfil/ipfw/ip_fw_private.h