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

blocking = hang #931

Closed
quininer opened this issue Feb 25, 2019 · 3 comments
Closed

blocking = hang #931

quininer opened this issue Feb 25, 2019 · 3 comments

Comments

@quininer
Copy link
Member

quininer commented Feb 25, 2019

Version

├── tokio v0.1.15
│   ├── tokio-codec v0.1.1
│   │   └── tokio-io v0.1.11
│   ├── tokio-current-thread v0.1.4
│   │   └── tokio-executor v0.1.6
│   ├── tokio-executor v0.1.6 (*)
│   ├── tokio-fs v0.1.5
│   │   ├── tokio-io v0.1.11 (*)
│   │   └── tokio-threadpool v0.1.11
│   │       └── tokio-executor v0.1.6 (*)
│   │   └── tokio-io v0.1.11 (*)
│   ├── tokio-io v0.1.11 (*)
│   ├── tokio-reactor v0.1.8
│   │   ├── tokio-executor v0.1.6 (*)
│   │   └── tokio-io v0.1.11 (*)
│   ├── tokio-sync v0.1.2
│   ├── tokio-tcp v0.1.3
│   │   ├── tokio-io v0.1.11 (*)
│   │   └── tokio-reactor v0.1.8 (*)
│   ├── tokio-threadpool v0.1.11 (*)
│   ├── tokio-timer v0.2.10
│   │   └── tokio-executor v0.1.6 (*)
│   ├── tokio-udp v0.1.3
│   │   ├── tokio-codec v0.1.1 (*)
│   │   ├── tokio-io v0.1.11 (*)
│   │   └── tokio-reactor v0.1.8 (*)
│   └── tokio-uds v0.2.5
│       ├── tokio-codec v0.1.1 (*)
│       ├── tokio-io v0.1.11 (*)
│       └── tokio-reactor v0.1.8 (*)
└── tokio-threadpool v0.1.11 (*)

Platform

Linux btw 4.20.8-arch1-1-ARCH #1 SMP PREEMPT Wed Feb 13 00:06:58 UTC 2019 x86_64 GNU/Linux

Subcrates

tokio-threadpool

Description

Unable to release blocking thread when a timeout occurs.

Sometimes blocking will go into a bad state. Even if there is no blocking task is running, it is still always NoCapacity.

https://gist.github.com/quininer/691caf86ec734dadc9d8590893825284

Note that this happens in hyper TokioThreadpoolGaiResolver @seanmonstar , which causes dns response to never return.

@quininer
Copy link
Member Author

quininer commented Feb 26, 2019

Related #726 .

@quininer quininer reopened this Feb 26, 2019
@carllerche
Copy link
Member

This is kind of expected... a blocking call (right now at least) cannot be interrupted. You set the max number of blocking threads to 10, so you can get 10 concurrent sleeps. Could you clarify what you would expect would happen in this case?

@quininer
Copy link
Member Author

You are right... I misunderstood what happened, the blocking behind was never executed because it was canceled by timeout and not because of NoCapacity.

I think I encountered the same problem with #726 on tokio-threadpool 0.1.11.

@quininer quininer changed the title blocking + timeout = hang blocking = hang Apr 29, 2019
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

2 participants