dev@glassfish.java.net

Re: is quicklook working right now?

From: Richard S. Hall <heavy_at_ungoverned.org>
Date: Sun, 11 Oct 2009 13:41:39 +0200

On 10/11/09 12:33, Richard S. Hall wrote:
> On 10/11/09 12:31, Richard S. Hall wrote:
>> On 10/11/09 8:15, Bill Shannon wrote:
>>> Richard S. Hall wrote on 10/10/09 2:34 AM:
>>>> On 10/10/09 11:16, Richard S. Hall wrote:
>>>>> On 10/10/09 0:57, Bill Shannon wrote:
>>>>>> Jeanfrancois Arcand wrote on 10/09/09 14:55:
>>>>>>> Can you grab a lsof/pfiles snapshot when it runs? It might now
>>>>>>> be GF
>>>>>>> itself but Maven.
>>>>>> It's GlassFish/Felix. Here's a snapshot. Over 700 open files!!!
>>>>>> Yow!!!
>>>>>>
>>>>>> It looks like Felix is opening many things twice. Almost 300 are
>>>>>> dups.
>>>>> You will be happy to know that in 2.0.1, which will be released next
>>>>> week, I've modified the cache to avoid opening each bundle JAR file
>>>>> twice (previously, it was once to get the manifest and then once when
>>>>> the bundle was going to use its content). So, perhaps we can check
>>>>> this again once we integrate with 2.0.1.
>>>> For clarification...are you saying it has duplicate files open at the
>>>> same time or that it opened duplicate files? The former should not be
>>>> true, while the latter is/was true for 2.0.0. I have done long-running
>>>> tests with Felix, so I am fairly confident it closes its files. If
>>>> it is
>>>> the latter, then this should be addressed to at least some degree
>>>> in the
>>>> next maintenance release.
>>> I don't understand the distinction you're making.
>>>
>>> You can see in the listing I provided what's happening. The same file
>>> is open on two different file descriptors, for 300 different files.
>>>
>>>
>>
>> Felix should be opening the a bundle JAR file once to get the
>> manifest, then closing it. Shortly thereafter, it will open it to get
>> classes and keeps it open. So even though it opened the bundle JAR
>> file twice, it only keeps it open once.
>
> p.s. I will also look into it more closely to see if I spot anything.

So, after looking into this more, I think it is either a) not entirely
accurate or b) not something we can control.

I set a break point where Felix opens the the first bundle JAR file
using JarFile. Before creating the JarFile there was no open bundle JAR
files, after it there were two. I even created a simple test program
that only opens a JarFile in its main method and sleeps for 30 seconds.
This is what I saw:

java 14129 rickhall 30r REG 14,2 846 43270278
/Users/rickhall/tmp/jar/jar.jar
java 14129 rickhall 31r REG 14,2 846 43270278
/Users/rickhall/tmp/jar/jar.jar

So, it seems JarFile always reports two open files. Not sure why.

-> richard

>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>