Hi,

On Tuesday 22 September 2009 03:23:08 Justus Winter wrote:
> I encountered this bug since I build a custom kernel that didn't used an
> initrd.
>
> To produce an core dump, use the attached wrapper script and change
> /etc/init.d/early-readahead to use it instead of /sbin/readahead (idea
> taken from https://bugzilla.redhat.com/show_bug.cgi?id=500946).
>
> In my case the problem is that readahead fails to check the return value
> of blkid_devno_to_devname in get_file_device/readahead.c.
>
> The comment in devno.c from libblkid clearly states that
> blkid_devno_to_devname might fail and return NULL (that's what leads to
> the segmentation fault when NULL is handed to ext2fs_open), so this is
> definitively a bug in readahead-fedora.

Ah, indeed. I looked for unhandled return values the other day but I missed 
that blkid_ call. Seems like libblkid could use some help to have a proper 
documentation :)

>
> I am not sure whats the big picture here, but that's whats happening:
>
> I added some tracing to readahead.c and blkid_devno_to_devname fails
> when called with 2053 as argument. A quick test with the attached
> blkid.c says that this device number resolves to /dev/root, but when
> early-readahead is run on an system without an initrd, there is no
> /dev/root (on my system it's symlinked to my root partition later on, I
> suspect udev does this, not sure though...).

Yes, that should be udev (reason why when I asked the original bug reporter to 
see if it worked by making the early readahead start right after udev it 
succeeded).
By adding
if (!devices[i].name)
        return NULL;
to get_file_device all it would do would be to skip the group inodes 
preloading part. Not sure how to address that, yet.

I will upload a new version as soon as I get the testing migration 
notification.

Thanks.

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to