Bug 1594305 - Failed to auto-calculate baselines due to TransientPropertyValueException: object references an unsaved transient instance org.rhq.core.domain.measurement.MeasurementSchedule.baseline -> org.rhq.core.domain.measurement.MeasurementBaseline
Summary: Failed to auto-calculate baselines due to TransientPropertyValueException: ob...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Monitoring -- Other
Version: JON 3.3.10
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER01
: JON 3.3.11
Assignee: Michael Burman
QA Contact: Filip Brychta
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-22 15:10 UTC by Larry O'Leary
Modified: 2023-10-06 17:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 17:07:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Excerpt from server.log showing failed RHQScheduler_Worker-1 thread (47.64 KB, text/plain)
2018-06-22 15:10 UTC, Larry O'Leary
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2930 0 None None None 2018-10-16 17:08:51 UTC

Description Larry O'Leary 2018-06-22 15:10:08 UTC
Created attachment 1453756 [details]
Excerpt from server.log showing failed RHQScheduler_Worker-1 thread

Description of problem:
Baseline calculation is failing resulting in the transaction being rolled back. It is not clear what causes this or at what point it happens. Log excerpt is attached which includes relevant debug output for the baseline calc job thread.

The stack trace:

18:01:59,829 WARN  [com.arjuna.ats.arjuna] (RHQScheduler_Worker-1) ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffff0a7bca12:-3211a2d0:1c3d1a7c:835f1, org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization@b5146ac2 >: java.lang.IllegalStateException: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing: org.rhq.core.domain.measurement.MeasurementSchedule.baseline -> org.rhq.core.domain.measurement.MeasurementBaseline
	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1384) [hibernate-entitymanager-4.2.27.Final-redhat-1.jar:4.2.27.Final-redhat-1]
	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310) [hibernate-entitymanager-4.2.27.Final-redhat-1.jar:4.2.27.Final-redhat-1]
    ...
	at org.rhq.enterprise.server.measurement.MeasurementBaselineManagerLocal$$$view11.saveNewBaselines(Unknown Source) [rhq-server.jar:4.12.0.JON330GA-redhat-9]
	at org.rhq.enterprise.server.measurement.MeasurementBaselineManagerBean.saveNewBaselinesChunk(MeasurementBaselineManagerBean.java:311) [rhq-server.jar:4.12.0.JON330GA-redhat-9]
	at org.rhq.enterprise.server.measurement.MeasurementBaselineManagerBean.saveNewBaselines(MeasurementBaselineManagerBean.java:301) [rhq-server.jar:4.12.0.JON330GA-redhat-9]
	at org.rhq.enterprise.server.measurement.MeasurementBaselineManagerBean.calculateBaselines(MeasurementBaselineManagerBean.java:280) [rhq-server.jar:4.12.0.JON330GA-redhat-9]
    ...
	at org.rhq.enterprise.server.measurement.MeasurementBaselineManagerLocal$$$view11.calculateBaselines(Unknown Source) [rhq-server.jar:4.12.0.JON330GA-redhat-9]
	at org.rhq.enterprise.server.measurement.MeasurementBaselineManagerBean.calculateAutoBaselines(MeasurementBaselineManagerBean.java:206) [rhq-server.jar:4.12.0.JON330GA-redhat-9]
    ...
	at org.rhq.enterprise.server.measurement.MeasurementBaselineManagerLocal$$$view11.calculateAutoBaselines(Unknown Source) [rhq-server.jar:4.12.0.JON330GA-redhat-9]
	at org.rhq.enterprise.server.measurement.MeasurementBaselineManagerBean.calculateAutoBaselines(MeasurementBaselineManagerBean.java:134) [rhq-server.jar:4.12.0.JON330GA-redhat-9]
    ...
	at org.rhq.enterprise.server.measurement.MeasurementBaselineManagerLocal$$$view11.calculateAutoBaselines(Unknown Source) [rhq-server.jar:4.12.0.JON330GA-redhat-9]
	at org.rhq.enterprise.server.scheduler.jobs.DataCalcJob.calculateAutoBaselines(DataCalcJob.java:116) [rhq-server.jar:4.12.0.JON330GA-redhat-9]
	at org.rhq.enterprise.server.scheduler.jobs.DataCalcJob.executeJobCode(DataCalcJob.java:84) [rhq-server.jar:4.12.0.JON330GA-redhat-9]
	at org.rhq.enterprise.server.scheduler.jobs.AbstractStatefulJob.execute(AbstractStatefulJob.java:48) [rhq-server.jar:4.12.0.JON330GA-redhat-9]
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-1.6.5.jar:1.6.5]
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) [quartz-1.6.5.jar:1.6.5]
Caused by: org.hibernate.TransientPropertyValueException: object references an unsaved transient instance - save the transient instance before flushing: org.rhq.core.domain.measurement.MeasurementSchedule.baseline -> org.rhq.core.domain.measurement.MeasurementBaseline


Version-Release number of selected component (if applicable):
3.3.10

Comment 1 Michael Burman 2018-06-25 10:29:48 UTC
Fixed in the master (assuming I guessed the correct reason based on this quite limited information):

commit 75211fae4e10f846023158091023b3e87677ea4a (HEAD -> master, upstream/master)
Author: Michael Burman <miburman>
Date:   Mon Jun 25 13:28:25 2018 +0300

    [BZ 1594305] Do not change schedule instance ownership if the baseline includes NaNs. Move the NaN detection before the set methods (instead of only avoiding persist)

Comment 6 errata-xmlrpc 2018-10-16 17:07:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2930


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