2012-06-04 21:30:18

by Toralf Förster

[permalink] [raw]
Subject: chroot under kernel 3.4.x gives core dumps

When I try under both kernel versions to chroot into a user mode linux
image, I often get this :

+ mount -o loop /home/tfoerste/virtual/uml/gentoo_unstable /mnt/loop
+ mount -t proc none /mnt/loop/proc
+ mount -o bind /dev /mnt/loop/dev
+ mount -o bind /dev/pts /mnt/loop/dev/pts
+ mount -o bind /usr/portage /mnt/loop/usr/portage
+ mount -o bind /usr/local/portage /mnt/loop/usr/local/portage
+ mount -o bind /tmp/uml_portage /mnt/loop/var/tmp/portage
+ chroot /mnt/loop /bin/bash
/home/tfoerste/workspace/bin/chr_uml.sh: line 55: 4143 Segmentation
fault (core dumped) chroot /mnt/loop /bin/bash


The core file itself is only 400 KB in size and the back trace with gbd
is meaningless :

Core was generated by `/bin/bash'.
Program terminated with signal 11, Segmentation fault.
#0 0xb75cac00 in ?? ()
(gdb) bt
#0 0xb75cac00 in ?? ()
#1 0xb76f4ff4 in ?? ()
Cannot access memory at address 0xffffffdc


In the rare cases, where the chroot doesn't crash, all subsequent
commands cores instead.

Furthermore it seems, that the boinc grid software has problems too
under kernel 3.4.1.

All kernel 3.3.x works fine.

--
MfG/Sincerely
Toralf F?rster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3


2012-06-04 21:41:18

by Richard Weinberger

[permalink] [raw]
Subject: Re: chroot under kernel 3.4.x gives core dumps

On Mon, Jun 4, 2012 at 11:30 PM, Toralf F?rster <[email protected]> wrote:
> In the rare cases, where the chroot doesn't crash, all subsequent
> commands cores instead.

Then it should be easily bisectable. :)
Can you please try?

--
Thanks,
//richard

2012-06-05 10:44:05

by Toralf Förster

[permalink] [raw]
Subject: commit 0fc9d10 : chroot under kernel 3.4.x core dumps


When I try under kernel versions 3.4.[01] to chroot into a user mode
linux image, I often get this :

+ mount -o loop /home/tfoerste/virtual/uml/gentoo_unstable /mnt/loop
+ mount -t proc none /mnt/loop/proc
+ mount -o bind /dev /mnt/loop/dev
+ mount -o bind /dev/pts /mnt/loop/dev/pts
+ mount -o bind /usr/portage /mnt/loop/usr/portage
+ mount -o bind /usr/local/portage /mnt/loop/usr/local/portage
+ mount -o bind /tmp/uml_portage /mnt/loop/var/tmp/portage
+ chroot /mnt/loop /bin/bash
/home/tfoerste/workspace/bin/chr_uml.sh: line 55: 4143 Segmentation
fault (core dumped) chroot /mnt/loop /bin/bash


The core file itself is only 400 KB in size and the back trace with gbd
is meaningless :

Core was generated by `/bin/bash'.
Program terminated with signal 11, Segmentation fault.
#0 0xb75cac00 in ?? ()
(gdb) bt
#0 0xb75cac00 in ?? ()
#1 0xb76f4ff4 in ?? ()
Cannot access memory at address 0xffffffdc

In the rare cases, where the chroot doesn't crash, all subsequent
commands cores instead. Furthermore it seems, that the boinc grid
software has problems too under kernel 3.4.1.
All kernel 3.3.x works fine.

I bisected it to :

commit 0fc9d1040313047edf6a39fd4d7c7defdca97c62
Author: Konstantin Khlebnikov <[email protected]>
Date: Wed Mar 28 14:42:54 2012 -0700

radix-tree: use iterators in find_get_pages* functions


--
MfG/Sincerely
Toralf F?rster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3

2012-06-05 10:49:15

by Richard Weinberger

[permalink] [raw]
Subject: Re: commit 0fc9d10 : chroot under kernel 3.4.x core dumps

On Tue, Jun 5, 2012 at 12:43 PM, Toralf F?rster <[email protected]> wrote:
> In the rare cases, where the chroot doesn't crash, all subsequent
> commands cores instead. Furthermore it seems, that the boinc grid
> software has problems too under kernel 3.4.1.
> All kernel 3.3.x works fine.
>
> I bisected it to :
>
> commit 0fc9d1040313047edf6a39fd4d7c7defdca97c62
> Author: Konstantin Khlebnikov <[email protected]>
> Date: ? Wed Mar 28 14:42:54 2012 -0700
>
> ? ?radix-tree: use iterators in find_get_pages* functions

After reverting commit 0fc9d1 chroot() works fine again?
(Just to make sure that the bisect is valid)

--
Thanks,
//richard

2012-06-05 10:56:06

by Konstantin Khlebnikov

[permalink] [raw]
Subject: Re: commit 0fc9d10 : chroot under kernel 3.4.x core dumps

Toralf F?rster wrote:
>
> When I try under kernel versions 3.4.[01] to chroot into a user mode
> linux image, I often get this :
>
> + mount -o loop /home/tfoerste/virtual/uml/gentoo_unstable /mnt/loop
> + mount -t proc none /mnt/loop/proc
> + mount -o bind /dev /mnt/loop/dev
> + mount -o bind /dev/pts /mnt/loop/dev/pts
> + mount -o bind /usr/portage /mnt/loop/usr/portage
> + mount -o bind /usr/local/portage /mnt/loop/usr/local/portage
> + mount -o bind /tmp/uml_portage /mnt/loop/var/tmp/portage
> + chroot /mnt/loop /bin/bash
> /home/tfoerste/workspace/bin/chr_uml.sh: line 55: 4143 Segmentation
> fault (core dumped) chroot /mnt/loop /bin/bash
>
>
> The core file itself is only 400 KB in size and the back trace with gbd
> is meaningless :
>
> Core was generated by `/bin/bash'.
> Program terminated with signal 11, Segmentation fault.
> #0 0xb75cac00 in ?? ()
> (gdb) bt
> #0 0xb75cac00 in ?? ()
> #1 0xb76f4ff4 in ?? ()
> Cannot access memory at address 0xffffffdc
>
> In the rare cases, where the chroot doesn't crash, all subsequent
> commands cores instead. Furthermore it seems, that the boinc grid
> software has problems too under kernel 3.4.1.
> All kernel 3.3.x works fine.
>
> I bisected it to :
>
> commit 0fc9d1040313047edf6a39fd4d7c7defdca97c62
> Author: Konstantin Khlebnikov<[email protected]>
> Date: Wed Mar 28 14:42:54 2012 -0700
>
> radix-tree: use iterators in find_get_pages* functions
>
>

I have two reports about this, and NFS is mentioned in both. Did you use it?

2012-06-05 13:59:17

by Toralf Förster

[permalink] [raw]
Subject: Re: commit 0fc9d10 : chroot under kernel 3.4.x core dumps

On 06/05/2012 12:55 PM, Konstantin Khlebnikov wrote:
> Toralf F?rster wrote:
>> I bisected it to :
>>
>> commit 0fc9d1040313047edf6a39fd4d7c7defdca97c62
>> Author: Konstantin Khlebnikov<[email protected]>
>> Date: Wed Mar 28 14:42:54 2012 -0700
>>
>> radix-tree: use iterators in find_get_pages* functions
>>
>>
>
> I have two reports about this, and NFS is mentioned in both. Did you use
> it?

No - my .config is attached


--
MfG/Sincerely
Toralf F?rster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3


Attachments:
config_chroot (57.08 kB)