Re: pxe failing on grub 2.00 for files larger than 50KiB

2012-09-26 Thread Vladimir 'φ-coder/phcoder' Serbinenko
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



signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: pxe failing on grub 2.00 for files larger than 50KiB

2012-09-26 Thread Colin Watson
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   [cjwat...@ubuntu.com]

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: pxe failing on grub 2.00 for files larger than 50KiB

2012-09-26 Thread Lennart Sorensen
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

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: pxe failing on grub 2.00 for files larger than 50KiB

2012-09-25 Thread Seth Goldberg

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.00 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



___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: pxe failing on grub 2.00 for files larger than 50KiB

2012-09-25 Thread Colin Watson
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   [cjwat...@ubuntu.com]

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: pxe failing on grub 2.00 for files larger than 50KiB

2012-09-25 Thread Daniel Kahn Gillmor
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



signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel