Swapfile problem in 6? (was: 6.0: during kernel compilation, 'kernel linking' freezes PC)

2005-11-14 Thread Rob
--- Rob [EMAIL PROTECTED] wrote:
 
 Hi,
 
 I have upgraded a Pentium-1 PC from 5 to 6-Stable,
 which went smoothly.
 
 Now I'm running 6 with GENERIC kernel, and I want
 to compile a new kernel. When I start a new kernel
 compilation, this process *always* freezes the PC
 (no crash) when reaching the point of linking
 kernel; this is 100 percent reproducible!!
 
 Then all communication with the PC is frozen;
 no serial port response, no ssh response etc.
 However, I can ping the PC.
 
 Only power off/on brings the PC back to live.
 
 Any idea how I can further investigate.
 /var/log/messages has no special information while
 the freezing occurred.
 
 The output of 'dmesg' of this PC is here:
  http://surfion.snu.ac.kr/~lahaye/dmesg

Problem kind of solved:

As this PC has only 32 MB Ram, I add a swapfile.
However, when I compile the new kernel without the
swapfile, all goes well.

Since the freeze is very reproducible with the
swapfile (always at the 'kernel linking' stage),
and immediately disappears when I do not use the
swapfile, I think there's something wrong with
using swapfile in 6.0. Is it?

I do this:

 dd if=/dev/zero of=/swapfile bs=1024k count=128
 chmod 0600 /swapfile
 mdconfig -a -t vnode -f /swapfile -u 0
 swapon /dev/md0

Is this OK?

Rob.




__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6? (was: 6.0: during kernel compilation, 'kernel linking' freezes PC)

2005-11-14 Thread Kris Kennaway
On Mon, Nov 14, 2005 at 05:52:42PM -0800, Rob wrote:
 --- Rob [EMAIL PROTECTED] wrote:
  
  Hi,
  
  I have upgraded a Pentium-1 PC from 5 to 6-Stable,
  which went smoothly.
  
  Now I'm running 6 with GENERIC kernel, and I want
  to compile a new kernel. When I start a new kernel
  compilation, this process *always* freezes the PC
  (no crash) when reaching the point of linking
  kernel; this is 100 percent reproducible!!
  
  Then all communication with the PC is frozen;
  no serial port response, no ssh response etc.
  However, I can ping the PC.
  
  Only power off/on brings the PC back to live.
  
  Any idea how I can further investigate.
  /var/log/messages has no special information while
  the freezing occurred.
  
  The output of 'dmesg' of this PC is here:
   http://surfion.snu.ac.kr/~lahaye/dmesg
 
 Problem kind of solved:
 
 As this PC has only 32 MB Ram, I add a swapfile.
 However, when I compile the new kernel without the
 swapfile, all goes well.
 
 Since the freeze is very reproducible with the
 swapfile (always at the 'kernel linking' stage),
 and immediately disappears when I do not use the
 swapfile, I think there's something wrong with
 using swapfile in 6.0. Is it?
 
 I do this:
 
  dd if=/dev/zero of=/swapfile bs=1024k count=128
  chmod 0600 /swapfile
  mdconfig -a -t vnode -f /swapfile -u 0
  swapon /dev/md0
 
 Is this OK?

Looks fine, and I use this myself (on a much larger scale).  Are you
sure it's freezing and not just taking a really long time?  Whenever
your system is swapping performance will be terrible, and that goes at
least double for swapping onto a file and not a device.

What happens if you leave it for an hour or two (or overnight)?

Kris


pgptYcxFB6Uv8.pgp
Description: PGP signature


Re: Swapfile problem in 6? (was: 6.0: during kernel compilation, 'kernel linking' freezes PC)

2005-11-14 Thread Rob
--- Kris Kennaway [EMAIL PROTECTED] wrote:
 On Mon, Nov 14, 2005 at 05:52:42PM -0800, Rob wrote:
  
  Problem kind of solved:
  
  As this PC has only 32 MB Ram, I add a swapfile.
  However, when I compile the new kernel without the
  swapfile, all goes well.
  
  Since the freeze is very reproducible with the
  swapfile (always at the 'kernel linking' stage),
  and immediately disappears when I do not use the
  swapfile, I think there's something wrong with
  using swapfile in 6.0. Is it?
  
  I do this:
  
   dd if=/dev/zero of=/swapfile bs=1024k count=128
   chmod 0600 /swapfile
   mdconfig -a -t vnode -f /swapfile -u 0
   swapon /dev/md0
  
  Is this OK?
 
 Looks fine, and I use this myself (on a much larger
 scale).  Are you
 sure it's freezing and not just taking a really long
 time?  Whenever
 your system is swapping performance will be
 terrible, and that goes at
 least double for swapping onto a file and not a
 device.
 
 What happens if you leave it for an hour or two (or
 overnight)?

I left it overnight twice for performing this
'kernel linking' stage. In both cases the machine
remained dead.
Without the swapfile, this 'kernel linking' stage
completes in just about less than a minute.

So I think it's not my impatience, but there is
another problem with my swapfile or with 6 :).

Rob.




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6? (was: 6.0: during kernel compilation, 'kernel linking' freezes PC)

2005-11-14 Thread Kris Kennaway
On Mon, Nov 14, 2005 at 06:08:27PM -0800, Rob wrote:

 I left it overnight twice for performing this
 'kernel linking' stage. In both cases the machine
 remained dead.
 Without the swapfile, this 'kernel linking' stage
 completes in just about less than a minute.
 
 So I think it's not my impatience, but there is
 another problem with my swapfile or with 6 :).

Since you can compile a kernel without it, add DDB, WITNESS and
INVARIANTS support, then trigger the deadlock with the swapfile, break
to DDB and examine the state of the machine.  See the chapter on
kernel debugging in the developers handbook for more instructions.

Kris



pgpJ6WLBy6qWO.pgp
Description: PGP signature


Re: Swapfile problem in 6? (was: 6.0: during kernel compilation, 'kernel linking' freezes PC)

2005-11-14 Thread Rob
--- Kris Kennaway [EMAIL PROTECTED] wrote:

 On Mon, Nov 14, 2005 at 06:08:27PM -0800, Rob wrote:
 
  I left it overnight twice for performing this
  'kernel linking' stage. In both cases the machine
  remained dead.
  Without the swapfile, this 'kernel linking' stage
  completes in just about less than a minute.
  
  So I think it's not my impatience, but there is
  another problem with my swapfile or with 6 :).
 
 Since you can compile a kernel without it, add DDB,
 WITNESS and INVARIANTS support, then trigger the
 deadlock with the swapfile, break to DDB and
 examine the state of the machine.  See the chapter
 on kernel debugging in the developers handbook for
 more instructions.

Thanks, but for now, I cannot compile a new kernel,
because the kernel compilation terminates with
insufficient swap space error. Apparently 32 MB is
not enough for a new kernel compilation.

So for now I'm stuck with the GENERIC kernel.

This is my partitioning:
 /dev/ad0s1a253678  34446 19893815%/
 /dev/ad0s1b 39848   8168  3984820%(swap)
 /dev/ad0s1d253678 152958  8042666%/var
 /dev/ad0s1e253678   6016 227368 3%/home
 /dev/ad0s1f   1624576 727274 76733649%/usr

First I used 128 MB swapfile on root partition;
then tried again with a 128 MB swapfile on /var.
However, exactly the same deadlock occurs:
when the kernel compilation reaches 'linking kernel'
the PC is dead (no crash). Although I can ping
the PC, there's no response to any other service;
also serial port console is dead.

Without using the swapfile, the compilation easily
passes through the 'linking kernel' stage, but
somewhat later terminates as swap space is
insufficient.

With 5-Stable, I used the swapfile extensively for
recompiling new kernels and worlds, without any
problem.

I only can conclude that something is wrong with
the swapfile construct in 6.

Is 128 MB too big for a swapfile in 6?
I'll try again with a smaller swapfile...

Any other ideas?

dmesg output of this PC is here:
 http://surfion.snu.ac.kr/~lahaye/dmesg

Thanks,
Rob.




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Swapfile problem in 6? (was: 6.0: during kernel compilation, 'kernel linking' freezes PC)

2005-11-14 Thread Peter Jeremy
On Mon, 2005-Nov-14 22:38:59 -0800, Rob wrote:
--- Kris Kennaway [EMAIL PROTECTED] wrote:
 Since you can compile a kernel without it, add DDB,
 WITNESS and INVARIANTS support, then trigger the
 deadlock with the swapfile, break to DDB and
 examine the state of the machine.  See the chapter
 on kernel debugging in the developers handbook for
 more instructions.

Thanks, but for now, I cannot compile a new kernel,
because the kernel compilation terminates with
insufficient swap space error.

Unfortunately, we're probably not going to be able to provide much
assistance without knowing more about what is happening when it
deadlocks.  (As Kris requests).  BTW, you should probably make
sure you keep makeoptions DEBUG=-g and set dumpdev in rc.conf
(which will make it possible to capture and use a crashdump if
you can trigger one).

 Apparently 32 MB is
not enough for a new kernel compilation.

Quite probably.

This is my partitioning:
 /dev/ad0s1a253678  34446 19893815%/
 /dev/ad0s1b 39848   8168  3984820%(swap)
 /dev/ad0s1d253678 152958  8042666%/var
 /dev/ad0s1e253678   6016 227368 3%/home
 /dev/ad0s1f   1624576 727274 76733649%/usr

Since your /home is almost empty, how about (temporarily) moving the
contents into /usr and swapping onto ad0s1e rather than into a
swapfile.  This should at least enable you to build a debug kernel.

First I used 128 MB swapfile on root partition;
then tried again with a 128 MB swapfile on /var.
However, exactly the same deadlock occurs:

Have you pre-allocated the swapfile or is it being allocated as necessary?
If the latter, try dd if=/dev/zero of=swapfile bs=1m count=128

-- 
Peter Jeremy
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]