Bug 973705

Summary: taskomatic daemon stops working
Product: Red Hat Satellite 5 Reporter: Dimitar Yordanov <dyordano>
Component: ServerAssignee: Tomas Lestach <tlestach>
Status: CLOSED CURRENTRELEASE QA Contact: Dimitar Yordanov <dyordano>
Severity: high Docs Contact:
Priority: medium    
Version: 560CC: cperry, mkollar, mkorbel, tgummels
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-java-2.0.2-8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-01 21:52:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 924171    
Attachments:
Description Flags
Taskomatic log with 2 accidents in it.
none
Taskomatic log with some more accidents in it from another machine. none

Description Dimitar Yordanov 2013-06-12 14:23:26 UTC
Description of problem:

Is seems that Tascomatic fails to connect to the PostgreSQL database and 
generates the following  error log messages  in /var/log/rhn/rhn_taskomatic_daemon.log

[DefaultQuartzScheduler_Worker-8] ERROR org.hibernate.event.def.AbstractFlush
ingEventListener - Could not synchronize database state with session
INFO   | jvm 1    | 2013/06/11 00:12:01 | org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual
 row count: 0; expected: 1

At this point Taskomatic stops to schedule any events.

Version-Release number of selected component (if applicable):
Satellite 5.6 Beta1

How reproducible:
Sometimes


Additional info:
INFO   | jvm 1    | 2013/06/11 00:12:01 | 1299/1300 : test-regular-Test_RPM_910-0.1-1-0.x86_64
INFO   | jvm 1    | 2013/06/11 00:12:01 | 1300/1300 : test-regular-Test_RPM_1039-0.1-1-0.x86_64
INFO   | jvm 1    | 2013/06/11 00:12:01 | Linking packages to channel.
INFO   | jvm 1    | 2013/06/11 00:12:01 | Sync completed.
INFO   | jvm 1    | 2013/06/11 00:12:01 | Total time: 7:18:11
INFO   | jvm 1    | 2013/06/11 00:12:01 | 
INFO   | jvm 1    | 2013/06/11 00:12:01 | 2013-06-11 00:12:01,047 [DefaultQuartzScheduler_Worker-8] ERROR com.redhat.rhn.taskomatic.task.RepoSy
ncTask - ERROR: Unsupported channel custom_chann_sync_repo_mon10jun2013_16_40_12_28909
INFO   | jvm 1    | 2013/06/11 00:12:01 | 
INFO   | jvm 1    | 2013/06/11 00:12:01 | 2013-06-11 00:12:01,064 [DefaultQuartzScheduler_Worker-8] ERROR org.hibernate.event.def.AbstractFlush
ingEventListener - Could not synchronize database state with session
INFO   | jvm 1    | 2013/06/11 00:12:01 | org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual
 row count: 0; expected: 1
INFO   | jvm 1    | 2013/06/11 00:12:01 |       at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:85)
INFO   | jvm 1    | 2013/06/11 00:12:01 |       at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:70)
INFO   | jvm 1    | 2013/06/11 00:12:01 |       at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:47)
INFO   | jvm 1    | 2013/06/11 00:12:01 |       at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2
421)
INFO   | jvm 1    | 2013/06/11 00:12:01 |       at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersiste
r.java:2325)
INFO   | jvm 1    | 2013/06/11 00:12:01 |       at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2
625)
INFO   | jvm 1    | 2013/06/11 00:12:01 |       at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:115)
INFO   | jvm 1    | 2013/06/11 00:12:01 |       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:278)
INFO   | jvm 1    | 2013/06/11 00:12:01 |       at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:262)
INFO   | jvm 1    | 2013/06/11 00:12:01 |       at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
INFO   | jvm 1    | 2013/06/11 00:12:01 |       at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
INFO   | jvm 1    | 2013/06/11 00:12:01 |       at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
INFO   | jvm 1    | 2013/06/11 00:12:01 |       at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1030)

Comment 1 Dimitar Yordanov 2013-06-13 11:10:08 UTC
Created attachment 760603 [details]
Taskomatic log with 2 accidents in it.

Comment 2 Dimitar Yordanov 2013-07-11 10:35:29 UTC
Created attachment 772155 [details]
Taskomatic log with some more accidents in it from another machine.

Comment 6 Tomas Lestach 2013-08-01 12:54:46 UTC
I'm not able to reproduce the error described in #Description, however the OutOfMemoryException issue noticeable in the attached logs was addressed in Bug 967194. Moving to ON_QA.

Comment 9 Clifford Perry 2013-10-01 21:52:55 UTC
Satellite 5.6 has been released. This bug was tracked under the release.  

This bug was either VERIFIED or RELEASE_PENDING (re-verified prior shortly
before release). 

Moving to CLOSED CURRENT_RELEASE. 

Text from Upgrade Erratum follows:

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.

http://rhn.redhat.com/errata/RHEA-2013-1395.html