Bug 863518 - UnitOfWork being called twice
UnitOfWork being called twice
Status: CLOSED CURRENTRELEASE
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
0.9
Unspecified Linux
unspecified Severity high
: ---
: ---
Assigned To: Jesus M. Rodriguez
Eric Sammons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-05 13:19 EDT by Dennis Crissman
Modified: 2015-05-14 10:53 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-05 08:52:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dennis Crissman 2012-10-05 13:19:10 EDT
In production & stage we are getting this exception repeated numerous times for various jobs. From what I can tell, it seems intermittent. 

In dev I have reproduced. When I first queue up a bunch of jobs some of them (with no rhyme or reason that I can tell) execute just fine, but others seem to get stuck in a loop where this exception gets thrown and the jobs goes to sleep for a while before trying again. At some later point, the job may actually complete.

This is a high visability issue, so any help you can offer would be much appreciated.

Thanks,
Dennis



Oct 05 13:20:15 [ITClusteredScheduler_Worker-4] ERROR org.quartz.core.ErrorLogger - Unable to notify JobListener(s) of Job to be executed: (Job will NOT be executed!). trigger= async group.refresh_pools_affe1919-f1e5-431c-85c7-c99b9ef6923f trigger job= async group.refresh_pools_affe1919-f1e5-431c-85c7-c99b9ef6923f
org.quartz.SchedulerException: JobListener 'Pinsetter Job Listener' threw exception: Work already begun on this thread. Looks like you have called UnitOfWork.begin() twice without a balancing call to end() in between. [See nested exception: java.lang.IllegalStateException: Work already begun on this thread. Looks like you have called UnitOfWork.begin() twice without a balancing call to end() in between.]
	at org.quartz.core.QuartzScheduler.notifyJobListenersToBeExecuted(Unknown Source)
	at org.quartz.core.JobRunShell.notifyListenersBeginning(Unknown Source)
	at org.quartz.core.JobRunShell.run(Unknown Source)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Work already begun on this thread. Looks like you have called UnitOfWork.begin() twice without a balancing call to end() in between.
	at com.google.inject.internal.util.$Preconditions.checkState(Preconditions.java:142)
	at com.google.inject.persist.jpa.JpaPersistService.begin(JpaPersistService.java:66)
	at org.candlepin.pinsetter.core.PinsetterJobListener.jobToBeExecuted(PinsetterJobListener.java:66)
	... 4 more

Note You need to log in before you can comment on or make changes to this bug.