harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weldon Washburn" <weldon...@gmail.com>
Subject Re: [drlvm] finalizer design questions
Date Tue, 26 Dec 2006 15:53:48 GMT
On 12/26/06, Gregory Shimansky <gshimansky@gmail.com> wrote:
> 2006/12/26, Weldon Washburn <weldonwjw@gmail.com>:
> >
> > On 12/25/06, Gregory Shimansky <gshimansky@gmail.com> wrote:
> > >
> > > Weldon Washburn wrote:
> > > > On 12/24/06, Gregory Shimansky <gshimansky@gmail.com> wrote:
> > > >>
> > > >> On Sunday 24 December 2006 16:23 Weldon Washburn wrote:
> [snip]
> Thanks for an interesting investigation, it is really valuable. It shows
> that production VM which you've used does not create any new threads for
> finalization. I was thinking about some legitimate scenario which could
> lead
> to a jammed finalizer queue and therefore may lead to OOME eventually. But
> later I realized that the whole java process would just hang.

The scenario which I was thinking of is if an application has a class with a
> finalizer that deals with file IO, like closing a file. On Unixes when a
> file is located on NFS filesystem, and this filesystem is disconnected,
> then
> file IO with such file (usually, depending on NFS mount options) stops the
> process. I think it is a whole process, not just one thread (correct me if
> I
> am wrong), so it wouldn't be just finalization queque which would wait for
> NFS IO, it would be all VM threads, so OOME would not happen.

hmm... there are probably several orthogonal issues in what you describe

Would the above issues be any different if finalizers were not involved?
For example, the app manually determines when to close a file on an NFS
mount.  I suspect the answer is no.

Does it make sense for a particular java app to be dependent upon an NFS
mount?  This is something that is best addressed by someone who knows the
app environment.  Stuff like service uptime agreements, network
topology/traffic , how loaded servers are, etc.  In other words, the app
programmer.  The JVM designer should be aware of these issues and know what
falls in the domain of the JVM vs. the app.

What would an app do if an NFS mount point suddenly disappeared while file
I/O is in flight?  If its really mission critical, often times the file I/O
is part of a two-phase commit transaction.  At a higher level, the
transaction aborts thus no damage is done.

What do other JVMs do when an NFS mount point disappears?  Obviously this
far away from the original topic, finalizer design.  But at some point,
someone needs to run controlled tests and tell dev list what the results

How are real java apps designed?  What do they really use finalizer for?

> Gregory

Weldon Washburn
Intel Enterprise Solutions Software Division

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message