| Summary: | Locked SE thread during ConcurrencyManager.acquire() in custom toString() on LAZY IndirectList @OneToMany field | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Michael OBrien <michael.f.obrien> | ||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||
| Status: | NEW --- | QA Contact: | |||||
| Severity: | minor | ||||||
| Priority: | P4 | CC: | eclipselink.foundation-inbox, martin.grebac, michael.f.obrien, tom.ware | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | concurrency | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 455043 | ||||||
| Attachments: |
|
||||||
|
Description
Michael OBrien
Created attachment 185891 [details]
SE Eclipse 3.5 JPA project reproduction and model
>Essentially, this issue occurs if we trigger indirect instantiation by printing LAZY relationships while debugging or in a println()
If we toString() a simpler flat representation of the entity we are OK
>3rd option) use
if(!(processors instanceof IndirectList)) { // from core
for(Processor<P> processor : processors) { // this for:each loop may hang on an indirectList for LAZY fetchType
>Discussed this with team Was a previously known issues - we don't know which side of the relationship will lock first. >reproduction of this obscure use-case was A bidirectional @OneToMany mixed LAZY/EAGER relationship is debugged on the OneToMany inverse side when the collection is still lazy (uninstantiated = IndirectList) public class HyperCube<P> extends ComputeFabric implements Serializable { // Inverse side @OneToMany(mappedBy="hyperCube", cascade=CascadeType.ALL, fetch=FetchType.LAZY) private List<Processor<P>> processors; ... } public class Processor<P> implements Serializable { // owning side @ManyToOne(cascade=CascadeType.ALL, fetch=FetchType.EAGER) private HyperCube<P> hyperCube; >We will likely no fix this one. >Similar reference bugs (we need to triage whether any of them are related) Looks like only bug # 309822 may be related (interaction with the lazy IndirectList) bug# 309822 Deadlock when returning Entities from a remote method call bug# 312110 NoWait locking code continues to wait on ReadLock (fixed) bug# 312462 ConcurrencyManager.acquire() hangs forever (fixed) dup of Bug# 312110 - discovered RT newgroup posting relating to bug# 309822 that is a usefull alternate reproduction reference. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |