NetBSD Problem Report #40110

From www@NetBSD.org  Fri Dec  5 05:52:40 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 372E963BB35
	for <gnats-bugs@gnats.netbsd.org>; Fri,  5 Dec 2008 05:52:40 +0000 (UTC)
Message-Id: <20081205055239.C8A2F63BAE7@narn.NetBSD.org>
Date: Fri,  5 Dec 2008 05:52:39 +0000 (UTC)
From: xtraeme@gmail.com
Reply-To: xtraeme@gmail.com
To: gnats-bugs@NetBSD.org
Subject: null, overlay and umap modules loading -> panic (layerfs symbols not there)
X-Send-Pr-Version: www-1.0

>Number:         40110
>Category:       kern
>Synopsis:       null, overlay and umap modules loading -> panic (layerfs symbols not there)
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 05 05:55:00 +0000 2008
>Closed-Date:    Sun Nov 15 01:47:55 +0000 2009
>Last-Modified:  Sun Nov 15 01:47:55 +0000 2009
>Originator:     Juan RP
>Release:        Latest
>Organization:
>Environment:
>Description:
Loading any of null, overlay or umap modules will cause a panic instantly.
The missing symbols are provided by layerfs on sys/miscfs/genfs/layer_*.

I've found two ways to fix them:

* Make a new module for layerfs and depend on it in affected modules.
* Build those modules with layerfs code built in. Once you load any
  of them those symbols will be there for the other ones.

I used the second option on my patch. Probably the first option is the
best way to fix this, and I could provide a patch if requested; but not
sure if it should be a module, because it's not a real fs after all.
>How-To-Repeat:
mount_nullfs /blah /foo -> panic
>Fix:
Index: null/Makefile
===================================================================
RCS file: /cvsroot/src/sys/modules/null/Makefile,v
retrieving revision 1.1
diff -b -u -p -r1.1 Makefile
--- null/Makefile	24 Nov 2008 11:26:49 -0000	1.1
+++ null/Makefile	5 Dec 2008 05:34:07 -0000
@@ -6,5 +6,6 @@

 KMOD=	null
 SRCS=	null_vfsops.c null_vnops.c
+SRCS+=	layer_vfsops.c layer_vnops.c layer_subr.c

 .include <bsd.kmodule.mk>
Index: overlay/Makefile
===================================================================
RCS file: /cvsroot/src/sys/modules/overlay/Makefile,v
retrieving revision 1.1
diff -b -u -p -r1.1 Makefile
--- overlay/Makefile	28 Jun 2008 16:11:36 -0000	1.1
+++ overlay/Makefile	5 Dec 2008 05:34:07 -0000
@@ -6,5 +6,6 @@

 KMOD=	overlay
 SRCS=	overlay_vfsops.c overlay_vnops.c
+SRCS+=	layer_vfsops.c layer_vnops.c layer_subr.c

 .include <bsd.kmodule.mk>
Index: umap/Makefile
===================================================================
RCS file: /cvsroot/src/sys/modules/umap/Makefile,v
retrieving revision 1.1
diff -b -u -p -r1.1 Makefile
--- umap/Makefile	24 Nov 2008 11:26:49 -0000	1.1
+++ umap/Makefile	5 Dec 2008 05:34:07 -0000
@@ -2,9 +2,10 @@

 .include "../Makefile.inc"

-.PATH:	${S}/miscfs/umapfs
+.PATH:	${S}/miscfs/umapfs ${S}/miscfs/genfs

 KMOD=	umap
 SRCS=	umap_vfsops.c umap_vnops.c umap_subr.c
+SRCS+=	layer_vfsops.c layer_vnops.c layer_subr.c

 .include <bsd.kmodule.mk>

>Release-Note:

>Audit-Trail:
From: Andrew Doran <ad@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/40110: null, overlay and umap modules loading -> panic (layerfs symbols not there)
Date: Fri, 5 Dec 2008 10:19:16 +0000

 Hi,

 On Fri, Dec 05, 2008 at 05:55:00AM +0000, xtraeme@gmail.com wrote:

 > Loading any of null, overlay or umap modules will cause a panic instantly.
 > The missing symbols are provided by layerfs on sys/miscfs/genfs/layer_*.

 I don't understand this. What's the panic that you see?

 > * Make a new module for layerfs and depend on it in affected modules.

 I'll implement this. Longer term I plan to rewrite both of these FSes.

 Thanks,
 Andrew

From: Andrew Doran <ad@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40110 CVS commit: src/sys/kern
Date: Fri,  5 Dec 2008 12:51:17 +0000 (UTC)

 Module Name:	src
 Committed By:	ad
 Date:		Fri Dec  5 12:51:17 UTC 2008

 Modified Files:
 	src/sys/kern: kern_module.c

 Log Message:
 PR kern/40110: null, overlay and umap modules loading -> panic (layerfs symbols not there)


 To generate a diff of this commit:
 cvs rdiff -r1.35 -r1.36 src/sys/kern/kern_module.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Juan Romero Pardines" <xtraeme@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/40110: null, overlay and umap modules loading -> panic (layerfs symbols not there)
Date: Fri, 5 Dec 2008 14:04:59 +0100

 2008/12/5 Andrew Doran <ad@netbsd.org>:

 >  I don't understand this. What's the panic that you see?

 The backtrace was something like:

 module_do_load()
 module_do_builtin()
 ...

 Sorry can't remember exactly.

 >  I'll implement this. Longer term I plan to rewrite both of these FSes.

 Good :-)

From: Andrew Doran <ad@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40110 CVS commit: src
Date: Fri,  5 Dec 2008 13:05:38 +0000 (UTC)

 Module Name:	src
 Committed By:	ad
 Date:		Fri Dec  5 13:05:38 UTC 2008

 Modified Files:
 	src/distrib/sets/lists/base: module.mi
 	src/sys/fs/union: union_vfsops.c
 	src/sys/fs/unionfs: unionfs_vfsops.c
 	src/sys/miscfs/genfs: layer_vfsops.c
 	src/sys/miscfs/nullfs: null_vfsops.c
 	src/sys/miscfs/overlay: overlay_vfsops.c
 	src/sys/miscfs/umapfs: umap_vfsops.c
 	src/sys/modules: Makefile
 Added Files:
 	src/sys/modules/layerfs: Makefile

 Log Message:
 PR kern/40110: null, overlay and umap modules loading -> panic (layerfs symbols not there)

 Add a layerfs module.


 To generate a diff of this commit:
 cvs rdiff -r1.1 -r1.2 src/distrib/sets/lists/base/module.mi
 cvs rdiff -r1.57 -r1.58 src/sys/fs/union/union_vfsops.c
 cvs rdiff -r1.5 -r1.6 src/sys/fs/unionfs/unionfs_vfsops.c
 cvs rdiff -r1.29 -r1.30 src/sys/miscfs/genfs/layer_vfsops.c
 cvs rdiff -r1.77 -r1.78 src/sys/miscfs/nullfs/null_vfsops.c
 cvs rdiff -r1.53 -r1.54 src/sys/miscfs/overlay/overlay_vfsops.c
 cvs rdiff -r1.80 -r1.81 src/sys/miscfs/umapfs/umap_vfsops.c
 cvs rdiff -r1.21 -r1.22 src/sys/modules/Makefile
 cvs rdiff -r0 -r1.1 src/sys/modules/layerfs/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 24 Jan 2009 21:27:27 +0000
State-Changed-Why:
Is this fully fixed?


State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 15 Nov 2009 01:47:55 +0000
State-Changed-Why:
No feedback is good feedback.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.