grub-devel
[Top][All Lists]
Advanced

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

Re: gzio is broken


From: Timothy Baldwin
Subject: Re: gzio is broken
Date: Sun, 16 Oct 2005 00:05:46 +0100
User-agent: KMail/1.8.2

On Saturday 15 Oct 2005 21:53, Marco Gerards wrote:
> Timothy Baldwin <address@hidden> writes:
> > On Saturday 15 Oct 2005 18:34, Yoshinori K. Okuji wrote:
> >> On Saturday 15 October 2005 10:07 am, Yoshinori K. Okuji wrote:
> >> > > Problem 2: Reading gzip files all at once results in corruption of
> >> > > the data. It can be exposed by this patch:
> >> >
> >> > Can you investigate this problem?
> >>
> >> I don't see any problem on my laptop (i386). So this might be specific
> >> to ARM.
> >
> > It isn't, the problem shows up on my i386 desktop in grub-emu. On i386 at
> > least, it shows up with a clean source + patch from my last email:
> >
> > grub> cmp /grub2-20051007.tar /grub2-20051007.tar.gz
> > Compare `/grub2-20051007.tar' and `/grub2-20051007.tar.gz':
> > Differ at the offset 65536: 0x63 [/grub2-20051007.tar], 0x0
> > [/grub2-20051007.tar.gz]
>
> This could even be a filesystem bug or disk bug.  Can you try copying
> these files so two new files are created and compare those.  In that
> case you could see if the difference is on the same position.

That was a fat filesystem. The only common filesystem so far is Linux RieserFS 
and software raid. So I copied the gzipped files over to the Filecore FS on 
the RiscPC, and uncompressed them there. Still an incorrect zero at byte 
65536.

It often crashes on both systems, but not when running under valgrind.

Finally, valgrind points out a problem in grub_gzio_read:

==2456==
==2456== Invalid read of size 1
==2456==    at 0x8057522: memcpy (misc.c:43)
==2456==    by 0x8054826: grub_gzio_read (gzio.c:1200)
==2456==    by 0x8056D2C: grub_file_read (file.c:125)
==2456==    by 0x8049832: grub_cmd_cmp (cmp.c:68)
==2456==    by 0x805B51F: grub_command_execute (command.c:252)
==2456==    by 0x805AF93: grub_cmdline_run (cmdline.c:163)
==2456==    by 0x805C821: grub_normal_execute (main.c:490)
==2456==    by 0x805CA6D: grub_enter_normal_mode (main.c:302)
==2456==    by 0x805CAF8: grub_rescue_cmd_normal (main.c:512)
==2456==    by 0x8059910: grub_enter_rescue_mode (rescue.c:591)
==2456==    by 0x8060485: main (grub-emu.c:228)
==2456==  Address 0x1BA46363 is 3683 bytes inside a block of size 4096 free'd
==2456==    at 0x1B9003C3: free (vg_replace_malloc.c:235)
==2456==    by 0x805570A: grub_disk_read (disk.c:454)
==2456==    by 0x804C3A0: grub_fat_read_data (fat.c:373)
==2456==    by 0x804CB81: grub_fat_read (fat.c:720)
==2456==    by 0x8056D2C: grub_file_read (file.c:125)
==2456==    by 0x8053DF2: grub_gzio_open (gzio.c:209)
==2456==    by 0x8053ED7: grub_gzfile_open (gzio.c:1158)
==2456==    by 0x804973D: grub_cmd_cmp (cmp.c:49)
==2456==    by 0x805B51F: grub_command_execute (command.c:252)
==2456==    by 0x805AF93: grub_cmdline_run (cmdline.c:163)
==2456==    by 0x805C821: grub_normal_execute (main.c:490)
==2456==    by 0x805CA6D: grub_enter_normal_mode (main.c:302)
==2456==
==2456== More than 30000 total errors detected.  I'm not reporting any more.
==2456== Final error counts will be inaccurate.  Go fix your program!

-- 
Member AFFS, WYLUG, SWP (UK), UAF, RESPECT, StWC
No to software patents!    Victory to the iraqi resistance!

Attachment: pgpSIJ6EKCmdY.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]