Hello Otto,

First of all, thank you for the quick reply.

On 11 November 2014 16:25, Otto Moerbeek <[email protected]> wrote:
> On Tue, Nov 11, 2014 at 04:10:48PM +0200, Nikos Skalkotos wrote:
>
>> Hello all,
>>
>> I have a kernel page fault in OpenBSD 5.6 100% reproducible (I think I
>> can reproduce it in older versions too).
>>
>> I've created an OpenBSD installation in Linux through kvm on a 1GB hard
>> disk with just a root partition (a), by booting the install56.iso cdrom
>> with a command like this:
>>
>> # kvm -smp 1 -m 2048 -boot d -drive \
>> file=/dev/images/openbsd-5.6,format=raw,cache=none,if=virtio -cdrom
>> /tmp/install56.iso -vnc :0
>>
>> The system boots fine with a command like this:
>> # kvm -m 2048 -drive file=/dev/images/openbsd,format=raw,cache=none,if=virtio
>>
>> If I then copy it into a 100GB volume:
>> # dd if=/dev/images/openbsd of=/dev/images/tmp1 bs=4M
>>
>> And try to boot it, it still boots fine. I then boot into the VM's
>> rescue disk:
>>
>> > boot bsd.rd
>>
>> and press S to get a shell
>>
>> I mount the root partition and grab growfs program:
>> # mount /dev/sd0a /mnt
>> # cp /mnt/sbin/growfs .
>> # umount /mnt
>>
>> Fix the MBR to use the entire disk:
>> # fdisk -i wd0
>
> I assume that wd0 should be sd0?

Yes this was a typo

>
>>
>> And change the disklabel:
>>
>> # disklabel -E sd0
>>
>> Change the OpenBSD boundaries to cover the whole disk:
>> > b
>> Starting sector: [64]
>> Size ('*' for entire disk):[] *
>>
>> and then grow the root partition to make it 100GB log:
>> > c
>> partition to change size: [] a
>>
>> Then grow the underlying FFS file system:
>>
>> # growfs /dev/sd0a
>>
>> If I then reboot, the ffs driver crashes with errors like this:
>>
>> uvm_fault(0xffffffff81dcddc0, 0xc000068, 0, 2) -> e
>> kernel: page fault trap, code=0
>> Stopped at         ffs_vget+0x115: addb    %al, 0(%rcx,%rax,1)
>> ddb>
>>
>> Am I missing something or is this a kernel/growfs bug?
>>
>> Thank you in advance,
>>
>> Nikos Skalkotos
>
> What does fsck say after you have grown the fs?
>
> Yoy probably need to force fsck, see BUGS section of growfs(8).
>
I tried it and it justs asks if I want to mark the file system as
clean and states that the filesystem has been modified in the end.

But still, the file system seems to be corrupted. I can reproduce this
for big filesystems (50G or 100G). I tried to use ide, instead of
virtio but I still get errors. It's 100% reproducible for big
filesystems :-(

>         -Otto

Does anybody have enough space to try it out?
The funny thing is that if I directly install the OpenBSD system on
the 100G drive, and just create a 1G root partition and enlarge it
afterwards it works. But If I install it in a small volume and then do
the aforementioned procedure it always crashes. I don't thing this is
a hardware issue from my side.

Nikos

Reply via email to