From jdc@parodius.com  Tue Jan 29 20:25:03 2008
Return-Path: <jdc@parodius.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 254C416A4CB
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Jan 2008 20:25:03 +0000 (UTC)
	(envelope-from jdc@parodius.com)
Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3])
	by mx1.freebsd.org (Postfix) with ESMTP id 17D2213C465
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 29 Jan 2008 20:25:03 +0000 (UTC)
	(envelope-from jdc@parodius.com)
Received: by mx01.sc1.parodius.com (Postfix, from userid 1000)
	id 06BEC1CC07B; Tue, 29 Jan 2008 12:25:03 -0800 (PST)
Message-Id: <20080129202503.06BEC1CC07B@mx01.sc1.parodius.com>
Date: Tue, 29 Jan 2008 12:25:03 -0800 (PST)
From: Jeremy Chadwick <koitsu@FreeBSD.org>
Reply-To: Jeremy Chadwick <koitsu@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Loading of gzip'd mfsroot from pxeboot(8) causes loader reload/reset
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         120127
>Category:       kern
>Synopsis:       [loader] Loading of gzip'd mfsroot from pxeboot(8) causes loader reload/reset
>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 Jan 29 20:30:01 UTC 2008
>Closed-Date:    Sat Aug 28 10:18:39 UTC 2010
>Last-Modified:  Sat Aug 28 10:18:39 UTC 2010
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 7.0-PRERELEASE i386
>Organization:
>Environment:
FreeBSD icarus.home.lan 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #0: Sat Jan 26 08:08:30 PST 2008     root@icarus.home.lan:/usr/obj/usr/src/sys/ICARUS  i386
>Description:
During my recent adventure to get FreeBSD 7.0 to install by PXE booting
and using serial console, I came across a bug where loading a compressed
mfsroot.gz results in the machine "reloading" the loader and bombing out
to an OK prompt.  It also loses all loader environment variables at that
point, and has some strange device ID-related messages on the screen.  For
others, it apparently reboots their box.

The problem happens even when manually doing "load -t mfs_root /boot/mfsroot"
from the VGA console via pxeboot(8) and TFTP.

A few others have also touched on this subject in the past, which implies
the problem exists in older versions of FreeBSD as well:

http://typo.submonkey.net/articles/2006/2/12/having-a-bad-day
http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2004-02/2170.html
http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2004-01/2115.html
http://lists.soekris.com/pipermail/soekris-tech/2007-July/012530.html
http://lists.soekris.com/pipermail/soekris-tech/2004-January/004858.html
https://answers.google.com/answers/threadview?id=409972

And so on...

I describe the problem in Step 7 of my document:

http://jdc.parodius.com/freebsd/pxeboot_serial_install.html#step7

I can easily reproduce this problem, and can provide a remote serial
console for anyone willing to take it on.  But keep in mind that once the
problem happens, all serial console access is lost, which will require me
to have to physically take a picture of the VGA screen and reboot the box.

I'll work on getting a video as well as a screenshot of the problem, so
people can see what's going on.

I've only confirmed this happens on i386; no idea about amd64.

>How-To-Repeat:
Boot a machine via Intel's PXE protocol, using pxeboot(8) as the downloaded
loader and TFTP + DHCP from another machine.

When given the choice to drop to boot2/loader, do so.

Type 'load -t mfs_root /boot/mfsroot' which should load /boot/mfsroot.gz
via TFTP from the TFTP server.

Machine will reload the loader, or possibly reboot.
>Fix:
None known.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Sun Mar 2 23:21:08 UTC 2008 
State-Changed-Why:  
Note that submitter has been asked for feedback. 

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

From: "Dylan Cochran" <a134qaed@gmail.com>
To: bug-followup@freebsd.org, "Jeremy Chadwick" <koitsu@FreeBSD.org>
Cc:  
Subject: Re: kern/120127: [pxe] Loading of gzip'd mfsroot from pxeboot(8) causes loader reload/reset
Date: Sun, 2 Mar 2008 18:20:10 -0500

 Is this the error you are referring to?
 http://img292.imageshack.us/img292/865/blajsa7.png
 
 I am able to reproduce it deterministically, it seems to be a loader
 memory management issue; too many objects, compressed or uncompressed,
  and the bug is triggered, kept below a roughly 32MB compressed data
 and uncompressed data threshold, it does not trigger. Reproduced with
 both gzip and bzip2 (bzip2 makes it quicker to trigger due to the
 algorithms memory requirements).

From: Jeremy Chadwick <koitsu@freebsd.org>
To: Dylan Cochran <a134qaed@gmail.com>
Cc: bug-followup@freebsd.org
Subject: Re: kern/120127: [pxe] Loading of gzip'd mfsroot from pxeboot(8)
	causes loader reload/reset
Date: Sun, 2 Mar 2008 16:00:32 -0800

 On Sun, Mar 02, 2008 at 06:20:10PM -0500, Dylan Cochran wrote:
 > Is this the error you are referring to?
 > http://img292.imageshack.us/img292/865/blajsa7.png
 
 Yup, that's it -- the "Guessed BIOS device 0xffffffff not found"
 message!  :-)
 
 -- 
 | Jeremy Chadwick                                    jdc at parodius.com |
 | Parodius Networking                           http://www.parodius.com/ |
 | UNIX Systems Administrator                      Mountain View, CA, USA |
 | Making life hard for others since 1977.                  PGP: 4BD6C0CB |
 
State-Changed-From-To: feedback->open 
State-Changed-By: vwe 
State-Changed-When: Sat May 10 18:12:01 UTC 2008 
State-Changed-Why:  

Feedback has been provided. 

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

From: "Mars G Miro" <spry@anarchy.in.the.ph>
To: bug-followup@FreeBSD.org, koitsu@FreeBSD.org
Cc:  
Subject: Re: kern/120127: [loader] Loading of gzip'd mfsroot from pxeboot(8) causes loader reload/reset
Date: Thu, 15 May 2008 14:54:46 +0800

 Heya,
 
  I have a working PXE environment, w/c I use from time to time. Today
 was the first time I tried installing FreeBSD 7.0-RELEASE/amd64 (on a
 sun x4100 w/ 8G of RAM) over PXE and I can say that I never had to
 gunzip mfsroot.gz nor experience this problem at all. FYI.
 
 
 cheers
 mars

From: Jeremy Chadwick <koitsu@FreeBSD.org>
To: Mars G Miro <spry@anarchy.in.the.ph>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/120127: [loader] Loading of gzip'd mfsroot from
	pxeboot(8) causes loader reload/reset
Date: Thu, 15 May 2008 00:50:55 -0700

 I haven't tried using amd64, only i386.  I'm willing to bet the bug only
 happens to some people based on memory configurations or some hardware
 differences.
 
 -- 
 | Jeremy Chadwick                                jdc at parodius.com |
 | Parodius Networking                       http://www.parodius.com/ |
 | UNIX Systems Administrator                  Mountain View, CA, USA |
 | Making life hard for others since 1977.              PGP: 4BD6C0CB |
 

From: "Mars G Miro" <spry@anarchy.in.the.ph>
To: "Jeremy Chadwick" <koitsu@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: kern/120127: [loader] Loading of gzip'd mfsroot from pxeboot(8) causes loader reload/reset
Date: Thu, 15 May 2008 18:19:35 +0800

 On Thu, May 15, 2008 at 3:50 PM, Jeremy Chadwick <koitsu@freebsd.org> wrote:
 > I haven't tried using amd64, only i386.  I'm willing to bet the bug only
 > happens to some people based on memory configurations or some hardware
 > differences.
 >
 
 If and when I'll be bootstrapping to other lower-end hardware in my
 PXE environment, I'll surely report back from time to time if this bug
 occurs or not.
 
 Thanks.
 
 > --
 > | Jeremy Chadwick                                jdc at parodius.com |
 > | Parodius Networking                       http://www.parodius.com/ |
 > | UNIX Systems Administrator                  Mountain View, CA, USA |
 > | Making life hard for others since 1977.              PGP: 4BD6C0CB |
 >
 >
 
 
 cheers
 mars

From: John Baldwin <jhb@freebsd.org>
To: bug-followup@freebsd.org,
 koitsu@freebsd.org
Cc:  
Subject: Re: kern/120127: [loader] Loading of gzip'd mfsroot from pxeboot(8) causes loader reload/reset
Date: Mon, 7 Dec 2009 12:11:37 -0500

 Is this still a problem on recent versions of FreeBSD 7 or 8?
 
 -- 
 John Baldwin
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Mon Dec 7 17:54:19 UTC 2009 
State-Changed-Why:  
note that feedback was requested. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120127 
State-Changed-From-To: feedback->closed 
State-Changed-By: vwe 
State-Changed-When: Sat Aug 28 10:18:23 UTC 2010 
State-Changed-Why:  
feedback timeout 

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