Subject: Linux-Development Digest #28
From: Digestifier <Linux-Development-Request@senator-bedfellow.MIT.EDU>
To: Linux-Development@senator-bedfellow.MIT.EDU
Reply-To: Linux-Development@senator-bedfellow.MIT.EDU
Date:     Mon, 15 Aug 94 13:13:12 EDT

Linux-Development Digest #28, Volume #2          Mon, 15 Aug 94 13:13:12 EDT

Contents:
  FWD: Dropped TCP/IP Connection (Steve Dumbleton)
  Re: SUGGESTION for new TeX dist. (Murali Chaparala)
  Re: Linux Token Ring alpha release (Robert Kroes)
  Adaptec-2840VL SCSI driver? (Mark Biegler)
  Kernel change summary 1.1.41 -> 1.1.42 (Russell Nelson)
  Re: sbpcd ejects on umount in 1.1.44 (Chris Bagwell)
  Remote Fork() system call. (Ji)
  Programmers Wanted (Temporaerer Mitarbeiter IR)
  Intel syntax assembler available anywhere ? (Joerg-Otto Hartz)
  Re: g++ 2.6.0 kernel compiler problem (Beeblebrox)
  Re: Future of Linux (Russell Nelson)
  Re: BOCA ioAT66 serial card?? (bobs@apgea.army.mil (J. Robert Suckling ))
  Re: TERMINALS... (bobs@apgea.army.mil (J. Robert Suckling ))

----------------------------------------------------------------------------

From: 100431.3517@compuserve.com (Steve Dumbleton)
Subject: FWD: Dropped TCP/IP Connection
Date: Mon, 15 Aug 1994 13:21:44 +0000


Problem:         Dropped tcp/ip socket connection
Kernel Versions: 0.99.15 and 1.0.8.
Machine:         Dell 466/M, Dell 386.
Ethernet cards:  SMC Elite 16, WD8013, 3COM 3C509

I have an application which makes intensive use of a 
tcp/ip socket
connection to transfer data both ways between two 
machines.

Due to the multitasking nature of the task I am using 
the select() function
to decide when it is possible to transfer data, and 
read() and write() to
perform the transfers. 

The problem is that after several hours of running the 
tcp/ip connection
will be dropped. Studying the return codes for the 
select(), read() and
write() functions one of four errors will have occured.

  (1) select() returns <0,  errno set to 2 ("No such 
file or directory")
  (2) read() returns 0 (indicating EOF) errno set to 0.
  (3) read() returns <0 with errno set to 104 
("Connection reset by peer")
  (4) read() returns <0 with errno set to 32 ("Broken 
pipe")

I have reduced my client and server programs to the bare 
minimum in an
effort to isolate the cause. The source code for the 
minimum server and
client, which continually transfer 64 byte data blocks, 
is given below. In
my real application I use non-blocking reads/writes but 
this has been
omitted for clarity.

I have performed the following tests in an attempt to 
isolate the problem.
(Typical failure times are shown, in practice there is 
considerable
variance in the time-to-failure.)

 - Run client on Linux,  Run server on Linux.           
FAILURE in 30 mins
 - Run client and server on Linux using loopback.       
FAILURE in 30 mins
 - Run client on ULTRIX, Run server on Linux.           
FAILURE in 3-4hours
 - Run client on ULTRIX, Run server on ULTRIX.          
NO FAILURE (>4 days)
 - Run client on SUN-OS, Run server on SUN-OS.          
NO FAILURE (>4 days)
 - On Linux: use setsockopt() to reduced rx, tx bufsiz  
IMMEDIATE FAIL
 - On Linux: try 3 different PCs (2 x 386, 1 x 486)     
FAILURE in 30 mins
 - On Linux: try 3 different types of ethernet card     
FAILURE in 30 mins   
 - On Linux: try kernel 0.99.15 and 1.0.8               
FAILURE in 30 mins   
 - On Linux: try different ip port numbers              
FAILURE in 30 mins   

Can anyone suggest what the problem is?
Is this a known Linux bug?
Is there a mistake in my programs?
Can anyone suggest a possible work-around?

If anybody has any suggestions or answers please respond 
via e-mail as
well as posting to the newsgroup. My newsfeed is 
extremely unreliable
and I am quite likely to miss a posted reply.

TIA
Dieter Marx  

========================================================
internet::"100431.3517@CompuServe.Com"
========================================================




============ net_test.c =============

/*
 *  net_test.c - client program to provoke failure of 
tcp/ip socket connection
 *
 *  compile with:  gcc -Wall net_test.c -o net_test
 *
 *  Example use:-   net_test pct2
 */ 

#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <string.h>

#define SERVER_PORT 35432
#define PACKET_SIZE 64        

int main(argc, argv)
int argc;
char *argv[];
{
    int sock, wl, i, rdlen;
    char buff[PACKET_SIZE+1];
    struct sockaddr_in server;
    struct hostent *hp;
    long bytes_sent=0;
    long bytes_received=0;
    struct fd_set rfds, wfds;

    if (argc != 2) {
        fprintf(stderr,"usage: %s nodename\n", argv[0]);
        exit(1);
    }

    hp = gethostbyname(argv[1]);
    if (hp == NULL) {
      fprintf(stderr,"tcp/login: %s; Unknown 
Host\n",argv[1]);
      exit(2);
    }

    /* Create a socket in IP domain */
    if( (sock = socket(AF_INET, SOCK_STREAM, 0)) < 0 ) {
        perror(argv[0]);
        exit(3);
    }

    /* Specify target address for connection */
    bzero(&server, sizeof(server));
    bcopy(hp->h_addr,&server.sin_addr,hp->h_length);
    server.sin_family = hp->h_addrtype;
    server.sin_port = htons(SERVER_PORT);

    /* Connect to partner on specified node */
    if ( connect(sock, (struct sockaddr*)&server, 
sizeof(server)) < 0 ) {
        perror(argv[0]);
        exit(4);
    }
    fprintf(stderr,"Connected... Socket descriptor 
(sd=%d)\n",sock);

    /* make test packet */
    for (i=0; i < PACKET_SIZE; i++)
        buff[i] = '!';
    buff[PACKET_SIZE] = '\0';

    while(1)
    {
        FD_ZERO(&rfds);
        FD_ZERO(&wfds);

        FD_SET(sock,&rfds);
        FD_SET(sock,&wfds);

        if ((select(FD_SETSIZE,&rfds,&wfds,NULL,NULL)) 
<= 0) {
            perror("\nselect");
            break;
        }

        /* Write test packet */
        if (FD_ISSET(sock,&wfds))
        {
            if ((wl = write(sock, buff, PACKET_SIZE))  < 
PACKET_SIZE ) {
                perror("Couldn't send line over 
network");
                break;
            }
            bytes_sent += PACKET_SIZE;
        }

        /* Read returned test packet */
        if (FD_ISSET(sock,&rfds))
        {
            int len=0;
            do {
                if((rdlen = read(sock, buff, 
PACKET_SIZE)) <= 0 ) {
                    perror("Couldn't read line over 
network");
                    break;
                }
                len += rdlen;
            } while (len < PACKET_SIZE);
            bytes_received += len;
            if (rdlen <= 0) break;
        }

        fprintf(stderr,"s:%ld r:%ld d:%ld\r",bytes_sent
                                            
,bytes_received,
                                 
(bytes_sent-bytes_received));
        fflush(stderr);
    }

     /* Close link and exit */
    fprintf(stderr,"\nExiting...\n");
    close(sock);
    exit(0);
}


================ net_test_serv.c ===========

/*
 * net_test_serv.c - server program to demonstrate 
tcp/ip dropped connection
 *
 * compile with:  gcc -Wall net_test_serv.c -o 
net_test_serv
 *
 * Example use:-  net_test_serv
 */


#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/wait.h>
#include <signal.h>
#include <errno.h>
#include <string.h>

#define SERVER_PORT 35432
#define BUFSIZE 65536
#define SOMAXCONN 5

int main(argc, argv)
int argc;
char *argv[];
{
    int sock, ns, acclen, rdlen;
    char buf[BUFSIZE];
    struct sockaddr_in sockaddr, accsockaddr;

    /* Create socket in internet address family of type 
stream */
    if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0 ) {
        perror(argv[0]);
        exit(1);
    }

    bzero(&sockaddr, sizeof(struct sockaddr_in));
    sockaddr.sin_port = htons(SERVER_PORT);

    /* Bind the socket to the socket address and listen 
for a connection */
    if (bind(sock, (struct sockaddr*)&sockaddr, 
sizeof(sockaddr)) < 0 ) {
        perror(argv[0]);
        exit(2);
    }

    if( listen(sock, SOMAXCONN) < 0 ) {
        perror(argv[0]);
        exit(3);
    }

    fprintf(stderr,"Listening on port 
%d...\n",SERVER_PORT);
    do {
        acclen = sizeof(accsockaddr);
        ns = accept(sock, (struct 
sockaddr*)&accsockaddr, &acclen);
    } while( ns == -1  &&  errno == EINTR );

    fprintf(stderr,"Connected\n");

    while((rdlen = read(ns, buf, sizeof(buf))) > 0 )
        write(ns, buf, rdlen);

    perror("Disconnected");
    close(ns);
    exit(0);
}



------------------------------

From: mvc@muralipc.magnet.fsu.edu (Murali Chaparala)
Subject: Re: SUGGESTION for new TeX dist.
Date: 15 Aug 1994 13:51:49 GMT

In article <1994Aug12.142959.29571@news.cs.indiana.edu>,
Eric Jeschke <jeschke@cs.indiana.edu> wrote:

>xhdvi compiles cleanly under Linux 1.0.8 (but see the README, you need a
>quick edit of the Imakefile).  xhdvi sometimes core dumps on the first
>load of a document, but then loads it fine on the second try.  If no 
>one has tracked this bug down yet I will take a look at it.

        I have been using xhdvi_0.5b with Linux 1.0.9 with no problems.
I don't think that it ever core dumped. 
        -Murali
--
Murali Chaparala
murali@magnet.fsu.edu


------------------------------

From: robert@plasma.apana.org.au (Robert Kroes)
Subject: Re: Linux Token Ring alpha release
Date: 15 Aug 1994 14:16:25 GMT

Jason Zarin (jzarin@nyx10.cs.du.edu) wrote:

: I couldn't get this to compile.  Someone else posted a message on
: sunsite that this kernel (1.1.44-TR) was "broken."  Is this true, or
: has someone else gotten it to work?

Broken or not - I want to know more... Who is working on the project?
What's the status? Where can I get it? Gimmy, Gimmy...

I am cursed with having to use Windoze on Mess-DOS (with the obligitory
daily crashes) to run my X-server and all because we have a Token-Ring 
network (don't blame me - it wasn't my fault :-)

(Linus, have mercy on us poor Token-Ring sufferers - don't condemn us
to a life of Mess-DOS... :-)

--
-Robert Kroes-
robert@plasma.apana.org.au
-- 
-Robert Kroes-
robert@plasma.apana.org.au

------------------------------

From: biegler@aristotle.cs.uregina.ca (Mark Biegler)
Subject: Adaptec-2840VL SCSI driver?
Date: Mon, 15 Aug 1994 14:08:18 GMT

Hello,

I was wondering if Linux will recognize the 2840/2842 VL SCSI card
and be able to use it, in one way or another.  We have one of these
cards and haven't tried installing Linux with it yet.  Do we need an
additional driver?  Can it be used in some sort of emulation (1542?)
mode?

Please advise accordingly.  Thanks!

- Mark

--
Mark Biegler   (VE5MPB)                         biegler@cs.uregina.ca
Department of Computer Science                  W:  (306) 585-4110
University of Regina                            H:  (306) 522-1770
Regina, Saskatchewan  Canada  S4S 0A2           Office:  CW 307.12


------------------------------

From: nelson@crynwr.crynwr.com (Russell Nelson)
Subject: Kernel change summary 1.1.41 -> 1.1.42
Date: 15 Aug 1994 13:11:41 GMT

Lots of spelling errors in comments corrected!
Removed some unused externs.
Floppy driver forgot to set floppy size correctly.
Don't timeout the hard disk if it wasn't the current one.
If there's multiple blocks to read/write, forget that we had a request.
Fix .../drivers/char/Makefile to include n_tty.c
Make mouse_report() conditional upon CONFIG_SELECTION.
Rename con_init() to console_init().
Call the unthrottle routine when we can write to a pty.
Seagate SCSI driver got bitten by a C precedence braino (resulting in
        spurious "RESELECT timed out..." messages.
Ultrastor "fragile" asm code re-implemented.
Registering the same device with a different name now works.
Inodes for isofs_find_entry() weren't big enough.
linux/include/i386/string.h renamed to linux/include/asm/string.h.
PCI Bios changes (seems to have been totally rewritten).
Checksetup now returns zero if it worked.
Check to make sure that hlt works okay *after* we've set up the FPU.
Handle all bottom halves of interrupt handlers before going on with life.
If a tcp ack sequence is bad or old, the timer was being reset.
Timer management changed (hey, maybe this fixes the "sometimes one end
        of a tcp connection stops sending" bug!)
--
-russ <nelson@crynwr.com>    http://www.crynwr.com/crynwr/nelson.html
Crynwr Software   | Crynwr Software sells packet driver support | ask4 PGP key
11 Grant St.      | +1 315 268 1925 (9201 FAX)  | What is thee doing about it?
Potsdam, NY 13676 | LPF member - ask me about the harm software patents do.

------------------------------

From: cbagwell@aud.alcatel.com (Chris Bagwell)
Subject: Re: sbpcd ejects on umount in 1.1.44
Date: 15 Aug 1994 14:30:20 GMT
Reply-To: cbagwell@aud.alcatel.com

I also didn't want the door to open.  I actually like the idea because anytime
I manually umount the drive then it means I'm putting in another cd.  The
only problem is when I shut down the computer and the drive gets umounted.  I
don't like the idea of the door sitting open.  The door could easily get
broke that way on my desk.

I jumped from 1.1.25 to 1.1.44 so I only saw the options in one version of the
kernel.  To get the door to stop ejecting I had to comment out the define
itself.  Setting it to zero didn't work.

---
=========================================================================
[  Chris Bagwell                     |   Alcatel Network Systems        ]
[  cbagwell@aud.alcatel.com          |   Richardson, Texas              ]
=========================================================================



------------------------------

From: Ji.Whan.Kim@dcs.warwick.ac.uk (Ji)
Subject: Remote Fork() system call.
Date: Mon, 15 Aug 1994 14:45:19 GMT

Hi,

I'm implementing distributed shared memory on Linux as part of my MSc
project and at the moment I'm trying to get a remote fork() system call
working. 

I've narrowed down the information that needs to be sent to another processor
but I'm stuck with the "struct tss" in the task state segment. By looking at
how the normal fork() system call works, I've rejected some of the stuff in
the struct tss but can some kind soul tell me what the following are for and
if they need to be inherited by a child process?

__blh
__ss0h
esp1
ss1,__ss1h
esp2
ss2,__ss2h
__esh
__csh
__ssh
__dsh
__fsh
__gsh
__ldth

Looking at INIT_TSS, these are initalized to 0 so can I do the same?

Cheers,

Ji.

------------------------------

From: tempir3@gizmo.Germany.Sun.COM (Temporaerer Mitarbeiter IR)
Subject: Programmers Wanted
Date: 11 Aug 1994 15:19:30 GMT
Reply-To: tempir3@gizmo.Germany.Sun.COM

Hello World,

  I am looking for talented and highly motivated C and C++
  programmers and developers to create perfectly-tuned
  software under the GPL and thus providing a range of
  conceptually integer and coherent applications.

  Special emphasis is put on flexibility, creativity and
  the ability of working reliably in a team together with
  other people located somewhere in the world.

  Experience in Object-Oriented and/or Structured System
  Development would be helpful, also knowledge of Motif
  or XView and of course Xlib and curses.

  But please, feel free to answer if just a part of the
  features above fit in your knowledge. Your ideas are
  the most important qualification in this project.

  Please send EMail reply. Thanks.


    michael strerath || michael.strerath@Germany.Sun.COM




------------------------------

From: hartz@merlin (Joerg-Otto Hartz)
Subject: Intel syntax assembler available anywhere ?
Date: 15 Aug 1994 14:47:39 GMT

Dear Assembler-Freaks!

We are trying to port a 3D-Graphics Library from Windows to 
Linux. Unfortunately, the rendering functions are written in
Intel assembly-language and we only have AT&T assemblers (GNU). 8-(
Is there any assembler using Intel syntax running on Linux?
We don't have any information about the as86. The generated
object file should be compatible with G++.

Thank you very much for your kind help!

Henrik Behrens



------------------------------

From: M.S.Ashton@dcs.warwick.ac.uk (Beeblebrox)
Subject: Re: g++ 2.6.0 kernel compiler problem
Date: Mon, 15 Aug 1994 15:22:47 GMT

torvalds@cc.Helsinki.FI (Linus Torvalds) writes:

>Newer kernels seem to compile with 2.6.0, but I have had a few
>discouraging reports on the actual workings of those kernels.

Funny.. I've had no (new) problems since switching over.

>I'd strongly suggest not using 2.6.0 for kernel compilation: the new
>compiler seems to do bad things to inline assembly, for example.

Consistently enough for a bug report ?
___
M.S.Ashton@dcs.warwick.ac.uk              M.S.Ashton@csv.warwick.ac.uk
C++ consultant and emacs support.         Mail me if you have any problems.

------------------------------

From: nelson@crynwr.crynwr.com (Russell Nelson)
Subject: Re: Future of Linux
Date: 15 Aug 1994 14:29:17 GMT

In article <32n4pk$b7d@wumpus.cc.uow.edu.au> mai@wumpus.cc.uow.edu.au (Van Dao Mai) writes:

      1- Companies selling Linux CDs and support. They should be asked to
         donate a part of their income back into Linux development.
      2- Projects should be started and co-ordinated by talented people so
         that programmers can contribute to this in an integrated manner.
      3- Linux users should be encouraged to become members of a Global 
         Linux Club and membership fee will beused to support programmers
         working on Linux Software Projects.

These are excellent ideas, but don't you think you're biting off a
little bit much?  Any one of these ideas is going to take you quite a
effort to implement.  Maybe you should just pick one of them and run
with it?

--
-russ <nelson@crynwr.com>    http://www.crynwr.com/crynwr/nelson.html
Crynwr Software   | Crynwr Software sells packet driver support | ask4 PGP key
11 Grant St.      | +1 315 268 1925 (9201 FAX)  | What is thee doing about it?
Potsdam, NY 13676 | LPF member - ask me about the harm software patents do.

------------------------------

From: bobs@apgea.army.mil (J. Robert Suckling <bobs>)
Subject: Re: BOCA ioAT66 serial card??
Date: Mon, 15 Aug 94 12:40:50 GMT

In article <CuFy59.8GF@pe1chl.ampr.org> pe1chl@rabo.nl writes:
>In <32g0a1$ros@scapa.cs.ualberta.ca> steven@gsb019.cs.ualberta.ca (Steven Charlton) writes:
>
>>Has anyone hacked the kernel to properly support this serial card?
>>This is a 6 port, 3 UART (16550) serial card.
>
>You don't need to hack the kernel to support this card.  Just issue
>6 "setserial" commands from your /etc/rc.serial, sepcifying the I/O
>addresses and IRQs you assigned to the ports.  (IRQs may be the same)

It might have something ti do with my having to use irq4 and the
memory locations not starting with 0x220.  But the only way I could
get this card to work was by changing .../linux/drivers/char/serial.c
It seems the serial driver see some of the irq4 ports in irq3 and
setserial will not let me change'em.  My stuff is at home and I am not.
It is an easy change.

------------------------------

From: bobs@apgea.army.mil (J. Robert Suckling <bobs>)
Subject: Re: TERMINALS...
Date: Mon, 15 Aug 94 12:45:26 GMT

In article <9408120837.0C47T00@elelink.com> thomas.(the.egg)@elelink.com writes:
>
>I am hoping that this O/S is similar enough to use termcaps for different
>teriminal systems.  I am looking for a termcap for DataPoint 8242 terminals
>that is UNIX/ZENIX compatible...let me know if there is such a thing!

First of all the group comp.terminals is the right place to post this sort of thing.

Secound, I do not know anything about the DataPoint 8242 terminals, but see if there
is a setup-screen.  If so look and see if it can emulate a vt100 or some standard.
If not the people on comp.terminals seem happy to set out termcap entries.

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: Linux-Development-Request@NEWS-DIGESTS.MIT.EDU

You can send mail to the entire list (and comp.os.linux.development) via:

    Internet: Linux-Development@NEWS-DIGESTS.MIT.EDU

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    sunsite.unc.edu				pub/Linux

End of Linux-Development Digest
******************************
