Subject: kern/28803: LKM loads twice and loading blocks the system for a while
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <kessi@teles.de>
List: netbsd-bugs
Date: 12/29/2004 12:06:00
>Number:         28803
>Category:       kern
>Synopsis:       LKM loads twice and loading blocks the system for a while
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 29 12:06:00 +0000 2004
>Originator:     Jens Kessmeier
>Release:        2.0
>Organization:
TELES AG
>Environment:
NetBSD iswitch2.treles.de: 2.0 NetBSD 2.0 (ISWITCH) #4: Thu Dec 23 18:18:18 2004 admin@COMPILE:/usr2/isdn/NetBSD-2.0/usr/src/sys/arch/i386/compile/ISWITCH i386
>Description:
First time loading off a LKM with modload -sA ./tlstrc.lnk ./tlstrc.o
works fine. On the second time i see a lot of kernel messages like
"/lkmtemp/: symbol 'xxxx' redeclared with different value (hexval != hexval)" and modload fails with error initializing module: File exists.
On the third modload succeeds! If you repeat it, modstat output looks like:

MISC  0   - xxxxxxxx xxxx xxxxxxxx 2 streams
MISC  1   - xxxxxxxx xxxx xxxxxxxx 2 tlstrc
MISC  2   - xxxxxxxx xxxx xxxxxxxx 2 tlspir
MISC  3   - xxxxxxxx xxxx xxxxxxxx 2 tlssw1
MISC  4   - xxxxxxxx xxxx xxxxxxxx 2 tlsmtn
MISC  5   - xxxxxxxx xxxx xxxxxxxx 2 tlsmtn
MISC  6   - xxxxxxxx xxxx xxxxxxxx 2 tlsmtn
MISC  7   - xxxxxxxx xxxx xxxxxxxx 2 tlsmtn

Doing the same thing without modload option -s, modload fails every time
with: error initializing module: File exits.

Another unexpected thing off modload -s option is slow loading and blocking the system for a while. A behaviour i miss in 1.6.2.
 
>How-To-Repeat:
See full description.
>Fix: