Skip to content

[webmvc-tomcat/CRaC] Graceful shutdown throws AsynchronousCloseException #67

@nekhtan

Description

@nekhtan

Hello,

While the build runs fine, the build/jvmCrApp/output-checkpoint.txt shows:

2025-05-23T11:00:32.997+02:00  INFO 30863 --- [           main] o.s.b.w.e.tomcat.GracefulShutdown        : Commencing graceful shutdown. Waiting for active requests to complete
2025-05-23T11:00:35.010+02:00  INFO 30863 --- [tomcat-shutdown] o.s.b.w.e.tomcat.GracefulShutdown        : Graceful shutdown complete
2025-05-23T11:00:35.010+02:00 ERROR 30863 --- [auto-1-Acceptor] org.apache.tomcat.util.net.Acceptor      : Socket accept failed

java.nio.channels.AsynchronousCloseException: null
	at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:223) ~[na:na]
	at java.base/sun.nio.ch.ServerSocketChannelImpl.end(ServerSocketChannelImpl.java:391) ~[na:na]
	at java.base/sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:415) ~[na:na]
	at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:518) ~[tomcat-embed-core-10.1.34.jar!/:na]
	at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:71) ~[tomcat-embed-core-10.1.34.jar!/:na]
	at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:128) ~[tomcat-embed-core-10.1.34.jar!/:na]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]

I guess the checkpoint is not created properly then, right ?

The issue seems to appear starting from SpringBoot 3.4.x (tested in SpringBoot 3.3.3 and it looks fine there).

Note that the same issue can also be observed when upgrading SpringBoot on https://github.com/sdeleuze/spring-boot-crac-demo

Do you know how it can be fixed ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions