* pxe failing on grub 2.00 for files larger than 50KiB
@ 2012-09-25 18:55 Daniel Kahn Gillmor
2012-09-25 19:09 ` Seth Goldberg
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Kahn Gillmor @ 2012-09-25 18:55 UTC (permalink / raw)
To: Grub 2 Development List
[-- Attachment #1: Type: text/plain, Size: 3523 bytes --]
hi grub folks--
i'm using grub 2.00-5 from debian experimental.
I made a pxeboot netdir with grub-mknetdir.
i'm trying to boot from it, and i get:
error: timeout reading '/boot/grub/i386-pc/normal.mod'.
From the command prompt, i can successfully load smaller modules like
cat.mod and hello.mod, but trying to do "insmod normal" gives me the
timeout.
doing a packet capture on the tftp server, i see this:
$ tshark -n -r tftp.pcap
1 0.000000 192.168.13.114 -> 192.168.13.1 TFTP 98 Read Request, File: /boot/grub/i386-pc/cat.mod, Transfer type: octet, blksize\000=1024\000, tsize\000=0\000
2 0.002586 192.168.13.1 -> 192.168.13.114 TFTP 68 Option Acknowledgement, blksize\000=1024\000, tsize\000=2232\000
3 0.002858 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 0
4 0.003064 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 1
5 0.003741 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 1
6 0.003846 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 2
7 0.004523 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 2
8 0.004618 192.168.13.1 -> 192.168.13.114 TFTP 230 Data Packet, Block: 3 (last)
9 0.004901 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 3
10 5.189722 192.168.13.114 -> 192.168.13.1 TFTP 101 Read Request, File: /boot/grub/i386-pc/normal.mod, Transfer type: octet, blksize\000=1024\000, tsize\000=0\000
11 5.192318 192.168.13.1 -> 192.168.13.114 TFTP 70 Option Acknowledgement, blksize\000=1024\000, tsize\000=110364\000
12 5.192602 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 0
13 5.192779 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 1
14 5.193423 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 1
15 5.193537 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 2
16 5.194219 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 2
[...a bunch of TFTP data and acks snipped...]
109 5.229248 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 49
110 5.229909 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 49
111 5.230033 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 50
112 5.230699 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 50
113 5.230798 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 51
114 6.234305 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 51
115 8.238690 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 51
116 12.243560 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 51
117 14.821514 192.168.13.114 -> 192.168.13.1 TFTP 60 Error Code, Code: Not defined, Message: closed
$
any idea what's going on here? i note that normal.mod is the largest
module on the system, at 110364 bytes.
also, when i try to "cat test.txt" and test.txt is a large file, it only
prints about 32767 bytes from the file before hanging, and
then producing:
> error: timeout reading 'test.txt'
looking at the network, i see that it actually acknowledges the receipt
of 50 1024-byte chunks, even though only 32 of them are being printed.
So i'd say there's some sort of bug in this version of grub's pxe code
that makes it unable to fetch anything larger than 50KiB.
This is *not* a problem when pxebooting with grub 1.99.
can i provide any more details that would help track this down?
--dkg
[-- Attachment #2: Type: application/pgp-signature, Size: 965 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: pxe failing on grub 2.00 for files larger than 50KiB
2012-09-25 18:55 pxe failing on grub 2.00 for files larger than 50KiB Daniel Kahn Gillmor
@ 2012-09-25 19:09 ` Seth Goldberg
2012-09-25 22:00 ` Colin Watson
2012-09-26 3:25 ` Daniel Kahn Gillmor
0 siblings, 2 replies; 7+ messages in thread
From: Seth Goldberg @ 2012-09-25 19:09 UTC (permalink / raw)
To: The development of GNU GRUB
Hi,
Is it possible that debian mismerged some changes from 2.00? There is code
in tftp.c that stalls TFTP responses if >= 50 packets are queued by the
network driver. That packet count is increased by one each time
grub_net_put_packet is called and decreased by one each time
grub_net_receive_packet is called. Those packet count changes went into
revision 4505 (Implement flow control for tftp).
--S
Quoting Daniel Kahn Gillmor, who wrote the following on Tue, 25 Sep 2012:
> hi grub folks--
>
> i'm using grub 2.00-5 from debian experimental.
>
> I made a pxeboot netdir with grub-mknetdir.
>
> i'm trying to boot from it, and i get:
>
> error: timeout reading '/boot/grub/i386-pc/normal.mod'.
>
> From the command prompt, i can successfully load smaller modules like
> cat.mod and hello.mod, but trying to do "insmod normal" gives me the
> timeout.
>
> doing a packet capture on the tftp server, i see this:
>
> $ tshark -n -r tftp.pcap
> 1 0.000000 192.168.13.114 -> 192.168.13.1 TFTP 98 Read Request, File: /boot/grub/i386-pc/cat.mod, Transfer type: octet, blksize\000=1024\000, tsize\000=0\000
> 2 0.002586 192.168.13.1 -> 192.168.13.114 TFTP 68 Option Acknowledgement, blksize\000=1024\000, tsize\000=2232\000
> 3 0.002858 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 0
> 4 0.003064 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 1
> 5 0.003741 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 1
> 6 0.003846 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 2
> 7 0.004523 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 2
> 8 0.004618 192.168.13.1 -> 192.168.13.114 TFTP 230 Data Packet, Block: 3 (last)
> 9 0.004901 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 3
> 10 5.189722 192.168.13.114 -> 192.168.13.1 TFTP 101 Read Request, File: /boot/grub/i386-pc/normal.mod, Transfer type: octet, blksize\000=1024\000, tsize\000=0\000
> 11 5.192318 192.168.13.1 -> 192.168.13.114 TFTP 70 Option Acknowledgement, blksize\000=1024\000, tsize\000=110364\000
> 12 5.192602 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 0
> 13 5.192779 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 1
> 14 5.193423 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 1
> 15 5.193537 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 2
> 16 5.194219 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 2
> [...a bunch of TFTP data and acks snipped...]
> 109 5.229248 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 49
> 110 5.229909 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 49
> 111 5.230033 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 50
> 112 5.230699 192.168.13.114 -> 192.168.13.1 TFTP 60 Acknowledgement, Block: 50
> 113 5.230798 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 51
> 114 6.234305 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 51
> 115 8.238690 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 51
> 116 12.243560 192.168.13.1 -> 192.168.13.114 TFTP 1070 Data Packet, Block: 51
> 117 14.821514 192.168.13.114 -> 192.168.13.1 TFTP 60 Error Code, Code: Not defined, Message: closed
> $
>
> any idea what's going on here? i note that normal.mod is the largest
> module on the system, at 110364 bytes.
>
> also, when i try to "cat test.txt" and test.txt is a large file, it only
> prints about 32767 bytes from the file before hanging, and
> then producing:
>
>> error: timeout reading 'test.txt'
>
> looking at the network, i see that it actually acknowledges the receipt
> of 50 1024-byte chunks, even though only 32 of them are being printed.
>
> So i'd say there's some sort of bug in this version of grub's pxe code
> that makes it unable to fetch anything larger than 50KiB.
>
> This is *not* a problem when pxebooting with grub 1.99.
>
> can i provide any more details that would help track this down?
>
> --dkg
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: pxe failing on grub 2.00 for files larger than 50KiB
2012-09-25 19:09 ` Seth Goldberg
@ 2012-09-25 22:00 ` Colin Watson
2012-09-26 3:25 ` Daniel Kahn Gillmor
1 sibling, 0 replies; 7+ messages in thread
From: Colin Watson @ 2012-09-25 22:00 UTC (permalink / raw)
To: The development of GNU GRUB
On Tue, Sep 25, 2012 at 12:09:16PM -0700, Seth Goldberg wrote:
> Is it possible that debian mismerged some changes from 2.00?
It would have been extremely hard to do that by mistake, and I'm quite
confident that I didn't. All our patches are done by explicit *.patch
files in the debian/patches/ directory, and I tightened things up while
packaging 2.00 so that the packaging system now checks that there are no
changes to upstream source beyond what's in those patch files.
We don't patch tftp.c at all. Indeed, our only patch to anything under
grub-core/net/ is a backport of r4587.
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: pxe failing on grub 2.00 for files larger than 50KiB
2012-09-25 19:09 ` Seth Goldberg
2012-09-25 22:00 ` Colin Watson
@ 2012-09-26 3:25 ` Daniel Kahn Gillmor
2012-09-26 6:30 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 1 reply; 7+ messages in thread
From: Daniel Kahn Gillmor @ 2012-09-26 3:25 UTC (permalink / raw)
To: The development of GNU GRUB; +Cc: Seth Goldberg
[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]
On 09/25/2012 03:09 PM, Seth Goldberg wrote:
> Is it possible that debian mismerged some changes from 2.00?
no, i don't think so. the tarball that debian's 2.00-5 package i used
has this sha1 sum:
274d91e96b56a5b9dd0a07accff69dbb6dfb596b ../grub2_2.00.orig.tar.xz
which is the same as the upstream tarball i find at
ftp://ftp.gnu.org/gnu/grub/grub-2.00.tar.xz
and that has a date of June 28, while r4505 has a date of June 22nd.
> There is
> code in tftp.c that stalls TFTP responses if >= 50 packets are queued by
> the network driver. That packet count is increased by one each time
> grub_net_put_packet is called and decreased by one each time
> grub_net_receive_packet is called. Those packet count changes went into
> revision 4505 (Implement flow control for tftp).
hmm, r4505 introduces a hard limit of 200 in grub-core/net/tftp.c, but
the grub tarball seems to have a hard limit of 50, apparently introduced
in r4508.
come to think of it, i see grub_net_put_packet() (which increments
packs.count) in grub-core/net/tftp.c, but i see no evidence that
grub_net_remove_packet() ever gets called there.
is there something else i should look into?
--dkg
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 1030 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: pxe failing on grub 2.00 for files larger than 50KiB
2012-09-26 3:25 ` Daniel Kahn Gillmor
@ 2012-09-26 6:30 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-09-26 12:24 ` Colin Watson
2012-09-26 14:19 ` Lennart Sorensen
0 siblings, 2 replies; 7+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2012-09-26 6:30 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 613 bytes --]
On 26.09.2012 05:25, Daniel Kahn Gillmor wrote:
> On 09/25/2012 03:09 PM, Seth Goldberg wrote:
>> Is it possible that debian mismerged some changes from 2.00?
>
> no, i don't think so. the tarball that debian's 2.00-5 package i used
> has this sha1 sum:
>
> 274d91e96b56a5b9dd0a07accff69dbb6dfb596b ../grub2_2.00.orig.tar.xz
>
> which is the same as the upstream tarball i find at
>
> ftp://ftp.gnu.org/gnu/grub/grub-2.00.tar.xz
AFAIR it has an endianness bug in tftp code (which was mainly tested on
ppc). Please try bzr.
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: pxe failing on grub 2.00 for files larger than 50KiB
2012-09-26 6:30 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2012-09-26 12:24 ` Colin Watson
2012-09-26 14:19 ` Lennart Sorensen
1 sibling, 0 replies; 7+ messages in thread
From: Colin Watson @ 2012-09-26 12:24 UTC (permalink / raw)
To: The development of GNU GRUB
On Wed, Sep 26, 2012 at 08:30:45AM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> AFAIR it has an endianness bug in tftp code (which was mainly tested on
> ppc). Please try bzr.
Yes, that just occurred to me too. :-) I'll backport that patch,
thanks.
(Do we have a 2.01 plan of any kind yet? I'm accumulating a noticeable
enough stack of backports already.)
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: pxe failing on grub 2.00 for files larger than 50KiB
2012-09-26 6:30 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-09-26 12:24 ` Colin Watson
@ 2012-09-26 14:19 ` Lennart Sorensen
1 sibling, 0 replies; 7+ messages in thread
From: Lennart Sorensen @ 2012-09-26 14:19 UTC (permalink / raw)
To: The development of GNU GRUB
On Wed, Sep 26, 2012 at 08:30:45AM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> AFAIR it has an endianness bug in tftp code (which was mainly tested on
> ppc). Please try bzr.
Nifty. So endianess bugs can happen both ways. And here I thought us
big endian users were always the ones having to deal with these things. :)
--
Len Sorensen
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-09-26 14:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-25 18:55 pxe failing on grub 2.00 for files larger than 50KiB Daniel Kahn Gillmor
2012-09-25 19:09 ` Seth Goldberg
2012-09-25 22:00 ` Colin Watson
2012-09-26 3:25 ` Daniel Kahn Gillmor
2012-09-26 6:30 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-09-26 12:24 ` Colin Watson
2012-09-26 14:19 ` Lennart Sorensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.