W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1999

HTFileClose never called on local files

From: Steinar Bang <sb@metis.no>
Date: 31 Aug 1999 12:31:09 +0200
To: www-lib@w3.org
Message-ID: <whr9kkfdhu.fsf@viffer.oslo.metis.no>
Platform: SuSE linux 5.3, egcs-1.1.2-pre2, libwww from the CVS checkout

I have a problem with using local files.  HTTP files work just fine,
but with local files I run into a problem after loading 50 files (the
result of HTNet_maxSocket() is 25).  I think the "wild socket" message
at the end of the trace below, is caused by the program running out of
file descriptors.

I've studied the trace below and found that HTLoadFile() is called for
each file that is loaded, but HTFileClose is never called(*).

Another strange thing is that the after filter registered for
HT_LOADED (which among other thing delete the requests) isn't called
until the very last load (which ends up in the "wild socket" message).

For HTTP files, the after filter is called a lot of times.

Has nobody been using HTLocal for a while?

- Steinar

(*)In fact grep couldn't find that HTFileClose was called from anywhere
inside the W3C libwww.

Trace for the last file loaded follows:
Request..... Created 0x841b348
ChunkStream. Chunk 0x841b480 created with max size 0
HTAccess.... Accessing document file:///home/sb/2x/mml/http/mml.metis.no/mml/metamodels/gem/delivered_by.mml
Net Before.. calling 0x41046548 (request 0x841b348, context (nil))
Net Before.. calling 0x41046484 (request 0x841b348, context (nil))
Net Object.. 0x83ae808 created with hash 50
Net Object.. starting request 0x841b348 (retry=1) with net object 0x83ae808
HTLoadFile.. Looking for `file:///home/sb/2x/mml/http/mml.metis.no/mml/metamodels/gem/delivered_by.mml'
Node........ `file:///home/sb/2x/mml/http/mml.metis.no/mml/metamodels/gem/delivered_by.mml' means path `/home/sb/2x/mml/http/mml.metis.no/mml/metamodels/gem/delivered_by.mml'
Host info... Added Net 0x83ae808 (request 0x841b348) as pending on Host 0x810a620, 1 requests made, 1 requests in pipe, 49 pending
HTLoadFile.. Pending...
Load File... Found `/home/sb/2x/mml/http/mml.metis.no/mml/metamodels/gem/delivered_by.mml'
File mode is 0100644, uid=126, gid=126. My uid=126, 1 groups ( 126)
HTFileOpen.. `/home/sb/2x/mml/http/mml.metis.no/mml/metamodels/gem/delivered_by.mml' opened 53 as NON-blocking socket
Channel..... Hash value is 53
Channel..... Added 0x841b5d8 to list 0x83ae990
Reader...... Created reader stream 0x841b650
StreamStack. Constructing stream stack for www/unknown to */*
Response.... Created 0x8423780
Error....... Add   2	Severity: 8	Parameter: `Unspecified'	Where: `HTLoadFile'
HTLoadFile.. Returning
Request..... Delete 0x82044b8
Request..... Deleting dangling output stream
Chunkstream. FREEING...
Response.... Delete 0x81e4bc0
Host Event.. wild socket 4 type = Event_Read real socket is 53
Host Event.. wild socket 4 type = Event_Read real socket is 53
Host Event.. wild socket 4 type = Event_Read real socket is 53
(and then it's "wild socket" all the way to the bottom)
Received on Tuesday, 31 August 1999 06:31:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:52 UTC