Bug 164696 - [netinet] [patch] [panic] VIMAGE + carp panics the kernel
Summary: [netinet] [patch] [panic] VIMAGE + carp panics the kernel
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: Craig Rodrigues
URL:
Keywords:
: 147950 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-01 22:50 UTC by nvass
Modified: 2015-01-06 07:52 UTC (History)
2 users (show)

See Also:


Attachments
file.diff (1.50 KB, patch)
2012-02-01 22:50 UTC, nvass
no flags Details | Diff
164696.diff (1.12 KB, patch)
2012-02-06 11:47 UTC, Gleb Smirnoff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nvass 2012-02-01 22:50:07 UTC
Trying to use a carp interface in a VIMAGE enabled kernel, panics the kernel.

#4  0xc051ce3d in db_trap (type=12, code=0) at /usr/src/sys/ddb/db_main.c:229
#5  0xc0a99226 in kdb_trap (type=12, code=0, tf=0xc49a3b18)
    at /usr/src/sys/kern/subr_kdb.c:629
#6  0xc0e1a30f in trap_fatal (frame=0xc49a3b18, eva=24)
    at /usr/src/sys/i386/i386/trap.c:966
#7  0xc0e1ada3 in trap (frame=0xc49a3b18) at /usr/src/sys/i386/i386/trap.c:352
#8  0xc0e03b0c in calltrap () at /usr/src/sys/i386/i386/exception.s:168
#9  0xc7abefd0 in carp_send_ad_locked (sc=0xc500a600)
    at /usr/src/sys/modules/carp/../../netinet/ip_carp.c:777
#10 0xc7abf984 in carp_master_down_locked (sc=0xc500a600)
    at /usr/src/sys/modules/carp/../../netinet/ip_carp.c:1119
#11 0xc7abfc4f in carp_master_down (v=0xc500a600)
    at /usr/src/sys/modules/carp/../../netinet/ip_carp.c:1104
#12 0xc0a78aa2 in softclock (arg=0xc119e5c0)
    at /usr/src/sys/kern/kern_timeout.c:571
#13 0xc0a382f5 in intr_event_execute_handlers (p=0xc4deb588, ie=0xc4e2d280)
    at /usr/src/sys/kern/kern_intr.c:1257

Fix: The attached patch fixes the panic. It doesn't virtualize carp(4), that is, only carp instances in vnet0 work.

Patch attached with submission follows:
How-To-Repeat: Build a VIMAGE kernel.
Create and 'up' a carp address.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-02-01 23:59:08 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Over to maintainer(s).
Comment 2 Gleb Smirnoff freebsd_committer freebsd_triage 2012-02-06 11:47:41 UTC
  Hi, Nikos!

On Wed, Feb 01, 2012 at 10:40:35PM +0000, Nikos Vassiliadis wrote:
N> >Description:
N> Trying to use a carp interface in a VIMAGE enabled kernel, panics the kernel.

Can you please test another patch, that is attached?

-- 
Totus tuus, Glebius.
Comment 3 nvass 2012-02-07 08:46:57 UTC
On 2/6/2012 1:47 PM, Gleb Smirnoff wrote:
>    Hi, Nikos!
>
> On Wed, Feb 01, 2012 at 10:40:35PM +0000, Nikos Vassiliadis wrote:
> N>  >Description:
> N>  Trying to use a carp interface in a VIMAGE enabled kernel, panics the kernel.
>
> Can you please test another patch, that is attached?
>

Yes, it works. Please, commit it.

Thanks!
Comment 4 Gleb Smirnoff freebsd_committer freebsd_triage 2012-02-08 13:38:23 UTC
State Changed
From-To: open->closed
Comment 5 Gleb Smirnoff freebsd_committer freebsd_triage 2012-02-08 13:38:23 UTC
Responsible Changed
From-To: freebsd-net->glebius

Fixed.
Comment 6 Craig Rodrigues freebsd_committer freebsd_triage 2014-12-08 17:15:42 UTC
Needs merge to stable/9
Comment 7 Craig Rodrigues freebsd_committer freebsd_triage 2014-12-08 17:16:24 UTC
*** Bug 147950 has been marked as a duplicate of this bug. ***
Comment 8 Craig Rodrigues freebsd_committer freebsd_triage 2015-01-06 07:52:46 UTC
Fixed in FreeBSD 10 by:

------------------------------------------------------------------------
r231201 | glebius | 2012-02-08 05:39:38 -0800 (Wed, 08 Feb 2012) | 4 lines

Set vnet context in callouts and taskqueues.

PR:             164696

------------------------------------------------------------------------