Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liberty server hangs during shutdown with thread stuck in TxTMHelper.shutdown #29693

Open
joe-chacko opened this issue Sep 20, 2024 · 0 comments · May be fixed by #29783
Open

Liberty server hangs during shutdown with thread stuck in TxTMHelper.shutdown #29693

joe-chacko opened this issue Sep 20, 2024 · 0 comments · May be fixed by #29783
Assignees
Labels
release bug This bug is present in a released version of Open Liberty

Comments

@joe-chacko
Copy link
Member

Describe the bug
If Liberty shutdown happens fast enough, there is a window in transaction recovery log processing where the recovery hasn't started yet but the shutdown helper waits for it to finish.

Dump analysis reveals a hung thread:

    Thread.State:  WAITING 
    JVMTI state:   ALIVE WAITING WAITING_INDEFINITELY IN_OBJECT_WAIT 

which has the following stack:

void java/lang/Object.waitImpl(long, int)  (Native Method)
void java/lang/Object.wait(long, int)  source: Object.java:248
void java/lang/Object.wait()  source: Object.java:187
void com/ibm/tx/jta/impl/EventSemaphore.waitEvent()  source: EventSemaphore.java:56
void com/ibm/tx/jta/util/TxTMHelper.shutdown(boolean, int)  source: TxTMHelper.java:573
void com/ibm/tx/jta/util/TxTMHelper.shutdown(com.ibm.tx.config.ConfigurationProvider)  
Object sun/reflect/NativeMethodAccessorImpl.invoke0(reflect.Method, Object, Object[])  
Object sun/reflect/NativeMethodAccessorImpl.invoke(Object, Object[])  source: NativeMet
Object sun/reflect/DelegatingMethodAccessorImpl.invoke(Object, Object[])  source: Deleg
Object java/lang/reflect/Method.invoke(Object, Object[])  source: Method.java:508
org/apache/felix/scr/impl/inject/methods/BaseMethod.invokeMethod(Object, org.apache.fel
org/apache/felix/scr/impl/inject/methods/BaseMethod.access$500(org.apache.felix.scr.imp
org/apache/felix/scr/impl/inject/methods/BaseMethod$Resolved.invoke(org.apache.felix.sc
org/apache/felix/scr/impl/inject/methods/BaseMethod$NotResolved.invoke(org.apache.felix
(...)
 void org/eclipse/osgi/container/SystemModule.stopWorker()  source: SystemModule.java:275
 void org/eclipse/osgi/internal/framework/EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker()  source: EquinoxBundle.java:208
 org.eclipse.osgi.container.ModuleContainerAdaptor$ModuleEvent org/eclipse/osgi/container/Module.doStop()  source: Module.java:660
 void org/eclipse/osgi/container/Module.stop(org.eclipse.osgi.container.Module$StopOptions[])  source: Module.java:521
 void org/eclipse/osgi/container/SystemModule.stop(org.eclipse.osgi.container.Module$StopOptions[])  source: SystemModule.java:207

Expected behavior
The server should shutdown cleanly without waiting for recovery in this case.

Diagnostic information:

  • OpenLiberty Version: 24.0.0.6
  • Affected feature(s) any features that use transactions
  • Java Version: 1.8.0_421 Java(TM) SE Runtime Environment (8.0.8.30 - pmz6480sr8fp30-20240801_01(SR8 FP30))
@joe-chacko joe-chacko added the release bug This bug is present in a released version of Open Liberty label Sep 20, 2024
@joe-chacko joe-chacko self-assigned this Sep 20, 2024
@joe-chacko joe-chacko linked a pull request Oct 4, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release bug This bug is present in a released version of Open Liberty
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant