You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/10/12 12:13:42 UTC
[jira] [Assigned] (CAMEL-6832) camel-qaurtz - Memory leak - when an
exception is thrown during the scheduling phase
[ https://issues.apache.org/jira/browse/CAMEL-6832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-6832:
----------------------------------
Assignee: Claus Ibsen
> camel-qaurtz - Memory leak - when an exception is thrown during the scheduling phase
> ------------------------------------------------------------------------------------
>
> Key: CAMEL-6832
> URL: https://issues.apache.org/jira/browse/CAMEL-6832
> Project: Camel
> Issue Type: Bug
> Components: camel-quartz
> Affects Versions: 2.10.4, 2.11.0, 2.11.2
> Environment: OS - Windows 7 and Unix. Server – OSGi equinox
> Reporter: Nurali
> Assignee: Claus Ibsen
> Labels: quartz, scheduler
> Attachments: memory_leak_scheduler_stack_trace.log
>
>
> Hello,
> I have observed a memory leak for Quartz worker thread in case an exception is thrown during
> the scheduling phase when schedule is set to past time.
> I have observed this issue with camel-quart 2.10.4, 2.11.0, 2.11.2 versions.
> For ex, assuming today is 4-Oct; If a schedule is provided for yesterday (i.e 3-Oct) then
> below sequence happen:
> 1. Quartz create worker thread for new schedule [generally TEN Threads with name 'DefaultQuartzScheduler']
> 2. Camel-quartz increment jobCounter for scheduler context [using QuartzComponent.incrementJobCounter()]
> 3. Camel-quartz tries to create new schedule [using Scheduler.scheduleJob()]
> 4. scheduleJob() throws SchedulerException with the message - 'Based on configured schedule,
> the given trigger will never fire'
> 5. Camel-quartz does NOT decrement the job counter and jobCounter value remains '1'
> 6. Later Camel-Quartz stops the route and call QuartzComponent.doStop()
> 7. In doStop(), Scheduler.shutdown() supposed to be called so that those TEN threads are
> removed but to call shutdown() the pre-condition is that the jobCounter should be '0'. In
> this case jobCounter is '1' and Scheduler.shutdown() will NOT be called and those TEN threads
> are NOT removed. This is memory leak.
> Please find the stack trace in attachment 'memory_leak_scheduler_stack_trace.log' [with Camel-Quartz 2.11.2 and org.apache.servicemix.bundles.quartz-1.8.6_1
> which wrapped Quartz Scheduler as OSGi bundle] when SchedulerException is thrown at step
> 4 in above sequence.
> Thanks,
> Nurali
--
This message was sent by Atlassian JIRA
(v6.1#6144)