From nobody@FreeBSD.org  Tue Oct  9 11:32:54 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 469196BD
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  9 Oct 2012 11:32:54 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 2EB9D8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  9 Oct 2012 11:32:54 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q99BWrgN074674
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 9 Oct 2012 11:32:53 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q99BWrw3074672;
	Tue, 9 Oct 2012 11:32:53 GMT
	(envelope-from nobody)
Message-Id: <201210091132.q99BWrw3074672@red.freebsd.org>
Date: Tue, 9 Oct 2012 11:32:53 GMT
From: Alexander <nr1c0re@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: kldload+kldunload if_carp makes kldstat not working
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         172535
>Category:       kern
>Synopsis:       [modules] kldload+kldunload if_carp makes kldstat not working in 8.3
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 09 22:30:17 UTC 2012
>Closed-Date:    Wed Apr 16 02:17:03 UTC 2014
>Last-Modified:  Wed Apr 16 02:17:03 UTC 2014
>Originator:     Alexander
>Release:        8.3-RELEASE-p3
>Organization:
Home
>Environment:
FreeBSD testsrv.domain.com 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #0: Tue Jun 12 00:39:29 UTC 2012     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I've made a fresh install of freebsd 8.3 in vmware environment, updated to p3 via freebsd-update and wanted to test if_carp module.
I've loaded if_carp module, created carp0 device, destroyed carp0 device, tryed to unload if_carp module and it failed with "kldunload: can't unload file: Device busy". After that kldload/kldunload/kldstat commands freezes, not working, and not returning command prompt. Server is working fine, I can open new ssh connection to that server. Logs and dmesg are clean, nothing happened there.


>How-To-Repeat:
Step by step:

loading module
testsrv# kldload if_carp

just checking for selfmade carp interfaces (none made, good)
testsrv# ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:50:56:b7:28:73
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.10.0.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>

checking, that module loaded
testsrv# kldstat
Id Refs Address            Size     Name
 1    3 0xffffffff80100000 e56e68   kernel
 2    1 0xffffffff81012000 4d26     if_carp.ko

creating carp0 interface
testsrv# ifconfig carp0 create

checking, that it was created
testsrv# ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:50:56:b7:28:73
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.10.0.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
carp0: flags=8<LOOPBACK> metric 0 mtu 1500

destroying carp0 interface
testsrv# ifconfig carp0 destroy

checking, that it dissapeared
testsrv# ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:50:56:b7:28:73
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.10.0.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>

checking again about if_carp module
testsrv# kldstat
Id Refs Address            Size     Name
 1    3 0xffffffff80100000 e56e68   kernel
 2    1 0xffffffff81012000 4d26     if_carp.ko

deleting moddule
testsrv# kldunload if_carp
kldunload: can't unload file: Device busy


here we see 1st problem - module does not unloaded

checking it
testsrv# kldstat
Id Refs Address            Size     Name


and it gets stuck here forever.
>Fix:
Not fix found.

>Release-Note:
>Audit-Trail:

From: c0re <nr1c0re@gmail.com>
To: bug-followup@FreeBSD.org, - - <nr1c0re@gmail.com>
Cc:  
Subject: Re: kern/172535: [modules] kldload+kldunload if_carp makes kldstat
 not working
Date: Wed, 5 Mar 2014 16:03:57 +0400

 --001a11c1f542bd063504f3dad0be
 Content-Type: text/plain; charset=ISO-8859-1
 
 With new CARP in 10.0-RELEASE problem disappeared.
 
 --001a11c1f542bd063504f3dad0be--
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Wed Apr 16 02:16:18 UTC 2014 
State-Changed-Why:  
apparently fixed in 10.0. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172535 
>Unformatted:
