[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#260512: swap is turned OFF after disk formatting!



> > It's now impossible to do 48 mb installs with d-i, much less 32, because
> > the new partman seems to never enable swap after formatting. So things
> > run out of memory eventually.
> 
> Why they would run out of memory? The idea is that we enable the swap
> before the hungry for memory commands and disable it when such commands
> complete.

debootstrap is a memory hungry command, and swap is disabled after partman
finishes formatting disks.

> > Instead, it enables swap early on during formatting (Good), but then
> > turns it off once disks are formatted. It seems that the fix to #250969
> > or the change of swap from a file system to a method really broke this
> 
> This is the intended behaviour.  Partman did this also before the change
> of swap from a file system to a method.

Partman has always run swapon and then swapoff, and then swapon again.
It no longer does this final swapon. I have never understood why it
_ever_ should swapoff after swap space is set up. swapoff is an
inherently dangerous command, because you have to be sure there's room
for everything in ram first. In my test 32 mb install yesterday, the
system ran out of memory on the swapoff after formatting a partition.

> > I don't know why partman does a swapoff at all after/during formatting, and
> > I've never understood that part of it. It's sure caused a lot of trouble.

> Because active swap means the kernel uses the disk.  Consequently no
> editing of the partition table is allowed.

There's a reason I said, "after/during formatting". The disk is already
partitioned at that point. It's understandable why partman would swapoff
in init.d, or perhaps at the start of disk formatting, but not why it
would swapoff after already having written the partition table and
formatted disks.

> Or you mean that partman should enable the swap when it finishes? This
> is possible.

Partman has ALWAYS done this, until the very latest versions, which
broke it.

This is not theoretical. Try a 32 mb install and notice that it no
longer works, crashing toward the end of partman. Try a 48 mb install
and watch it crash during debootstrap when it runs out of space there
and there is no swap.

This has caused a delay in the d-i release schedule, and I'm rather
annoyed by it.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: