Request: No request information User Information: No User logged in. Exception: org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java(Compiled Code)) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java(Inlined Compiled Code)) at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java(Compiled Code)) at com.redhat.rhn.domain.org.OrgImpl$$EnhancerByCGLIB$$a7f782b6.isPayingCustomer(<generated>(Compiled Code)) at com.redhat.rhn.manager.errata.cache.UpdateErrataCacheCommand.processServer(UpdateErrataCacheCommand.java(Compiled Code)) at com.redhat.rhn.manager.errata.cache.UpdateErrataCacheCommand.updateErrataCache(UpdateErrataCacheCommand.java(Compiled Code)) at com.redhat.rhn.frontend.events.UpdateErrataCacheAction.execute(UpdateErrataCacheAction.java(Compiled Code)) at com.redhat.rhn.common.messaging.ActionExecutor.run(ActionExecutor.java(Compiled Code)) at com.redhat.rhn.common.messaging.MessageDispatcher.run(MessageDispatcher.java(Compiled Code)) at java.lang.Thread.run(Thread.java:570)
Seeing this fairly often in prod after rhel5ga
The UpdateErrataCacheAction executes asynchronously, so it was possible for for the org passed in to be connected to an already closed hibernate session. Fix checked into 501h (r113316), 500h (r113318) Test plan: -- This is a timing issue that will be difficult to test consistently, but the code path that will trigger it involves logging in with a user that belongs to an org with less than 30 servers & that has entries in the rhnOrgErrataCacheQueue table. Log in with the same user a while later (depending on server activity) and the ErrataCache for that org will be updated. Monitor the logs, or have a java dev do so to ensure that the exception doesn't show up. NOTE: Because this task happens asynchronously, there will be no feedback to the application user.
This seem to be working well ( I did not see any exceptions in the logs.) but as per mike looks ok for the piece of code I fixed, but I believe it might be happening in other areas of the code as well. So I am not sure if I should mark it verified yet. Marking it need info for now.
I verified that the other issue I was seeing was unrelated. Please mark verified.
marking it verified as per the above comment.
verified on stage.