TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Phil Crown
from: Mike Bilow
date: 1997-01-25 11:31:30
subject: ftpapi resource leak

Phil Crown wrote in a message to Mike Bilow:

 PC> You posted a message a while back about a resource leak in
 PC> ftpapi (or rxftp?).

 PC> Can you please repost?

I think this is what you want.
 
-- Mike


Date : Nov 15 '96, 16:29                                                   Loc 
From : Mike Bilow                                              1:323/107
To   : All                                 
Subj : OS/2 socket exhaustion: follow-up                                     
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

I found out why my OS/2 Warp 3 Connect system is running out of sockets every
five to seven days and requiring reboot.  The UN00067/WR08210 services (which
must be applied together for OS/2 Warp 3 Connect) break the FtpPing() function
in the FTP API.  Each time it is called, a socket is leaked in RAW mode and the
ping does not work.

Note that the FtpPing() function in the FTP API is not quite the same thing as
the PING.EXE command which can be run from the command line, and that PING.EXE
apparently does not use FtpPing() in the FTP API to do its thing; FtpPing() does
not work at all after the services are applied, while PING.EXE continues to work
fine.

The actual cause of the socket exhaustion was the call being made from my
FTPHUBC.CMD Rexx script to FtpPing(), used to test the network.  Users of my
Fidonet echomail transfer Rexx script experiencing this problem should, as a
workaround, modify "Do 3" to "Do 0" on line 142 in the
12 Jul 96 release. 
Disabling the ping facility can cause the script to take longer to realize that
the FTP hub is unreachable, perhaps as long as two minutes, but will have no
effect as long as the network is up and the FTP hub is reachable.   The
workaround described will also cause spurious log entries like "FTPH Ping to
ftp.sstar.com required 0 ms" which can be safely ignored.

FtpPing() is known to work in the base OS/2 Warp 3 IAK or OS/2 Warp 3 Connect
TCP/IP stacks, and also with service IC12657 applied.  This problem only appears
in connection with the UN00067/WR08210 services.  Its status relative to OS/2
Warp 4 (Merlin) is unknown to me.

To determine if your sockets are being leaked, use the "netstat
-s" command.  A
normal display will show something like this, or even less:

--------------------------------------------------------------------------
                          AF_INET Address Family :

SOCK     TYPE     FOREIGN PORT     LOCAL PORT     FOREIGN HOST     STATE
====  =========  =============   =============   =============  ==========
13       DGRAM              0      domain..53         0.0.0.0    UDP
12      STREAM              0      domain..53         0.0.0.0    LISTEN
11       DGRAM              0        time..37         0.0.0.0    UDP
10      STREAM              0        time..37         0.0.0.0    LISTEN
9        DGRAM              0     daytime..13         0.0.0.0    UDP
8       STREAM              0     daytime..13         0.0.0.0    LISTEN
7        DGRAM       cmd..514            1024       127.0.0.1    UDP
4        DGRAM              0      ntalk..518         0.0.0.0    UDP
--------------------------------------------------------------------------

If sockets are being leaked, numerous sockets with "0.0.0.0"
listed as both the
local and foreign port with state "RAW" will appear and not go away.

Anyone interested in obtaining the Rexx script for Fidonet FTP hub transfers is
invited to FReq (1:323/107) or download (+1 401 944 8498):

FP960712.ZIP    9K  7-12-96  Fidonet FTP Hub Client for OS/2, Rexx with source
                             by Mike Bilow, 1:323/107
 
-- Mike


--- 
* Origin: N1BEE BBS +1 401 944 8498 V.34/V.FC/V.32bis/HST16.8 (1:323/107)
SEEN-BY: 50/99 54/99 270/101 620/243 625/110 160 711/401 413 430 808 934
SEEN-BY: 712/311 407 505 506 517 623 624 704 713/317 800/1
@PATH: 323/107 396/1 270/101 712/624 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.