EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: vxWorks and ProFTPD
From: "Dale L. Brewe" <[email protected]>
To: Andrew Johnson <[email protected]>
Cc: [email protected]
Date: Wed, 01 Mar 2006 15:49:24 -0600
OK, so if I understand this, you're saying the bootROM client downloads the boot image and disconnects before the data connection is closed, before the server is listening for the command, and the server sits there waiting until it times out. But, if the bootROM client has successfully downloaded the file, shouldn't I see it boot, and then hang when it tries to download the script file because the server is still waiting on the original connection? What I see is basically nothing happening for a long time, then after the seven minutes are up, I see the vxWorks logo and such, then the script file is downloaded very quickly. Also, I've noticed a problem w/ WS_FTP trying to download the same vxWorks.st from the same server - in that case I get a graphical indicator and it looks like the file transfer itself is very abnormally slow. In any case, your suggestion seems worth a shot, even if it's so I can upgrade to solaris 9.
dale
At 02:33 PM 3/1/2006, Andrew Johnson wrote:
Hi Dale,

Dale L. Brewe wrote:
I'm having a bit of an issue trying to get tornado 2.02 to boot from a RAID network storage appliance (ReadyNAS from Infrant) running ProFTPD v.1.2.9 under a version of Linux. The problem is that downloading the boot image takes around 6-7 minutes. Downloading the script file happens normally, in a couple of seconds.

This sounds like a known issue with the vxWorks bootrom code, which closes its sockets in the wrong order. We came across this first with the Solaris 9 FTP server, which derives from a different codebase than the previous Solaris FTP servers and is less liberal in what it will accept.


There are two TCP sockets involved with an FTP file transfer, the command socket and the data socket. The vxWorks FTP library allows application code rather a lot of control over the data transfer process since it wants to allow the data socket to be connected directly to some code (such as the ld command) that can perform I/O directly on the socket without having to buffer all the data coming through it. This means that the library isn't able to completely enforce the protocol by itself, and an application can cause problems.

An FTP client is supposed to close the data socket when it's finished reading the data, and then close the command socket. Unfortunately the vxWorks bootrom code does that in the wrong order, and thus doesn't correctly follow the FTP protocol defined in RFC959. Older FTP servers don't seem to mind this, but some newer servers will not look for a new command on the command socket until the data socket has been closed (this may be for security reasons).

The fix involves applying this patch (which applies to all BSPs) to your target/config/all/bootConfig.c file, then rebuilding and flashing the bootrom.

- Andrew


Index: bootConfig.c =================================================================== RCS file: /home/phoebus/TORNADO5/cvsroot/config/all/bootConfig.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- bootConfig.c 12 Mar 2003 22:53:28 -0000 1.2 +++ bootConfig.c 22 Jan 2004 21:18:42 -0000 1.3 @@ -2492,11 +2492,11 @@

        while ((read (fd, command, sizeof (command))) > 0);
+       close (fd);

        if (bootFtp)
            (void) ftpCommand (errFd, "QUIT",0,0,0,0,0,0);
        }

-    close (fd);
     close (errFd);
     return (OK);

@@ -2510,5 +2510,6 @@

        while ((read (fd, command, sizeof (command))) > 0);
+       close (fd);

        if (bootFtp)
            {
@@ -2520,6 +2521,7 @@
        {
        char buf [100];
        int errBytesRecv = fioRead (errFd, buf, sizeof (buf));
+       close (fd);

        if (errBytesRecv > 0)
            {
@@ -2530,7 +2532,6 @@
            }
        }

-    close (fd);
     close (errFd);

return (ERROR);


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dale L. Brewe PNC-CAT/Argonne National Laboratory

ph: 630 252 0582 fax: 630 252 0580
Mail:
Argonne National Laboratory
Bldg 435E sector 20
9700 S. Cass Ave.
Argonne, IL 60439
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Replies:
Re: vxWorks and ProFTPD Andrew Johnson
References:
vxWorks and ProFTPD Dale L. Brewe
Re: vxWorks and ProFTPD Andrew Johnson

Navigate by Date:
Prev: RE: vxWorks and ProFTPD Paul Sichta
Next: Re: vxWorks and ProFTPD Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: vxWorks and ProFTPD Andrew Johnson
Next: Re: vxWorks and ProFTPD Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·