Net 2 V1.30 on Kernel 1.0 closing sockets?

Net 2 V1.30 on Kernel 1.0 closing sockets?

Post by David Marpl » Fri, 01 Apr 1994 04:05:18



Can anyone help?  I've got a problem with 1.0 kernel and Net 2 V1.30
in relation to the closing of sockets...

I've got some software that I'm developing (ha!) that listens for
connects on port 2003.  The trouble is that when the software does a
SEGSIGV the socket goes to FIN_WAIT1 and then CLOSE, usually with a
load of stuff in the RX queue.  This is trouble, 'cos then you can't
bind to that socket again (Its still in use, apparently).  The only
solution I've found so far is a reboot, which is a bit unsatisfactory,
thats why I left DOS in the first place!

Is there something basic I'm doing wrong here?  Is it a bug?  Is there
a magic incantation at the command line to kill these CLOSE sockets?
Is there a patch? assuming that it *is* a bug!

Of course, the obvious answer is to stop my program doing SIGSEGV's,
but hey, like you've never had one?

Thanks for any help (at all, even m*support)
DAVE

 
 
 

Net 2 V1.30 on Kernel 1.0 closing sockets?

Post by Alan C » Sat, 02 Apr 1994 03:12:00



Quote:>I've got some software that I'm developing (ha!) that listens for
>connects on port 2003.  The trouble is that when the software does a
>SEGSIGV the socket goes to FIN_WAIT1 and then CLOSE, usually with a
>load of stuff in the RX queue.  This is trouble, 'cos then you can't
>bind to that socket again (Its still in use, apparently).  The only
>solution I've found so far is a reboot, which is a bit unsatisfactory,
>thats why I left DOS in the first place!

The magic incantation is

        int one=1;
        setsockopt(socket_fd,SOL_SOCKET,SO_REUSEADDR,&one,sizeof(one));

The sockets will go into close but should clear after a few minutes. There
is a real kernel bug where occasionally the kernel memory allocator for sockets
forgets some bytes and the socket (thinking itself still owning memory)
never dies off. I'm still chasing this paticularly elusive little annoyance.

Alan

 
 
 

Net 2 V1.30 on Kernel 1.0 closing sockets?

Post by Ron Smi » Mon, 04 Apr 1994 08:36:01


: Can anyone help?  I've got a problem with 1.0 kernel and Net 2 V1.30
: in relation to the closing of sockets...

: I've got some software that I'm developing (ha!) that listens for
: connects on port 2003.  The trouble is that when the software does a
: SEGSIGV the socket goes to FIN_WAIT1 and then CLOSE, usually with a
: load of stuff in the RX queue.  This is trouble, 'cos then you can't
: bind to that socket again (Its still in use, apparently).  The only
: solution I've found so far is a reboot, which is a bit unsatisfactory,
: thats why I left DOS in the first place!

: Is there something basic I'm doing wrong here?  Is it a bug?  Is there
: a magic incantation at the command line to kill these CLOSE sockets?
: Is there a patch? assuming that it *is* a bug!

: Of course, the obvious answer is to stop my program doing SIGSEGV's,
: but hey, like you've never had one?

: Thanks for any help (at all, even m*support)
: DAVE

--

What you could to is trap the SIGSEGV, empty the RX queue and then stop
the program.

                Ron Smits


/*-( My opinions are my opinions, My boss's opinions are his opinions )-*/
/*-(                They might not be the same                        )-*/

 
 
 

1. Sockets not closing w/ kernel 1.0

        Sometimes when I abort an FTp or something causes  a program
to fail it leaves the sockets stuck open, these pile up over time.
Usually they are in CLOSe or CLOSE-WAIT state.  Is there a way to
close these sockets without having to reboot?  
--
Cut word lines. --WSB--     |         /-/ a s t e shitzine
Cut music lines.            |  http://www.mcs.com/~nesta/haste.html
Smash the control images.   |   "A prank a day keeps fascism away"
Smash the control machine.  |           - Jesse Helms -    
Disclaimer: I aint MCS, and what I say aint from them kapiche?

2. Distribution got converted to all UPPERCASE! - How to convert to lower?

3. Bug fix kernel 2.0.30 for alpha (net/ipv4/ip_fw.c)

4. req: Xconfig for ViewSonic Monitor

5. X-Files v1.30, X filemanager

6. linux as intranet server - how?

7. Kernel Compile failure when installing v1.1.0.tz

8. Hostname question

9. fse2ck on bootup with v1.1.0 kernel

10. What is the best version of DOSEMU for kernel v1.1.0?

11. Nov 3rd was the 30 aniversary of Unix Time Sharing System V1!

12. Kernel v1.1.0 problem-cannot write to msdos partition

13. Errors compiling kernel v1.1.0