INVARIANTS hide bugs (malloc/uma related)? (was: Re: latest working snapshot?)

2003-03-13 Thread Ruslan Ermilov
On Wed, Mar 12, 2003 at 10:32:01PM +0200, Ruslan Ermilov wrote:
 On Wed, Mar 12, 2003 at 02:14:25PM -0500, Andrew Gallatin wrote:
  
  I need to install current on a new box that just arrived.  
  What's the latest working snapshot?
  
  20030312-JPSNAP get about 40% of the way through the base install and
  sysinstall complains about a bad realloc, and lets me hit a key to
  reboot ;-(
  
 You're just lucky.  Mine just panics.
 
OK, I've tracked it down to the following.  Kernels _without_
``options INVARIANTS'' exhibit random panics, most often right
after launching the init(8) process (or sysinstall(8), if this
is an installation).

Depending on the kernel layout (I think), I saw later panics
when attempting to mount /proc, or just hanging kernel.

The attached kernel config, which is derivative of the BOOTMFS
i386 kernel which we use during installation, is such example.

It took me a while to track the problem down to a single file,
and it turned out that compiling kern/kern_malloc.c with
INVARIANTS is enough to keep the system running.  Precisely,
this change did the trick:

%%%
Index: kern_malloc.c
===
RCS file: /home/ncvs/src/sys/kern/kern_malloc.c,v
retrieving revision 1.119
diff -u -p -r1.119 kern_malloc.c
--- kern_malloc.c   10 Mar 2003 20:24:54 -  1.119
+++ kern_malloc.c   13 Mar 2003 00:53:47 -
@@ -429,7 +429,7 @@ kmeminit(dummy)
char *name = kmemzones[indx].kz_name;
 
kmemzones[indx].kz_zone = uma_zcreate(name, size,
-#ifdef INVARIANTS
+#if 1
mtrash_ctor, mtrash_dtor, mtrash_init, mtrash_fini,
 #else
NULL, NULL, NULL, NULL,
%%%


Cheers,
-- 
Ruslan Ermilov  Sysadmin and DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]   FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age
machine i386
cpu I686_CPU
ident   BOOTMFS
options SCHED_4BSD
options INET
options FFS
options COMPAT_43
#optionsINVARIANTS
options INVARIANT_SUPPORT
device  isa
device  pci
device  fdc
device  ata
device  atadisk
device  atapicd
options ATA_STATIC_ID
device  atkbdc
device  atkbd
device  psm
device  vga
device  sc
device  npx
device  loop
device  ether
options NO_COMPAT_FREEBSD4


pgp0.pgp
Description: PGP signature


latest working snapshot?

2003-03-12 Thread Andrew Gallatin

I need to install current on a new box that just arrived.  
What's the latest working snapshot?

20030312-JPSNAP get about 40% of the way through the base install and
sysinstall complains about a bad realloc, and lets me hit a key to
reboot ;-(

Drew

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message


Re: latest working snapshot?

2003-03-12 Thread Ruslan Ermilov
On Wed, Mar 12, 2003 at 02:14:25PM -0500, Andrew Gallatin wrote:
 
 I need to install current on a new box that just arrived.  
 What's the latest working snapshot?
 
 20030312-JPSNAP get about 40% of the way through the base install and
 sysinstall complains about a bad realloc, and lets me hit a key to
 reboot ;-(
 
You're just lucky.  Mine just panics.


Cheers,
-- 
Ruslan Ermilov  Sysadmin and DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]   FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age


pgp0.pgp
Description: PGP signature


Re: latest working snapshot?

2003-03-12 Thread David O'Brien
On Wed, Mar 12, 2003 at 10:32:02PM +0200, Ruslan Ermilov wrote:
 On Wed, Mar 12, 2003 at 02:14:25PM -0500, Andrew Gallatin wrote:
  
  I need to install current on a new box that just arrived.  
  What's the latest working snapshot?
  
  20030312-JPSNAP get about 40% of the way through the base install and
  sysinstall complains about a bad realloc, and lets me hit a key to
  reboot ;-(
  
 You're just lucky.  Mine just panics.

I wonder how long this has been happening -- 12-Feb-2003 also panics for
me.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message


Re: latest working snapshot?

2003-03-12 Thread Bryan Liesner
David O'Brien wrote:
On Wed, Mar 12, 2003 at 10:32:02PM +0200, Ruslan Ermilov wrote:

On Wed, Mar 12, 2003 at 02:14:25PM -0500, Andrew Gallatin wrote:

I need to install current on a new box that just arrived.  
What's the latest working snapshot?

20030312-JPSNAP get about 40% of the way through the base install and
sysinstall complains about a bad realloc, and lets me hit a key to
reboot ;-(
You're just lucky.  Mine just panics.


I wonder how long this has been happening -- 12-Feb-2003 also panics for
me.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message
Commits shortly after 3/10 are causing weirdness.

Looks like this has been happening (at least for me) after 3/10.  Last 
night, I came home from work, touched my keyboard, and it panic'd.  I 
thought it was strange, the machine was on all day and I was logging in 
and out at various times from work.

After a few reboots, I noticed that it wasn't panicking in the same 
place.  Sometimes before mounting.  Sometimes while running init. 
Sometimes while starting sendmail.  Sometimes not at all. Once, I 
thought it was up, but with the console was hosed, so I tried to telnet 
in from my wife's system.  That succeeded,  caused it to panic, and the 
message was:

remaking ttyp0

don't do that
panic...
I have seen disappearing devices like /dev/null and stderr missing at 
boot time or just going away while the system is up.

--
==
= Bryan D. Liesner LeezSoft Communications, Inc. =
=  A subsidiary of LeezSoft Inc. =
= [EMAIL PROTECTED]Home of the Gipper=
==
To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message