nexus-p2-bridge-plugin: Temp Files Not Removed (p2-agent-*)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

nexus-p2-bridge-plugin: Temp Files Not Removed (p2-agent-*)

Mirko Swillus
Hej,

my handmade nexus-p2-tycho-aggregator-plugin uses the merge-method on
the Artifact / MetadataRepository to merge two p2 repositories, just
like the way the nexus-p2-repository-plugin from Sonatype does.

Everything works fine so far, but obviously there is an issue with
deleting temporary directories which are generated in
/sonatype-work/tmp/. I debugged my plugin and found out they are
generated within the merge-call. The folders are named
'p2-agent-23422342' for example, and they are never deleted. Since we
are using this feature for a lot of projects, it comes to a huge amount
of directories, more than 100.000 per week (I'm deleting them by a cron
job).

Maybe someone can provide a hint, whether this is

- a bug within the Sonatype p2 Plug-Ins
- a bug within the Eclipse p2 Runtime
- my misusing of the API (see this call for an example [0])?

Thanks in advance,
Mirko


[0]
https://github.com/mechko/nexus-p2-tycho-aggregator-plugin/blob/master/src/main/java/com/qualitype/nexus/plugins/tycho/internal/DefaultP2TychoRepositoryAggregator.java#L574










____________________________________________________________________

[ M i r k o  S w i l l u s ]

    Software Development

    Qualitype AG
    Quality Management Systems | Bioinformatics
    Moritzburger Weg 67 | 01109 Dresden
    fon +49.351.8838 2813 | fax +49.351.8838 2809
    e-mail: [hidden email] | http://www.qualitype.de

    Sitz der Gesellschaft: Dresden | Amtsgericht Dresden HRB 19830
    Vorstand: Dr. Wilhelm Zörgiebel | Dr. Frank Götz
    Aufsichtsratsvorsitz: Prof. Dr. Gerhard P. Fettweis
____________________________________________________________________

The information in this email and any attachments is confidential and is
intended for the addressee only. If you are not the intended recipient,
please delete this message and any attachments and advise the sender by
return email.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: nexus-p2-bridge-plugin: Temp Files Not Removed (p2-agent-*)

nabcos
That's probably caused by [1], these temporary directories would be
removed on a Nexus restart.

[1] https://github.com/sonatype/p2-bridge/blob/develop/org.sonatype.p2.bridge.impl/src/main/java/org/sonatype/p2/bridge/internal/MetadataRepositoryService.java#L441

Ben

On Fri, Aug 24, 2012 at 11:32 AM, Mirko Swillus <[hidden email]> wrote:

> Hej,
>
> my handmade nexus-p2-tycho-aggregator-plugin uses the merge-method on the
> Artifact / MetadataRepository to merge two p2 repositories, just like the
> way the nexus-p2-repository-plugin from Sonatype does.
>
> Everything works fine so far, but obviously there is an issue with deleting
> temporary directories which are generated in /sonatype-work/tmp/. I debugged
> my plugin and found out they are generated within the merge-call. The
> folders are named 'p2-agent-23422342' for example, and they are never
> deleted. Since we are using this feature for a lot of projects, it comes to
> a huge amount of directories, more than 100.000 per week (I'm deleting them
> by a cron job).
>
> Maybe someone can provide a hint, whether this is
>
> - a bug within the Sonatype p2 Plug-Ins
> - a bug within the Eclipse p2 Runtime
> - my misusing of the API (see this call for an example [0])?
>
> Thanks in advance,
> Mirko
>
>
> [0]
> https://github.com/mechko/nexus-p2-tycho-aggregator-plugin/blob/master/src/main/java/com/qualitype/nexus/plugins/tycho/internal/DefaultP2TychoRepositoryAggregator.java#L574
>
>
>
>
>
>
>
>
>
>
> ____________________________________________________________________
>
> [ M i r k o  S w i l l u s ]
>
>    Software Development
>
>    Qualitype AG
>    Quality Management Systems | Bioinformatics
>    Moritzburger Weg 67 | 01109 Dresden
>    fon +49.351.8838 2813 | fax +49.351.8838 2809
>    e-mail: [hidden email] | http://www.qualitype.de
>
>    Sitz der Gesellschaft: Dresden | Amtsgericht Dresden HRB 19830
>    Vorstand: Dr. Wilhelm Zörgiebel | Dr. Frank Götz
>    Aufsichtsratsvorsitz: Prof. Dr. Gerhard P. Fettweis
> ____________________________________________________________________
>
> The information in this email and any attachments is confidential and is
> intended for the addressee only. If you are not the intended recipient,
> please delete this message and any attachments and advise the sender by
> return email.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: nexus-p2-bridge-plugin: Temp Files Not Removed (p2-agent-*)

Mirko Swillus
Hej Ben,

Am 24.08.2012 12:58, schrieb Benjamin Hanzelmann:

> That's probably caused by [1], these temporary directories would be
> removed on a Nexus restart.
>
> [1] https://github.com/sonatype/p2-bridge/blob/develop/org.sonatype.p2.bridge.impl/src/main/java/org/sonatype/p2/bridge/internal/MetadataRepositoryService.java#L441

I see, thank you so much for the link. This deleteOnExit works obviously
not always (maybe there is some timeout in the nexus stop routine that
kills the JVM finally, or the file is still open). But apart from this I
consider this general behavior of deleting temp files only on shutdown
as a serious bug.

Our goal is to run nexus as a service like others and not having to
restart it periodically (because otherwise the huge amount of temp
folders is going to kill the whole system).

I just filed a bug for the record:

https://issues.sonatype.org/browse/NEXUS-5225

Kind Regards,

Mirko





---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: nexus-p2-bridge-plugin: Temp Files Not Removed (p2-agent-*)

Peter Lynch-2
Thanks for filing the issue report.

We will triage this report next week.

-Peter


On Fri, Aug 24, 2012 at 10:31 AM, Mirko Swillus <[hidden email]> wrote:
Hej Ben,

Am <a href="tel:24.08.2012%2012" value="+12408201212" target="_blank">24.08.2012 12:58, schrieb Benjamin Hanzelmann: I see, thank you so much for the link. This deleteOnExit works obviously not always (maybe there is some timeout in the nexus stop routine that kills the JVM finally, or the file is still open). But apart from this I consider this general behavior of deleting temp files only on shutdown as a serious bug.

Our goal is to run nexus as a service like others and not having to restart it periodically (because otherwise the huge amount of temp folders is going to kill the whole system).

I just filed a bug for the record:

https://issues.sonatype.org/browse/NEXUS-5225

Kind Regards,

Mirko






---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]