commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Schulte (JIRA)" <>
Subject [jira] Commented: (POOL-122) java.util.Timer in EvictionTimer does not recover from OutOfMemoryError in Evictor
Date Sat, 02 Feb 2008 19:14:08 GMT


Marcus Schulte commented on POOL-122:

I can see your argument, but still want to put forward that
   - If you encounter an OOME in one thread you will very probably also see it in others,
among them, for example, the main worker threads of the container (or your main-thread).
  - All containers I know log the error, if it occurs in a thread controlled by them,  and
continue to work as well as they can. 
  - The current implementation silently swallows Exception which is not that much better when
it comes to error diagnostics.
  - Instead, one could catch Throwable and log to stderr - which is basically what the vm
does anyway -- minus terminating the evictor-thread.

> java.util.Timer in EvictionTimer does not recover from OutOfMemoryError in Evictor
> ----------------------------------------------------------------------------------
>                 Key: POOL-122
>                 URL:
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: any
>            Reporter: Marcus Schulte
>         Attachments: fixes_POOL-122.patch
> catches and ignores Exceptions, but not Errors,
like OOME. Consequently, when, due to load-peeks an OOME is thrown in the evictor's timer-thread
it dies miserably and no eviction will happen again in any of the pools loaded within the
same class-loader (because the eviction timer is a static member). Also, the creation of evicting
pools will fail with IllegalStateException.
> Possible fixes:
>    1. catch Throwable in
>    2. check and eventually re-instantiate the Eviction-Timer.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message