From nobody@FreeBSD.org  Thu May 30 16:08:34 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 22C47908
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 May 2013 16:08:34 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.FreeBSD.org (oldred.freebsd.org [8.8.178.121])
	by mx1.freebsd.org (Postfix) with ESMTP id F0222235
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 May 2013 16:08:33 +0000 (UTC)
Received: from oldred.FreeBSD.org ([127.0.1.6])
	by oldred.FreeBSD.org (8.14.5/8.14.5) with ESMTP id r4UG8XsI089285
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 May 2013 16:08:33 GMT
	(envelope-from nobody@oldred.FreeBSD.org)
Received: (from nobody@localhost)
	by oldred.FreeBSD.org (8.14.5/8.14.5/Submit) id r4UG8XKV089284;
	Thu, 30 May 2013 16:08:33 GMT
	(envelope-from nobody)
Message-Id: <201305301608.r4UG8XKV089284@oldred.FreeBSD.org>
Date: Thu, 30 May 2013 16:08:33 GMT
From: "Majdi S. Abbas" <msa@latt.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: 9.1 installer panics with a kmem_malloc() failure on i386 embedded systems
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         179112
>Category:       i386
>Synopsis:       9.1 installer panics with a kmem_malloc() failure on i386 embedded systems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-stable
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 30 16:10:00 UTC 2013
>Closed-Date:    Thu Aug 01 13:22:48 UTC 2013
>Last-Modified:  Thu Aug 01 13:22:48 UTC 2013
>Originator:     Majdi S. Abbas
>Release:        9.1-RELEASE
>Organization:
Lattice, L.L.C.
>Environment:
9.1 GENERIC/i386 as bundled in the USB installer
>Description:
The 9.1 installer panics when kmem_malloc() fails on smaller embedded i386 architecture systems due to an autoscaling problem and CTL.  This is 100% reproducible until certain parameters are set via the loader during install:

 FreeBSD Installer
 


                Archive Extraction
                                                             
                 base.txz                     [    57%     ] 
                 kernel.txz                   [  Pending   ]panic: kmem_malloc(
4096): kmem_map too small: 38060032 total allocated           
cpuid = 0        Extracting distribution files...            
KDB: stack backtrace:                                         
#0 0xc0af3aff at kdb_backtrace+0x4fss  
#1 0xc0ac052f at panic+0x16f          53%                    
#2 0xc0d2caea at kmem_malloc+0x28a  
#3 0xc0d202b7 at page_alloc+0x27
#4 0xc0d22bca at keg_alloc_slab+0x10a
#5 0xc0d23164 at keg_fetch_slab+0xd4
#6 0xc0d234ec at zone_fetch_slab+0x4c
#7 0xc0d24ade at uma_zalloc_arg+0x4ae
#8 0xc0aab29a at malloc+0x5a
#9 0xc0ce922a at newjsegdep+0x2a
#10 0xc0cf5a89 at newjaddref+0x69
#11 0xc0cf5b16 at softdep_setup_inomapdep+0x56
#12 0xc0cd9398 at ffs_nodealloccg+0x728
#13 0xc0cd3d91 at ffs_hashalloc+0x41
#14 0xc0cd8913 at ffs_valloc+0x4a3
#15 0xc0d15c14 at ufs_makeinode+0xa4
#16 0xc0d164a0 at ufs_create+0x30
#17 0xc0e48412 at VOP_CREATE_APV+0x42
Uptime: 8m5s
Automatic reboot in 15 seconds - press a key on the console to abort
--> Press a key on the console to reboot,
--> or switch off the system now.
>How-To-Repeat:
- Install FreeBSD 9.1/i386 from the USB installer image onto any i386 system with less than about 256 or 384M of DRAM.

>Fix:
Set these parameters via the loader before booting the install image, and the install succeeds:

kern.cam.ctl.disable=1
vm.kmem_size_scale=1

Neither parameter, by itself, is enough for the install to complete, both are required.  Autoscaling appears to fail on smaller platforms.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-stable 
Responsible-Changed-By: adrian 
Responsible-Changed-When: Wed Jun 5 17:59:21 UTC 2013 
Responsible-Changed-Why:  
Punt to -stable, as this is not specifically an i386 issue. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=179112 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/179112: commit references a PR
Date: Thu,  1 Aug 2013 13:19:08 +0000 (UTC)

 Author: marius
 Date: Thu Aug  1 13:18:47 2013
 New Revision: 253860
 URL: http://svnweb.freebsd.org/changeset/base/253860
 
 Log:
   MFC: r249410 (partial)
   
   Remove ctl(4) from GENERIC.
   
   With ctl(4) being built as a module and automatically loaded by ctladm(8),
   this makes CTL work out of the box.
   
   Note that unlike the original r249410, this commit does not remove the
   kern.cam.ctl.disable tunable for POLA reasons.
   
   PR:		174671, 175694, 179112
   Reviewed by:	ken (original version)
   Sponsored by:	FreeBSD Foundation (original version)
   Approved by:	re (hrs)
 
 Modified:
   stable/9/sys/amd64/conf/GENERIC
   stable/9/sys/i386/conf/GENERIC
   stable/9/sys/i386/conf/PAE
   stable/9/sys/ia64/conf/GENERIC
   stable/9/sys/sparc64/conf/GENERIC
 Directory Properties:
   stable/9/sys/   (props changed)
 
 Modified: stable/9/sys/amd64/conf/GENERIC
 ==============================================================================
 --- stable/9/sys/amd64/conf/GENERIC	Thu Aug  1 12:55:41 2013	(r253859)
 +++ stable/9/sys/amd64/conf/GENERIC	Thu Aug  1 13:18:47 2013	(r253860)
 @@ -124,7 +124,7 @@ device		sa		# Sequential Access (tape et
  device		cd		# CD
  device		pass		# Passthrough device (direct ATA/SCSI access)
  device		ses		# Enclosure Services (SES and SAF-TE)
 -device		ctl		# CAM Target Layer
 +#device		ctl		# CAM Target Layer
  
  # RAID controllers interfaced to the SCSI subsystem
  device		amr		# AMI MegaRAID
 
 Modified: stable/9/sys/i386/conf/GENERIC
 ==============================================================================
 --- stable/9/sys/i386/conf/GENERIC	Thu Aug  1 12:55:41 2013	(r253859)
 +++ stable/9/sys/i386/conf/GENERIC	Thu Aug  1 13:18:47 2013	(r253860)
 @@ -131,7 +131,7 @@ device		sa		# Sequential Access (tape et
  device		cd		# CD
  device		pass		# Passthrough device (direct ATA/SCSI access)
  device		ses		# Enclosure Services (SES and SAF-TE)
 -device		ctl		# CAM Target Layer
 +#device		ctl		# CAM Target Layer
  
  # RAID controllers interfaced to the SCSI subsystem
  device		amr		# AMI MegaRAID
 
 Modified: stable/9/sys/i386/conf/PAE
 ==============================================================================
 --- stable/9/sys/i386/conf/PAE	Thu Aug  1 12:55:41 2013	(r253859)
 +++ stable/9/sys/i386/conf/PAE	Thu Aug  1 13:18:47 2013	(r253860)
 @@ -39,8 +39,6 @@ nodevice	ncv
  nodevice	nsp
  nodevice	stg
  
 -nodevice	ctl
 -
  nodevice	asr
  nodevice	dpt
  nodevice	mly
 
 Modified: stable/9/sys/ia64/conf/GENERIC
 ==============================================================================
 --- stable/9/sys/ia64/conf/GENERIC	Thu Aug  1 12:55:41 2013	(r253859)
 +++ stable/9/sys/ia64/conf/GENERIC	Thu Aug  1 13:18:47 2013	(r253860)
 @@ -100,7 +100,7 @@ device		da		# Direct Access (ie disk)
  device		pass		# Passthrough (direct ATA/SCSI access)
  device		sa		# Sequential Access (ie tape)
  device		ses		# Enclosure Services (SES and SAF-TE)
 -device		ctl		# CAM Target Layer
 +#device		ctl		# CAM Target Layer
  
  # RAID controllers
  device		aac		# Adaptec FSA RAID
 
 Modified: stable/9/sys/sparc64/conf/GENERIC
 ==============================================================================
 --- stable/9/sys/sparc64/conf/GENERIC	Thu Aug  1 12:55:41 2013	(r253859)
 +++ stable/9/sys/sparc64/conf/GENERIC	Thu Aug  1 13:18:47 2013	(r253860)
 @@ -107,7 +107,7 @@ device		sa		# Sequential Access (tape et
  device		cd		# CD
  device		pass		# Passthrough device (direct ATA/SCSI access)
  device		ses		# SCSI Environmental Services (and SAF-TE)
 -device		ctl		# CAM Target Layer
 +#device		ctl		# CAM Target Layer
  
  # RAID controllers
  #device		amr		# AMI MegaRAID
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: marius 
State-Changed-When: Thu Aug 1 13:22:29 UTC 2013 
State-Changed-Why:  
Close 

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