NetBSD Problem Report #39116

From  Tue Jul  8 16:03:22 2008
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 1372063BC5B
	for <>; Tue,  8 Jul 2008 16:03:22 +0000 (UTC)
Message-Id: <>
Date: Tue,  8 Jul 2008 16:03:21 +0000 (UTC)
Subject: newfs on cgd causes kernel panic
X-Send-Pr-Version: www-1.0

>Number:         39116
>Category:       kern
>Synopsis:       newfs on cgd causes kernel panic
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 08 16:05:00 +0000 2008
>Last-Modified:  Sun Jul 13 14:49:07 +0000 2008
>Originator:     Mustafa Dogan
>Release:        NetBSD-4.0_STABLE
Ankara University
NetBSD 4.0_STABLE NetBSD 4.0_STABLE (MuDo) #0: Fri Jul  4 08:09:31 EEST 2008 i386
While creating a new filesystem on a cgd disk (newfs cgd0a), kernel panics.
I'm using a 60 GB USB disk for my backups, and I wanted to encrypt my disk. First, I use cgdconfig, as described in man page. Then, restarted /etc/rc.d/cgd. While I want to create new filesystem, (filesystem creation started, inode numbers and some dots displayed and) an error occurred: 

#newfs /dev/cgd0a
/dev/cgd0a: 57231.5MB (117210176 sectors) block size 16384, fragment size 2048
   using 311 cylinder groups of 184.03MB, 11778 blks, 23296 inodes.
super-block backups (for fsck_ffs -b #) at:
32, 376928, 753824, 1130720, 1507616, 1884512, 2261488, 3015200, 
...................panic: malloc: out of space in kmem_map
Stopped in pid 1241.1 (cron) at netbsd:cpu_Debugger+0x4:   popl   %ebp

I retried for a couple of times, and all of my attempts failed.

One of the fail reason is different from others: 

uvm_fault(0xcc789540, 0, 1) -> 0xe
kernel: supervisor trap page fault, code=0
Stopped in pid 1053.1 (cron) at netbsd:pmap_create+0xf4:   movl   0xbfc(%eax),%eax

On NetBSD-4.0_STABLE (or maybe other versions also have this bug)

# cgdconfig -g -o /etc/cgd/sd0e -V disklabel aes-cbc 256
# cgdconfig -V re-enter cgd0 /dev/sd0e
# disklabel -W cgd0
# disklabel -e -I cgd0
# disklabel -N cgd0
(edit /etc/cgd/cgd.conf)
# /etc/rc.d/cgd restart
# newfs /dev/cgd0a 




NetBSD Home
NetBSD PR Database Search

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