Bug 777882 (SOA-410)

Summary: bpm_orchestration2 generates "org.hibernate.StaleObjectStateException" errors on multi-cpu systems
Product: [JBoss] JBoss Enterprise SOA Platform 4 Reporter: Jehudi Castro Sierra <jcastro>
Component: JBPM - within SOAAssignee: Tom Baeyens <mail>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 4.2 CR3CC: mvecera
Target Milestone: ---   
Target Release: 4.2 CP01   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-410
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Linux - JBoss SOA Platform - ESB Standalone Server - Version 4.2.0.CR3
Last Closed: 2008-03-27 17:33:34 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:
Bug Depends On:    
Bug Blocks: 777949    
Attachments:
Description Flags
server.log.tar.gz
none
server.log.gz
none
server.log.gz none

Description Jehudi Castro Sierra 2008-02-11 12:35:00 UTC
Date of First Response: 2008-02-11 08:06:08
project_key: SOA

when execute ant startProcess the exception is thrown (the QS still pass though), see the logs attached

Comment 1 Jehudi Castro Sierra 2008-02-11 12:35:37 UTC
Attachment: Added: server.log.tar.gz


Comment 2 Jehudi Castro Sierra 2008-02-11 12:38:51 UTC
Link: Added: This issue is related to SOA-409


Comment 4 Jehudi Castro Sierra 2008-02-11 13:17:11 UTC
Fedora 7, HSQLDB
model name      : Intel(R) Xeon(R) CPU            5110  @ 1.60GHz
cpu cores       : 2

Comment 6 Jehudi Castro Sierra 2008-02-11 15:39:34 UTC
This is my info:

$ cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Xeon(R) CPU            5110  @ 1.60GHz
stepping        : 6
cpu MHz         : 1596.024
cache size      : 4096 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm
bogomips        : 3194.05
clflush size    : 64

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Xeon(R) CPU            5110  @ 1.60GHz
stepping        : 6
cpu MHz         : 1596.024
cache size      : 4096 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx tm2 ssse3 cx16 xtpr dca lahf_lm
bogomips        : 3191.87
clflush size    : 64


And I'm getting the error also on *windows* (VMWare) 

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
type            : primary processor
cpu family      : 6
model           : 15
model name      : Intel(R) Xeon(R) CPU            5110  @ 1.60GHz
stepping        : 6
brand id        : 0
cpu count       : 2
apic id         : 1
cpu MHz         : 1596
fpu             : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clfl dtes acpi mmx fxsr sse sse2 ss htt tmi pbe pni monitor ds_cpl est

processor       : 1
vendor_id       : GenuineIntel
type            : primary processor
cpu family      : 6
model           : 15
model name      : Intel(R) Xeon(R) CPU            5110  @ 1.60GHz
stepping        : 6
brand id        : 0
cpu count       : 2
apic id         : 0
cpu MHz         : 1596
fpu             : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clfl dtes acpi mmx fxsr sse sse2 ss htt tmi pbe pni monitor ds_cpl est

Comment 7 Len DiMaggio 2008-02-11 18:33:28 UTC
Link: Added: This issue related SOA-417


Comment 8 Aleksandar Kostadinov 2008-02-13 18:12:59 UTC
I tried this one 100 times with a local mysql instance to avoid network delays and it didn't occur. On a 2 CPU dual core AMD CPU.

Comment 9 Aleksandar Kostadinov 2008-02-13 18:23:48 UTC
Link: Added: This issue related SOA-415


Comment 10 Aleksandar Kostadinov 2008-02-14 14:54:25 UTC
All tier1 databases tested to not produce any errors in 100 runs. So probably it's hsqldb that doesn't support transactions. Marking as passed in testify.

Comment 11 Kevin Conner 2008-03-18 14:04:38 UTC
Link: Removed: This issue is related to SOA-409 


Comment 12 Len DiMaggio 2008-03-18 15:15:09 UTC
Just to confirm - with the GA bits - and the out of the box configuration (standalone server, default profile, hsqldb/h2) - the problem is seen on a multi-cpu system:

 2008-03-18 07:00:06,530 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.graph.exe.Token#1]

See line 42112 in attached file.


[jboss@stacks2 bin]$ cat /proc/cpuinfo 
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 33
model name      : AMD Opteron(tm) Processor 275
stepping        : 2
cpu MHz         : 2205.026
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni cmp_legacy ts fid vid ttp
bogomips        : 5514.05

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 33
model name      : AMD Opteron(tm) Processor 275
stepping        : 2
cpu MHz         : 2205.026
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow up pni cmp_legacy ts fid vid ttp
bogomips        : 5514.05

processor       : 2
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 33
model name      : AMD Opteron(tm) Processor 275
stepping        : 2
cpu MHz         : 2205.026
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow up pni cmp_legacy ts fid vid ttp
bogomips        : 5514.05

processor       : 3
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 33
model name      : AMD Opteron(tm) Processor 275
stepping        : 2
cpu MHz         : 2205.026
cache size      : 1024 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow up pni cmp_legacy ts fid vid ttp
bogomips        : 5514.05

[jboss@stacks2 bin]$ 



Comment 13 Len DiMaggio 2008-03-18 15:15:09 UTC
Attachment: Added: server.log.gz


Comment 14 Len DiMaggio 2008-03-18 17:22:02 UTC
The problem does seem to be specific to an out-of-the box configuration with hsqldb/h2. 

With postgres as the DB, the problem is not seen. See attached server.log file.

So - Alex's comment:
   http://jira.jboss.com/jira/browse/SOA-410#action_12399439

Is correct - as hsqldb/h2 are not tier1 DBs - but - the error will be seen by customers running the quickstart with the out-of-the box configuration of hsqldb/h2. 

Comment 15 Len DiMaggio 2008-03-18 17:22:02 UTC
Attachment: Added: server.log.gz


Comment 16 Len DiMaggio 2008-03-18 18:31:16 UTC
Question - is this also a problem with H2 - ala:  http://jira.jboss.com/jira/browse/SOA-409#action_12403386


Comment 17 Mark Little 2008-03-27 17:33:17 UTC
Link: Added: This issue is a dependency of SOA-479


Comment 18 Mark Little 2008-03-27 17:33:34 UTC
Agreed with Len to document this and close.

Comment 19 nwallace 2008-09-26 06:04:30 UTC
Link: Added: This issue related SOA-869