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

Stopping the server prints errors. #758

Closed
lamba92 opened this issue Nov 25, 2018 · 4 comments
Closed

Stopping the server prints errors. #758

lamba92 opened this issue Nov 25, 2018 · 4 comments
Assignees

Comments

@lamba92
Copy link

lamba92 commented Nov 25, 2018

When stopping the server in this test for my custom feature to handle single page applications strange errors shows up and idk ho to handle them:

17:36:27.091 [Test worker @coroutine#1] INFO ktor.application - No ktor.deployment.watch patterns specified, automatic reload is not active
17:36:27.123 [Test worker @coroutine#1] INFO ktor.application - Responding at http://127.0.0.1:8080
nov 25, 2018 5:36:27 PM org.apache.coyote.AbstractProtocol init
INFORMAZIONI: Initializing ProtocolHandler ["http-nio-8080"]
nov 25, 2018 5:36:27 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFORMAZIONI: Using a shared selector for servlet write/read
nov 25, 2018 5:36:27 PM org.apache.catalina.core.StandardService startInternal
INFORMAZIONI: Starting service [Tomcat]
nov 25, 2018 5:36:27 PM org.apache.catalina.core.StandardEngine startInternal
INFORMAZIONI: Starting Servlet Engine: Apache Tomcat/9.0.10
nov 25, 2018 5:36:27 PM org.apache.coyote.AbstractProtocol start
INFORMAZIONI: Starting ProtocolHandler ["http-nio-8080"]
nov 25, 2018 5:36:27 PM org.apache.coyote.AbstractProtocol pause
INFORMAZIONI: Pausing ProtocolHandler ["http-nio-8080"]
nov 25, 2018 5:36:27 PM org.apache.catalina.core.StandardService stopInternal
INFORMAZIONI: Stopping service [Tomcat]
nov 25, 2018 5:36:27 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
AVVERTENZA: The web application [ROOT] appears to have started a thread named [DefaultDispatcher-worker-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:338)
 kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.doPark(CoroutineScheduler.kt:845)
 kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.cpuWorkerIdle(CoroutineScheduler.kt:823)
 kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:729)
nov 25, 2018 5:36:27 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
AVVERTENZA: The web application [ROOT] appears to have started a thread named [DefaultDispatcher-worker-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:338)
 kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.doPark(CoroutineScheduler.kt:845)
 kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.cpuWorkerIdle(CoroutineScheduler.kt:823)
 kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:729)
nov 25, 2018 5:36:27 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
AVVERTENZA: The web application [ROOT] appears to have started a thread named [DefaultDispatcher-worker-3] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:338)
 kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.doPark(CoroutineScheduler.kt:845)
 kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.cpuWorkerIdle(CoroutineScheduler.kt:823)
 kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:729)
nov 25, 2018 5:36:27 PM org.apache.coyote.AbstractProtocol stop
INFORMAZIONI: Stopping ProtocolHandler ["http-nio-8080"]
nov 25, 2018 5:36:27 PM org.apache.coyote.AbstractProtocol destroy
INFORMAZIONI: Destroying ProtocolHandler ["http-nio-8080"]
BUILD SUCCESSFUL in 3s
7 actionable tasks: 5 executed, 2 up-to-date
17:36:28: Tasks execution finished ':cleanTest :test --tests "it.lamba.ktor.features.Tests.testResources"'.
@cy6erGn0m cy6erGn0m self-assigned this Nov 25, 2018
@cy6erGn0m
Copy link
Contributor

Related to Kotlin/kotlinx.coroutines#856

@oleg-larshin
Copy link

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

@Stexxe
Copy link
Contributor

Stexxe commented Jul 9, 2021

@lamba92 can you reproduce this problem with Ktor 1.6.1? If yes, please share a code snippet to reproduce it.

@lamba92
Copy link
Author

lamba92 commented Jul 10, 2021

Nope, not anymore!

@lamba92 lamba92 closed this as completed Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants