public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Stephen Crawley <crawley@dstc.edu.au>
Cc: Noa Resare <noa@resare.com>,
	Mauve Discuss <mauve-discuss@sources.redhat.com>,
	crawley@piglet.dstc.edu.au
Subject: Re: gnu/testlet/java/nio/channels/FileChannel/manyopen.java broken
Date: Fri, 08 Oct 2004 10:05:00 -0000	[thread overview]
Message-ID: <1097229925.1087.10.camel@localhost> (raw)
In-Reply-To: <200410080647.i986l9QQ020343@piglet.dstc.edu.au>

[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]

Hi,

On Fri, 2004-10-08 at 08:47, Stephen Crawley wrote:
> noa@resare.com said:
> > Since the test doesn't actually test for anything other than the
> > ability to open many files and the extent of that ability isn't
> > specified in any spec that I'm aware of I suggest that we remove the
> > test. 
> 
> Agreed.  It should be deleted.
> 
> This testcase previously used to also (indirectly) check that orphaned file
> handles were closed by garbage collection finalization.  However, this
> was done by explicitly calling System.gc(), and thus was even more broken
> that the current version of the testcase.

As the person that wrote this test let me explain why I wrote it and
what I think should be tested.

We had a problem with real programs that open lots of files quickly
(gjdoc does this for example, a jar tool or a webserver might be another
good example) and don't explicitly close these files, but let the
file/stream just get garbage collected since the program structure
doesn't explicitly define a "owner" for the file/stream object (which
isn't that uncommon since that is what you normally do with random
allocated objects, long life the garbage collector!).

What I think should be tested is whether a program can open lots of
files. And that the systems notices that stale file handle resources can
be removed so that a program can keep opening files if needed. (As long
as there are no large number of life file handles open at the same
time.)

Since I have seen multiple systems get this wrong in various ways I want
to have an explicit test for this situation. It might be that this test
does not simulate a real world program correctly, so if there are
alternatives I would like to hear them instead of just deleting the test
since some systems fail it.

Cheers,

Mark

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-10-08 10:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-08  6:35 Noa Resare
2004-10-08  6:47 ` Stephen Crawley
2004-10-08 10:05   ` Mark Wielaard [this message]
2004-10-08 11:07     ` Noa Resare
2004-10-08 17:00     ` Thomas Zander
2004-10-11  0:50     ` Stephen Crawley
2004-10-11  6:39 Jeroen Frijters

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1097229925.1087.10.camel@localhost \
    --to=mark@klomp.org \
    --cc=crawley@dstc.edu.au \
    --cc=crawley@piglet.dstc.edu.au \
    --cc=mauve-discuss@sources.redhat.com \
    --cc=noa@resare.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).