[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #24 from dmilith  ---
After Kristof's revert, issue is fixed and this thread can be closed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-27 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

Eugene Grosbein  changed:

   What|Removed |Added

 CC||eu...@freebsd.org

--- Comment #23 from Eugene Grosbein  ---
(In reply to dmilith from comment #22)

HBSD is not same as FreeBSD. HBSD has significant differences.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-26 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #22 from dmilith  ---
(In reply to Kristof Provost from comment #21)
Not avoiding or hiding anything. It's exactly same operating system, synced
every 6 hours… (not to mention HBSD patches don't touch anything related to
if_bridge).

Also I have both INVARIANTS and INVARIANT_SUPPORT options enabled in my kernel
configuration.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-26 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #21 from Kristof Provost  ---
(In reply to dmilith from comment #20)
That's a different operating system...

Don't try to hide that during a bug submission please. It'll always come out in
the end, and you're just wasting both of our time.

This almost certainly also affects base FreeBSD, but *DO NOT HIDE RELEVANT
INFORMATION IN BUG REPORTS*. You're just making the people who want to fix
these bugs angry, and that's not the right state of mind to fix bug. Or be
helpful.

The issue here is that the bridge code tries to set the physical interface in
promiscuous mode, which sleeps in the em code. The stable/12 epoch code doesn't
allow sleeps during epoch sections (head does), which triggers this panic.
(Which we wouldn't see on a default FreeBSD stable/12, because that requires
INVARIANTS iirc)

I'll see if that can be fixed, but I may end up just reverting the epoch code
in stable/12.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-26 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #20 from dmilith  ---
(In reply to Kristof Provost from comment #19)

https://gist.github.com/dmilith/f6454244f273accf6905f6cba812b3b5

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-26 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #19 from Kristof Provost  ---
(In reply to dmilith from comment #17)
**FULL** dmesg, please. You're cutting off part of the panic message, making
this harder than it needs to be.

There may be more things in there that are useful. Please, pretty please stop
trying to pre-filter this information. It doesn't help.

Also, an SVN revision number (or git hash, whatever), not a timestamp please.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-26 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #18 from dmilith  ---
(In reply to Kristof Provost from comment #16)
revision - last available from 16:30 CEST,
branch - stable/12
src.conf - https://github.com/VerKnowSys/svdOS/blob/master/etc/src.conf
make.conf - https://github.com/VerKnowSys/svdOS/blob/master/etc/make.conf
no custom patches

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-26 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #17 from dmilith  ---
(In reply to Kristof Provost from comment #16)

I did rebuild again, full command that caused KP:

ifconfig bridge0 create; ifconfig tap0 create; ifconfig tap1 create; ifconfig
bridge0 addm tap0 up; ifconfig bridge0 addm tap1 up; ifconfig bridge0 addm em0
up

NOTE: em0 is my main network card, virtualized under vmware fusion 7.1.3 pro

It's production build, so dmesg log is limited:

[44] KDB: stack backtrace:
[44] #0 0x8098a9d5 at kdb_backtrace+0x65
[44] #1 0x80947790 at vpanic+0x180
[44] #2 0x809475a3 at panic+0x43
[44] #3 0x80951fdd at _sleep+0x3dd
[44] #4 0x80952331 at pause_sbt+0xf1
[44] #5 0x804fa177 at e1000_reset_hw_82540+0x177
[44] #6 0x804f114b at em_if_stop+0x1b
[44] #7 0x80a43a71 at iflib_stop+0xc1
[44] #8 0x80a50d6c at iflib_if_ioctl+0x39c
[44] #9 0x82f2c5c5 at bridge_mutecaps+0x145
[44] #10 0x82f28467 at bridge_ioctl_add+0x467
[44] #11 0x82f2a37b at bridge_ioctl+0x32b
[44] #12 0x80a35ce1 at ifioctl+0x701
[44] #13 0x809a9895 at kern_ioctl+0x2d5
[44] #14 0x809a9517 at sys_ioctl+0x127
[44] #15 0x80d71b84 at amd64_syscall+0x2a4
[44] #16 0x80d4b1ae at fast_syscall_common+0xf8
[44] Uptime: 44s

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-26 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #16 from Kristof Provost  ---
(In reply to dmilith from comment #15)
I cannot reproduce that with either scenario.

Please attach full dmesg output, any content of /etc/src.conf or make.conf, any
local patches, content of /etc/sysctl.conf and the exact revision you're
building from.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-25 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #15 from dmilith  ---
I built last stable/12 again, and issue is there after both cases:

ifconfig bridge0 create
ifconfig bridge0 addm em0 up
ifconfig bridge0 destroy

but I've found it also with:

ifconfig bridge0 create
ifconfig vlan0 create
ifconfig bridge0 addm em0 up
ifconfig bridge0 addm vlan0 up

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #14 from commit-h...@freebsd.org ---
A commit references this bug:

Author: kp
Date: Fri Jul 24 20:10:28 UTC 2020
New revision: 363492
URL: https://svnweb.freebsd.org/changeset/base/363492

Log:
  bridge: Enter epoch for bridge_transmit()

  Just like the change done for bridge_input()/bridge_output() in r363430
  we must enter epoch ourselves, because its coverage is not as wide as in
  head.

  This is a direct commit to stable/12.

  PR:   248046

Changes:
  stable/12/sys/net/if_bridge.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #13 from commit-h...@freebsd.org ---
A commit references this bug:

Author: kp
Date: Fri Jul 24 20:09:52 UTC 2020
New revision: 363491
URL: https://svnweb.freebsd.org/changeset/base/363491

Log:
  bridge: Fix mismerges from r360345

  In r362650 we merged r360345. This required manual changes due to the
  differences in EPOCH macros between head and stable/12, and was done
  imperfectly.

  This is a direct commit to stable/12.

  PR:   248046

Changes:
  stable/12/sys/net/if_bridge.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #12 from Kristof Provost  ---
(In reply to dmilith from comment #11)
Right, so the backtrace in #10 is bogus, but I can reproduce the problem at
least.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #11 from dmilith  ---
Panic String: Assertion in_epoch(net_epoch_preempt) failed at
/usr/src/sys/net/if_bridge.c:3744

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-24 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #10 from dmilith  ---
Bug is still here. Not with ifconfig bridge0 create but on destroy.

Steps to reproduce:

ifconfig bridge0 create
ifconfig bridge0 addm em0 up
ifconfig bridge0 destroy

KP:

[33] KDB: stack backtrace:
[33] #0 0x80b975db at kdb_backtrace+0x6b
[33] #1 0x80b512b0 at vpanic+0x180
[33] #2 0x80b510b3 at panic+0x43
[33] #3 0x80b2dc84 at malloc_dbg+0xd4
[33] #4 0x80b2da21 at malloc+0x21
[33] #5 0x83134b79 at bridge_ioctl_gifs+0xb9
[33] #6 0x83136476 at bridge_ioctl+0x336
[33] #7 0x80c44c03 at ifioctl+0x763
[33] #8 0x80bb6b71 at kern_ioctl+0x301
[33] #9 0x80bb67c7 at sys_ioctl+0x127
[33] #10 0x810181a6 at amd64_syscall+0x2b6
[33] #11 0x80fefcd0 at fast_syscall_common+0x101

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-23 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

Mark Johnston  changed:

   What|Removed |Added

  Flags|mfc-stable12?   |mfc-stable12+
   Assignee|n...@freebsd.org |k...@freebsd.org
 CC||ma...@freebsd.org
 Resolution|--- |FIXED
 Status|Open|Closed

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #9 from commit-h...@freebsd.org ---
A commit references this bug:

Author: kp
Date: Wed Jul 22 20:13:13 UTC 2020
New revision: 363430
URL: https://svnweb.freebsd.org/changeset/base/363430

Log:
  bridge: Enter epoch for bridge_input()/bridge_output()

  In stable/12 epoch is not as wide as it is in head. The network stack isn't
yet
  in epoch when bridge_input()/bridge_output() get called, so rather than
assert
  this we must enter it ourselves.

  This is a direct commit to stable/12.

  PR:   248046
  Differential Revision:https://reviews.freebsd.org/D25715

Changes:
  stable/12/sys/net/if_bridge.c

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-22 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #8 from commit-h...@freebsd.org ---
A commit references this bug:

Author: kp
Date: Wed Jul 22 19:43:56 UTC 2020
New revision: 363429
URL: https://svnweb.freebsd.org/changeset/base/363429

Log:
  MFC r363308:

  bridge: Don't sleep during epoch

  While it doesn't trigger INVARIANTS or WITNESS on head it does in stable/12.
  There's also no reason for it, as we can easily report the out of memory
error
  to the caller (i.e. userspace). All of these can already fail.

  PR:   248046

Changes:
_U  stable/12/
  stable/12/sys/net/if_bridge.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #7 from dmilith  ---
(In reply to Kristof Provost from comment #6)
I confirm that patch fixes KP with my build. Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #6 from Kristof Provost  ---
(In reply to Ryan Moeller from comment #4)
Thanks. I can reproduce that. It looks like the code to widen epoch didn't make
it into stable/12, so we need to enter epoch on bridge_input()/bridge_output()
ourselves.

See https://reviews.freebsd.org/D25715

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

--- Comment #5 from commit-h...@freebsd.org ---
A commit references this bug:

Author: kp
Date: Sat Jul 18 12:43:11 UTC 2020
New revision: 363308
URL: https://svnweb.freebsd.org/changeset/base/363308

Log:
  bridge: Don't sleep during epoch

  While it doesn't trigger INVARIANTS or WITNESS on head it does in stable/12.
  There's also no reason for it, as we can easily report the out of memory
error
  to the caller (i.e. userspace). All of these can already fail.

  PR:   248046
  MFC after:3 days

Changes:
  head/sys/net/if_bridge.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


[Bug 248046] if_bridge(4): Panic when creating an interface: malloc(M_WAITOK) in epoch context

2020-07-17 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248046

Kubilay Kocak  changed:

   What|Removed |Added

 Status|New |Open
  Flags||mfc-stable12?
Summary|Panic when creating a   |if_bridge(4): Panic when
   |bridge interface|creating an interface:
   ||malloc(M_WAITOK) in epoch
   ||context
   Keywords|panic   |crash, needs-patch,
   ||needs-qa
 CC||n...@freebsd.org

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"