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

Tokio leaks file descriptors #2635

Closed
Kixiron opened this issue Jun 28, 2020 · 6 comments
Closed

Tokio leaks file descriptors #2635

Kixiron opened this issue Jun 28, 2020 · 6 comments
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug.

Comments

@Kixiron
Copy link

Kixiron commented Jun 28, 2020

Version

│   │   │   ├── tokio v0.2.21
│   │   │   │   └── tokio-macros v0.2.5
│   │   │   └── tokio-util v0.3.1
│   │   │       └── tokio v0.2.21 (*)
│   │   ├── tokio v0.2.21 (*)
│   │   ├── tokio v0.2.21 (*)
│   │   └── tokio-tls v0.3.1
│   │       └── tokio v0.2.21 (*)
│   ├── tokio v0.2.21 (*)
│   ├── tokio-tls v0.3.1 (*)
│   │   ├── tokio v0.2.21 (*)
│   │   └── tokio v0.2.21 (*)
│   ├── tokio v0.2.21 (*)
│   ├── tokio v0.2.21 (*)
├── tokio v0.2.21 (*)

Platform

Linux Skrivbord 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Description

I unfortunately don't have a minimal reproduction, but I have the specific segment of code that causes this.
The commandline command runs this portion, and valgrind calls out S3Backend::new, which seems rather trivial and just constructs a new runtime, at my best guess things aren't being cleaned up as they should in the Drop implementation of Runtime

For valgrind I ran cargo build && valgrind --track-fds=yes target/debug/cratesfyi build crate lasso 0.2.2.

Valgrind output
==28435== Memcheck, a memory error detector
==28435== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==28435== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==28435== Command: target/debug/cratesfyi build crate lasso 0.2.1
==28435== Parent PID: 72
==28435== 
==28435== Syscall param statx(file_name) points to unaddressable byte(s)
==28435==    at 0x4D4470D: syscall (syscall.S:38)
==28435==    by 0x265C24B: statx (weak.rs:90)
==28435==    by 0x265C24B: std::sys::unix::fs::try_statx (fs.rs:123)
==28435==    by 0x2654FD4: std::sys::unix::fs::stat (fs.rs:1057)
==28435==    by 0x78FF9C: std::fs::metadata (fs.rs:1587)
==28435==    by 0x799F1C: dotenv::find::find (find.rs:36)
==28435==    by 0x799A49: dotenv::find::Finder::find (find.rs:25)
==28435==    by 0x7822B2: dotenv::dotenv (lib.rs:164)
==28435==    by 0x749AC1: cratesfyi::main (cratesfyi.rs:13)
==28435==    by 0x7492BA: std::rt::lang_start::{{closure}} (rt.rs:67)
==28435==    by 0x2651B37: {{closure}} (rt.rs:52)
==28435==    by 0x2651B37: do_call<closure-0,i32> (panicking.rs:331)
==28435==    by 0x2651B37: try<i32,closure-0> (panicking.rs:274)
==28435==    by 0x2651B37: catch_unwind<closure-0,i32> (panic.rs:394)
==28435==    by 0x2651B37: std::rt::lang_start_internal (rt.rs:51)
==28435==    by 0x749296: std::rt::lang_start (rt.rs:67)
==28435==    by 0x754A59: main (in /mnt/g/Users/Chase/Code/Rust/docs.rs/target/debug/cratesfyi)
==28435==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==28435== 
==28435== Syscall param statx(buf) points to unaddressable byte(s)
==28435==    at 0x4D4470D: syscall (syscall.S:38)
==28435==    by 0x265C24B: statx (weak.rs:90)
==28435==    by 0x265C24B: std::sys::unix::fs::try_statx (fs.rs:123)
==28435==    by 0x2654FD4: std::sys::unix::fs::stat (fs.rs:1057)
==28435==    by 0x78FF9C: std::fs::metadata (fs.rs:1587)
==28435==    by 0x799F1C: dotenv::find::find (find.rs:36)
==28435==    by 0x799A49: dotenv::find::Finder::find (find.rs:25)
==28435==    by 0x7822B2: dotenv::dotenv (lib.rs:164)
==28435==    by 0x749AC1: cratesfyi::main (cratesfyi.rs:13)
==28435==    by 0x7492BA: std::rt::lang_start::{{closure}} (rt.rs:67)
==28435==    by 0x2651B37: {{closure}} (rt.rs:52)
==28435==    by 0x2651B37: do_call<closure-0,i32> (panicking.rs:331)
==28435==    by 0x2651B37: try<i32,closure-0> (panicking.rs:274)
==28435==    by 0x2651B37: catch_unwind<closure-0,i32> (panic.rs:394)
==28435==    by 0x2651B37: std::rt::lang_start_internal (rt.rs:51)
==28435==    by 0x749296: std::rt::lang_start (rt.rs:67)
==28435==    by 0x754A59: main (in /mnt/g/Users/Chase/Code/Rust/docs.rs/target/debug/cratesfyi)
==28435==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==28435== 
==28435== Warning: set address range perms: large range [0x7ec8000, 0x1b00c000) (defined)
==28435== Warning: set address range perms: large range [0x7ec8000, 0x1b00c000) (noaccess)
--28435-- WARNING: unhandled amd64-linux syscall: 326
--28435-- You may be able to write your own handler.
--28435-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--28435-- Nevertheless we consider this a bug.  Please report
--28435-- it at http://valgrind.org/support/bug_reports.html.
==28435== 
==28435== FILE DESCRIPTORS: 15 open at exit.
==28435== Open file descriptor 32:
==28435==    at 0x4D3A93B: pipe2 (syscall-template.S:78)
==28435==    by 0x2160631: mio::sys::unix::pipe (mod.rs:67)
==28435==    by 0x215B5FF: mio::sys::unix::awakener::pipe::Awakener::new (awakener.rs:23)
==28435==    by 0x2150B10: mio::poll::ReadinessQueue::new (poll.rs:2108)
==28435==    by 0x214E2EE: mio::poll::Poll::new (poll.rs:658)
==28435==    by 0x20AB44C: tokio::io::driver::Driver::new (mod.rs:70)
==28435==    by 0x210269B: tokio::runtime::io::variant::create_driver (io.rs:35)
==28435==    by 0x2119B16: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==28435==    by 0x21168F6: tokio::runtime::builder::Builder::build (builder.rs:318)
==28435==    by 0x2116FF5: tokio::runtime::Runtime::new (mod.rs:343)
==28435==    by 0xBB48BC: cratesfyi::storage::s3::S3Backend::new (s3.rs:33)
==28435==    by 0xAC206B: cratesfyi::storage::Storage::new (mod.rs:122)
==28435== 
==28435== Open file descriptor 31:
==28435==    at 0x4D3A93B: pipe2 (syscall-template.S:78)
==28435==    by 0x2160631: mio::sys::unix::pipe (mod.rs:67)
==28435==    by 0x215B5FF: mio::sys::unix::awakener::pipe::Awakener::new (awakener.rs:23)
==28435==    by 0x2150B10: mio::poll::ReadinessQueue::new (poll.rs:2108)
==28435==    by 0x214E2EE: mio::poll::Poll::new (poll.rs:658)
==28435==    by 0x20AB44C: tokio::io::driver::Driver::new (mod.rs:70)
==28435==    by 0x210269B: tokio::runtime::io::variant::create_driver (io.rs:35)
==28435==    by 0x2119B16: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==28435==    by 0x21168F6: tokio::runtime::builder::Builder::build (builder.rs:318)
==28435==    by 0x2116FF5: tokio::runtime::Runtime::new (mod.rs:343)
==28435==    by 0xBB48BC: cratesfyi::storage::s3::S3Backend::new (s3.rs:33)
==28435==    by 0xAC206B: cratesfyi::storage::Storage::new (mod.rs:122)
==28435== 
==28435== Open file descriptor 30:
==28435==    at 0x4D4BA9B: epoll_create1 (syscall-template.S:78)
==28435==    by 0x2158EC8: mio::sys::unix::epoll::Selector::new (epoll.rs:40)
==28435==    by 0x214E28B: mio::poll::Poll::new (poll.rs:657)
==28435==    by 0x20AB44C: tokio::io::driver::Driver::new (mod.rs:70)
==28435==    by 0x210269B: tokio::runtime::io::variant::create_driver (io.rs:35)
==28435==    by 0x2119B16: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==28435==    by 0x21168F6: tokio::runtime::builder::Builder::build (builder.rs:318)
==28435==    by 0x2116FF5: tokio::runtime::Runtime::new (mod.rs:343)
==28435==    by 0xBB48BC: cratesfyi::storage::s3::S3Backend::new (s3.rs:33)
==28435==    by 0xAC206B: cratesfyi::storage::Storage::new (mod.rs:122)
==28435==    by 0xA4CB6E: cratesfyi::db::file::add_path_into_database (file.rs:34)
==28435==    by 0x9737E7: cratesfyi::docbuilder::rustwide_builder::RustwideBuilder::upload_docs (rustwide_builder.rs:584)
==28435== 
==28435== Open file descriptor 29:
==28435==    at 0x4D3A93B: pipe2 (syscall-template.S:78)
==28435==    by 0x2160631: mio::sys::unix::pipe (mod.rs:67)
==28435==    by 0x215B5FF: mio::sys::unix::awakener::pipe::Awakener::new (awakener.rs:23)
==28435==    by 0x2150B10: mio::poll::ReadinessQueue::new (poll.rs:2108)
==28435==    by 0x214E2EE: mio::poll::Poll::new (poll.rs:658)
==28435==    by 0x20AB44C: tokio::io::driver::Driver::new (mod.rs:70)
==28435==    by 0x210269B: tokio::runtime::io::variant::create_driver (io.rs:35)
==28435==    by 0x2119B16: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==28435==    by 0x21168F6: tokio::runtime::builder::Builder::build (builder.rs:318)
==28435==    by 0x2116FF5: tokio::runtime::Runtime::new (mod.rs:343)
==28435==    by 0xBB48BC: cratesfyi::storage::s3::S3Backend::new (s3.rs:33)
==28435==    by 0xAC206B: cratesfyi::storage::Storage::new (mod.rs:122)
==28435== 
==28435== Open file descriptor 28:
==28435==    at 0x4D3A93B: pipe2 (syscall-template.S:78)
==28435==    by 0x2160631: mio::sys::unix::pipe (mod.rs:67)
==28435==    by 0x215B5FF: mio::sys::unix::awakener::pipe::Awakener::new (awakener.rs:23)
==28435==    by 0x2150B10: mio::poll::ReadinessQueue::new (poll.rs:2108)
==28435==    by 0x214E2EE: mio::poll::Poll::new (poll.rs:658)
==28435==    by 0x20AB44C: tokio::io::driver::Driver::new (mod.rs:70)
==28435==    by 0x210269B: tokio::runtime::io::variant::create_driver (io.rs:35)
==28435==    by 0x2119B16: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==28435==    by 0x21168F6: tokio::runtime::builder::Builder::build (builder.rs:318)
==28435==    by 0x2116FF5: tokio::runtime::Runtime::new (mod.rs:343)
==28435==    by 0xBB48BC: cratesfyi::storage::s3::S3Backend::new (s3.rs:33)
==28435==    by 0xAC206B: cratesfyi::storage::Storage::new (mod.rs:122)
==28435== 
==28435== Open file descriptor 27:
==28435==    at 0x4D4BA9B: epoll_create1 (syscall-template.S:78)
==28435==    by 0x2158EC8: mio::sys::unix::epoll::Selector::new (epoll.rs:40)
==28435==    by 0x214E28B: mio::poll::Poll::new (poll.rs:657)
==28435==    by 0x20AB44C: tokio::io::driver::Driver::new (mod.rs:70)
==28435==    by 0x210269B: tokio::runtime::io::variant::create_driver (io.rs:35)
==28435==    by 0x2119B16: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==28435==    by 0x21168F6: tokio::runtime::builder::Builder::build (builder.rs:318)
==28435==    by 0x2116FF5: tokio::runtime::Runtime::new (mod.rs:343)
==28435==    by 0xBB48BC: cratesfyi::storage::s3::S3Backend::new (s3.rs:33)
==28435==    by 0xAC206B: cratesfyi::storage::Storage::new (mod.rs:122)
==28435==    by 0xA4D1E9: cratesfyi::db::file::add_path_into_database (file.rs:34)
==28435==    by 0xB86FBC: cratesfyi::docbuilder::rustwide_builder::RustwideBuilder::build_package::{{closure}} (rustwide_builder.rs:352)
==28435== 
==28435== Open AF_UNIX socket 25: <unknown>
==28435==    at 0x4D4C7AE: socketpair (syscall-template.S:78)
==28435==    by 0x214DAC9: mio_uds::socket::Socket::pair (socket.rs:84)
==28435==    by 0x214D431: mio_uds::stream::UnixStream::pair (stream.rs:79)
==28435==    by 0x211A69E: <tokio::signal::unix::OsExtraData as tokio::signal::registry::Init>::init (unix.rs:53)
==28435==    by 0x20F44CF: __static_ref_initialize (registry.rs:170)
==28435==    by 0x20F44CF: core::ops::function::FnOnce::call_once (function.rs:232)
==28435==    by 0x2100576: lazy_static::lazy::Lazy<T>::get::{{closure}} (inline_lazy.rs:31)
==28435==    by 0x20C9344: std::sync::once::Once::call_once::{{closure}} (once.rs:264)
==28435==    by 0x264D827: std::sync::once::Once::call_inner (once.rs:416)
==28435==    by 0x20C9270: std::sync::once::Once::call_once (once.rs:264)
==28435==    by 0x20BC228: get<core::pin::Pin<alloc::boxed::Box<tokio::signal::registry::Globals>>,fn() -> core::pin::Pin<alloc::boxed::Box<tokio::signal::registry::Globals>>> (inline_lazy.rs:30)
==28435==    by 0x20BC228: __stability (lib.rs:142)
==28435==    by 0x20BC228: <tokio::signal::registry::globals::GLOBALS as core::ops::deref::Deref>::deref (lib.rs:144)
==28435==    by 0x20B9413: tokio::signal::registry::globals (registry.rs:175)
==28435==    by 0x211A8DA: tokio::signal::unix::signal_enable (unix.rs:230)
==28435== 
==28435== Open AF_UNIX socket 23: <unknown>
==28435==    at 0x4D4C7AE: socketpair (syscall-template.S:78)
==28435==    by 0x214DAC9: mio_uds::socket::Socket::pair (socket.rs:84)
==28435==    by 0x214D431: mio_uds::stream::UnixStream::pair (stream.rs:79)
==28435==    by 0x211A69E: <tokio::signal::unix::OsExtraData as tokio::signal::registry::Init>::init (unix.rs:53)
==28435==    by 0x20F44CF: __static_ref_initialize (registry.rs:170)
==28435==    by 0x20F44CF: core::ops::function::FnOnce::call_once (function.rs:232)
==28435==    by 0x2100576: lazy_static::lazy::Lazy<T>::get::{{closure}} (inline_lazy.rs:31)
==28435==    by 0x20C9344: std::sync::once::Once::call_once::{{closure}} (once.rs:264)
==28435==    by 0x264D827: std::sync::once::Once::call_inner (once.rs:416)
==28435==    by 0x20C9270: std::sync::once::Once::call_once (once.rs:264)
==28435==    by 0x20BC228: get<core::pin::Pin<alloc::boxed::Box<tokio::signal::registry::Globals>>,fn() -> core::pin::Pin<alloc::boxed::Box<tokio::signal::registry::Globals>>> (inline_lazy.rs:30)
==28435==    by 0x20BC228: __stability (lib.rs:142)
==28435==    by 0x20BC228: <tokio::signal::registry::globals::GLOBALS as core::ops::deref::Deref>::deref (lib.rs:144)
==28435==    by 0x20B9413: tokio::signal::registry::globals (registry.rs:175)
==28435==    by 0x211A8DA: tokio::signal::unix::signal_enable (unix.rs:230)
==28435== 
==28435== Open file descriptor 21:
==28435==    at 0x4D3A93B: pipe2 (syscall-template.S:78)
==28435==    by 0x2160631: mio::sys::unix::pipe (mod.rs:67)
==28435==    by 0x215B5FF: mio::sys::unix::awakener::pipe::Awakener::new (awakener.rs:23)
==28435==    by 0x2150B10: mio::poll::ReadinessQueue::new (poll.rs:2108)
==28435==    by 0x214E2EE: mio::poll::Poll::new (poll.rs:658)
==28435==    by 0x20AB44C: tokio::io::driver::Driver::new (mod.rs:70)
==28435==    by 0x210269B: tokio::runtime::io::variant::create_driver (io.rs:35)
==28435==    by 0x2119B16: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==28435==    by 0x21168F6: tokio::runtime::builder::Builder::build (builder.rs:318)
==28435==    by 0x2116FF5: tokio::runtime::Runtime::new (mod.rs:343)
==28435==    by 0x170F8F1: __static_ref_initialize (mod.rs:34)
==28435==    by 0x170F8F1: core::ops::function::FnOnce::call_once (function.rs:232)
==28435==    by 0x170ED73: lazy_static::lazy::Lazy<T>::get::{{closure}} (inline_lazy.rs:31)
==28435== 
==28435== Open file descriptor 20:
==28435==    at 0x4D3A93B: pipe2 (syscall-template.S:78)
==28435==    by 0x2160631: mio::sys::unix::pipe (mod.rs:67)
==28435==    by 0x215B5FF: mio::sys::unix::awakener::pipe::Awakener::new (awakener.rs:23)
==28435==    by 0x2150B10: mio::poll::ReadinessQueue::new (poll.rs:2108)
==28435==    by 0x214E2EE: mio::poll::Poll::new (poll.rs:658)
==28435==    by 0x20AB44C: tokio::io::driver::Driver::new (mod.rs:70)
==28435==    by 0x210269B: tokio::runtime::io::variant::create_driver (io.rs:35)
==28435==    by 0x2119B16: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==28435==    by 0x21168F6: tokio::runtime::builder::Builder::build (builder.rs:318)
==28435==    by 0x2116FF5: tokio::runtime::Runtime::new (mod.rs:343)
==28435==    by 0x170F8F1: __static_ref_initialize (mod.rs:34)
==28435==    by 0x170F8F1: core::ops::function::FnOnce::call_once (function.rs:232)
==28435==    by 0x170ED73: lazy_static::lazy::Lazy<T>::get::{{closure}} (inline_lazy.rs:31)
==28435== 
==28435== Open file descriptor 19:
==28435==    at 0x4D4BA9B: epoll_create1 (syscall-template.S:78)
==28435==    by 0x2158EC8: mio::sys::unix::epoll::Selector::new (epoll.rs:40)
==28435==    by 0x214E28B: mio::poll::Poll::new (poll.rs:657)
==28435==    by 0x20AB44C: tokio::io::driver::Driver::new (mod.rs:70)
==28435==    by 0x210269B: tokio::runtime::io::variant::create_driver (io.rs:35)
==28435==    by 0x2119B16: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==28435==    by 0x21168F6: tokio::runtime::builder::Builder::build (builder.rs:318)
==28435==    by 0x2116FF5: tokio::runtime::Runtime::new (mod.rs:343)
==28435==    by 0x170F8F1: __static_ref_initialize (mod.rs:34)
==28435==    by 0x170F8F1: core::ops::function::FnOnce::call_once (function.rs:232)
==28435==    by 0x170ED73: lazy_static::lazy::Lazy<T>::get::{{closure}} (inline_lazy.rs:31)
==28435==    by 0x173C994: std::sync::once::Once::call_once::{{closure}} (once.rs:264)
==28435==    by 0x264D827: std::sync::once::Once::call_inner (once.rs:416)
==28435== 
==28435== Open file descriptor 3: /mnt/g/Users/Chase/Code/Rust/docs.rs/test.valgrind
==28435==    <inherited from parent>
==28435== 
==28435== Open file descriptor 2: /dev/pts/1
==28435==    <inherited from parent>
==28435== 
==28435== Open file descriptor 1: /dev/pts/1
==28435==    <inherited from parent>
==28435== 
==28435== Open file descriptor 0: /dev/pts/1
==28435==    <inherited from parent>
==28435== 
==28435== 
==28435== HEAP SUMMARY:
==28435==     in use at exit: 843,020 bytes in 10,427 blocks
==28435==   total heap usage: 197,283 allocs, 186,856 frees, 828,180,929 bytes allocated
==28435== 
==28435== LEAK SUMMARY:
==28435==    definitely lost: 376 bytes in 4 blocks
==28435==    indirectly lost: 151,384 bytes in 297 blocks
==28435==      possibly lost: 8,552 bytes in 31 blocks
==28435==    still reachable: 682,708 bytes in 10,095 blocks
==28435==         suppressed: 0 bytes in 0 blocks
==28435== Rerun with --leak-check=full to see details of leaked memory
==28435== 
==28435== For lists of detected and suppressed errors, rerun with: -s
==28435== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
@Kixiron Kixiron added A-tokio Area: The main tokio crate C-bug Category: This is a bug. labels Jun 28, 2020
@jyn514
Copy link
Contributor

jyn514 commented Jun 29, 2020

I was unable to reproduce with the following code:

fn main() {
    for _ in 0..50 {
        drop(tokio::runtime::Runtime::new());
    }
}

I also tried some file IO which didn't work. Trying a more extended example now which uses rusoto_s3 and futures, then I'll see what I can minimize from there.

@jyn514
Copy link
Contributor

jyn514 commented Jun 29, 2020

Here is a self-contained example: https://github.com/jyn514/tokio-leak-example. However it requires that you have a local s3 instance running (using minio or similar, see https://github.com/rust-lang/docs.rs/blob/b98cdebebc90bbd8a5c0ea397a2a3425dae19b4b/docker-compose.yml#L37 for an example).

Command line and output
$ cargo build --release && AWS_ACCESS_KEY_ID=cratesfyi AWS_SECRET_ACCESS_KEY=secret_key S3_ENDPOINT=http://localhost:9000 valgrind --track-fds=yes /home/joshua/.local/lib/cargo/target/release/tokio-example
   Compiling tokio-example v0.1.0 (/home/joshua/src/rust/tokio-example)
    Finished release [optimized] target(s) in 15.51s
==387670== Memcheck, a memory error detector
==387670== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==387670== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==387670== Command: /home/joshua/.local/lib/cargo/target/release/tokio-example
==387670== 
==387670== Syscall param statx(file_name) points to unaddressable byte(s)
==387670==    at 0x4D3570D: syscall (syscall.S:38)
==387670==    by 0x599B9B: statx (weak.rs:90)
==387670==    by 0x599B9B: std::sys::unix::fs::try_statx (fs.rs:123)
==387670==    by 0x594254: std::sys::unix::fs::stat (fs.rs:1057)
==387670==    by 0x54AB6C: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54B81E: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54B50A: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54B08C: openssl_probe::probe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54ADA7: openssl_probe::init_ssl_cert_env_vars (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x58F147: std::sync::once::Once::call_inner (once.rs:416)
==387670==    by 0x54A356: native_tls::imp::TlsConnector::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54A963: native_tls::TlsConnector::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x4F5242: hyper_tls::client::HttpsConnector<hyper::client::connect::http::HttpConnector>::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==387670== 
==387670== Syscall param statx(buf) points to unaddressable byte(s)
==387670==    at 0x4D3570D: syscall (syscall.S:38)
==387670==    by 0x599B9B: statx (weak.rs:90)
==387670==    by 0x599B9B: std::sys::unix::fs::try_statx (fs.rs:123)
==387670==    by 0x594254: std::sys::unix::fs::stat (fs.rs:1057)
==387670==    by 0x54AB6C: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54B81E: <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54B50A: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::from_iter (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54B08C: openssl_probe::probe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54ADA7: openssl_probe::init_ssl_cert_env_vars (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x58F147: std::sync::once::Once::call_inner (once.rs:416)
==387670==    by 0x54A356: native_tls::imp::TlsConnector::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54A963: native_tls::TlsConnector::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x4F5242: hyper_tls::client::HttpsConnector<hyper::client::connect::http::HttpConnector>::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==387670== 
==387670== 
==387670== FILE DESCRIPTORS: 30 open at exit.
==387670== Open file descriptor 29:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 28:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 27:
==387670==    at 0x4D3CA9B: epoll_create1 (syscall-template.S:78)
==387670==    by 0x57E498: mio::sys::unix::epoll::Selector::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C5ED: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 26:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 25:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 24:
==387670==    at 0x4D3CA9B: epoll_create1 (syscall-template.S:78)
==387670==    by 0x57E498: mio::sys::unix::epoll::Selector::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C5ED: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 23:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 22:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 21:
==387670==    at 0x4D3CA9B: epoll_create1 (syscall-template.S:78)
==387670==    by 0x57E498: mio::sys::unix::epoll::Selector::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C5ED: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 20:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 19:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 18:
==387670==    at 0x4D3CA9B: epoll_create1 (syscall-template.S:78)
==387670==    by 0x57E498: mio::sys::unix::epoll::Selector::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C5ED: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 17:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 16:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 15:
==387670==    at 0x4D3CA9B: epoll_create1 (syscall-template.S:78)
==387670==    by 0x57E498: mio::sys::unix::epoll::Selector::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C5ED: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 14:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 13:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 12:
==387670==    at 0x4D3CA9B: epoll_create1 (syscall-template.S:78)
==387670==    by 0x57E498: mio::sys::unix::epoll::Selector::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C5ED: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 11:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 10:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 9:
==387670==    at 0x4D3CA9B: epoll_create1 (syscall-template.S:78)
==387670==    by 0x57E498: mio::sys::unix::epoll::Selector::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C5ED: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 8:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 7:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 6:
==387670==    at 0x4D3CA9B: epoll_create1 (syscall-template.S:78)
==387670==    by 0x57E498: mio::sys::unix::epoll::Selector::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C5ED: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 5:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 4:
==387670==    at 0x4D2B93B: pipe2 (syscall-template.S:78)
==387670==    by 0x57E8C5: mio::sys::unix::pipe (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C787: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 3:
==387670==    at 0x4D3CA9B: epoll_create1 (syscall-template.S:78)
==387670==    by 0x57E498: mio::sys::unix::epoll::Selector::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x57C5ED: mio::poll::Poll::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x54F429: tokio::io::driver::Driver::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x55D718: tokio::runtime::io::variant::create_driver (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x564F24: tokio::runtime::builder::Builder::build (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x569288: tokio::runtime::Runtime::new (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3343CC: tokio_example::main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x3487E2: std::rt::lang_start::{{closure}} (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670==    by 0x592B77: {{closure}} (rt.rs:52)
==387670==    by 0x592B77: do_call<closure-0,i32> (panicking.rs:331)
==387670==    by 0x592B77: try<i32,closure-0> (panicking.rs:274)
==387670==    by 0x592B77: catch_unwind<closure-0,i32> (panic.rs:394)
==387670==    by 0x592B77: std::rt::lang_start_internal (rt.rs:51)
==387670==    by 0x3354C1: main (in /home/joshua/.local/lib/cargo/target/release/tokio-example)
==387670== 
==387670== Open file descriptor 2: /dev/pts/3
==387670==    <inherited from parent>
==387670== 
==387670== Open file descriptor 1: /dev/pts/3
==387670==    <inherited from parent>
==387670== 
==387670== Open file descriptor 0: /dev/pts/3
==387670==    <inherited from parent>
==387670== 
==387670== 
==387670== HEAP SUMMARY:
==387670==     in use at exit: 261,848 bytes in 424 blocks
==387670==   total heap usage: 364,429 allocs, 364,005 frees, 31,382,389 bytes allocated
==387670== 
==387670== LEAK SUMMARY:
==387670==    definitely lost: 1,712 bytes in 16 blocks
==387670==    indirectly lost: 260,080 bytes in 407 blocks
==387670==      possibly lost: 0 bytes in 0 blocks
==387670==    still reachable: 56 bytes in 1 blocks
==387670==         suppressed: 0 bytes in 0 blocks
==387670== Rerun with --leak-check=full to see details of leaked memory
==387670== 
==387670== For lists of detected and suppressed errors, rerun with: -s
==387670== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)

@Darksonn
Copy link
Contributor

It would be nice with an example that uses Tokio's types directly. Can you try something that uses both tcp streams and timers? And perhaps also unix pipes, as those show up on your valgrind outputs.

@Kixiron
Copy link
Author

Kixiron commented Jun 29, 2020

It only works about 60% of the time, but this leaks fds

use tokio::{io::AsyncWriteExt, net::TcpStream, runtime::Runtime};

fn main() {
    let runtime = Runtime::new().unwrap();

    runtime.handle().block_on(async {
        let mut stream = TcpStream::connect("127.0.0.1:8080").await.unwrap();
        stream.write_all(b"hello world!").await.unwrap();
    });
}
Valgrind Output
$ cargo build && valgrind --track-fds=yes target/debug/tokio-mcve
==2265== Memcheck, a memory error detector
==2265== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2265== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==2265== Command: target/debug/tokio-mcve
==2265==
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }', src/main.rs:7:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
==2265==
==2265== FILE DESCRIPTORS: 6 open at exit.
==2265== Open file descriptor 5:
==2265==    at 0x49A893B: pipe2 (syscall-template.S:78)
==2265==    by 0x1C77D1: mio::sys::unix::pipe (mod.rs:67)
==2265==    by 0x1C294F: mio::sys::unix::awakener::pipe::Awakener::new (awakener.rs:23)
==2265==    by 0x1B8440: mio::poll::ReadinessQueue::new (poll.rs:2108)
==2265==    by 0x1B5CEE: mio::poll::Poll::new (poll.rs:658)
==2265==    by 0x138E6C: tokio::io::driver::Driver::new (mod.rs:70)
==2265==    by 0x15EFEB: tokio::runtime::io::variant::create_driver (io.rs:35)
==2265==    by 0x161B36: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==2265==    by 0x15E786: tokio::runtime::builder::Builder::build (builder.rs:318)
==2265==    by 0x12B965: tokio::runtime::Runtime::new (mod.rs:343)
==2265==    by 0x125F94: tokio_mcve::main (main.rs:4)
==2265==    by 0x12704A: std::rt::lang_start::{{closure}} (rt.rs:67)
==2265==
==2265== Open file descriptor 4:
==2265==    at 0x49A893B: pipe2 (syscall-template.S:78)
==2265==    by 0x1C77D1: mio::sys::unix::pipe (mod.rs:67)
==2265==    by 0x1C294F: mio::sys::unix::awakener::pipe::Awakener::new (awakener.rs:23)
==2265==    by 0x1B8440: mio::poll::ReadinessQueue::new (poll.rs:2108)
==2265==    by 0x1B5CEE: mio::poll::Poll::new (poll.rs:658)
==2265==    by 0x138E6C: tokio::io::driver::Driver::new (mod.rs:70)
==2265==    by 0x15EFEB: tokio::runtime::io::variant::create_driver (io.rs:35)
==2265==    by 0x161B36: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==2265==    by 0x15E786: tokio::runtime::builder::Builder::build (builder.rs:318)
==2265==    by 0x12B965: tokio::runtime::Runtime::new (mod.rs:343)
==2265==    by 0x125F94: tokio_mcve::main (main.rs:4)
==2265==    by 0x12704A: std::rt::lang_start::{{closure}} (rt.rs:67)
==2265==
==2265== Open file descriptor 3:
==2265==    at 0x49B9A9B: epoll_create1 (syscall-template.S:78)
==2265==    by 0x1C02A8: mio::sys::unix::epoll::Selector::new (epoll.rs:40)
==2265==    by 0x1B5C8B: mio::poll::Poll::new (poll.rs:657)
==2265==    by 0x138E6C: tokio::io::driver::Driver::new (mod.rs:70)
==2265==    by 0x15EFEB: tokio::runtime::io::variant::create_driver (io.rs:35)
==2265==    by 0x161B36: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==2265==    by 0x15E786: tokio::runtime::builder::Builder::build (builder.rs:318)
==2265==    by 0x12B965: tokio::runtime::Runtime::new (mod.rs:343)
==2265==    by 0x125F94: tokio_mcve::main (main.rs:4)
==2265==    by 0x12704A: std::rt::lang_start::{{closure}} (rt.rs:67)
==2265==    by 0x1DF007: {{closure}} (rt.rs:52)
==2265==    by 0x1DF007: do_call<closure-0,i32> (panicking.rs:331)
==2265==    by 0x1DF007: try<i32,closure-0> (panicking.rs:274)
==2265==    by 0x1DF007: catch_unwind<closure-0,i32> (panic.rs:394)
==2265==    by 0x1DF007: std::rt::lang_start_internal (rt.rs:51)
==2265==    by 0x127026: std::rt::lang_start (rt.rs:67)
==2265==
==2265== Open file descriptor 2: /dev/pts/2
==2265==    <inherited from parent>
==2265==
==2265== Open file descriptor 1: /dev/pts/2
==2265==    <inherited from parent>
==2265==
==2265== Open file descriptor 0: /dev/pts/2
==2265==    <inherited from parent>
==2265==
==2265==
==2265== HEAP SUMMARY:
==2265==     in use at exit: 75,689 bytes in 164 blocks
==2265==   total heap usage: 624 allocs, 460 frees, 123,688 bytes allocated
==2265==
==2265== LEAK SUMMARY:
==2265==    definitely lost: 0 bytes in 0 blocks
==2265==    indirectly lost: 0 bytes in 0 blocks
==2265==      possibly lost: 288 bytes in 1 blocks
==2265==    still reachable: 75,401 bytes in 163 blocks
==2265==         suppressed: 0 bytes in 0 blocks
==2265== Rerun with --leak-check=full to see details of leaked memory
==2265==
==2265== For lists of detected and suppressed errors, rerun with: -s
==2265== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Using UnixStream has the same issue

use tokio::{io::AsyncWriteExt, net::UnixStream, runtime::Runtime};

fn main() {
    let runtime = Runtime::new().unwrap();

    runtime.handle().block_on(async {
        let mut stream = UnixStream::connect("127.0.0.1:8080").await.unwrap();
        stream.write_all(b"hello world!").await.unwrap();
    });
}
Valgrind Output
$ valgrind --track-fds=yes target/debug/tokio-mcve
==2543== Memcheck, a memory error detector
==2543== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2543== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==2543== Command: target/debug/tokio-mcve
==2543==
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/main.rs:7:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
==2543==
==2543== FILE DESCRIPTORS: 6 open at exit.
==2543== Open file descriptor 5:
==2543==    at 0x49A893B: pipe2 (syscall-template.S:78)
==2543==    by 0x1BEAE1: mio::sys::unix::pipe (mod.rs:67)
==2543==    by 0x1B9D3F: mio::sys::unix::awakener::pipe::Awakener::new (awakener.rs:23)
==2543==    by 0x1B0630: mio::poll::ReadinessQueue::new (poll.rs:2108)
==2543==    by 0x1ADEDE: mio::poll::Poll::new (poll.rs:658)
==2543==    by 0x1365BC: tokio::io::driver::Driver::new (mod.rs:70)
==2543==    by 0x15AEBB: tokio::runtime::io::variant::create_driver (io.rs:35)
==2543==    by 0x15C6D6: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==2543==    by 0x15A656: tokio::runtime::builder::Builder::build (builder.rs:318)
==2543==    by 0x129235: tokio::runtime::Runtime::new (mod.rs:343)
==2543==    by 0x123964: tokio_mcve::main (main.rs:4)
==2543==    by 0x12476A: std::rt::lang_start::{{closure}} (rt.rs:67)
==2543==
==2543== Open file descriptor 4:
==2543==    at 0x49A893B: pipe2 (syscall-template.S:78)
==2543==    by 0x1BEAE1: mio::sys::unix::pipe (mod.rs:67)
==2543==    by 0x1B9D3F: mio::sys::unix::awakener::pipe::Awakener::new (awakener.rs:23)
==2543==    by 0x1B0630: mio::poll::ReadinessQueue::new (poll.rs:2108)
==2543==    by 0x1ADEDE: mio::poll::Poll::new (poll.rs:658)
==2543==    by 0x1365BC: tokio::io::driver::Driver::new (mod.rs:70)
==2543==    by 0x15AEBB: tokio::runtime::io::variant::create_driver (io.rs:35)
==2543==    by 0x15C6D6: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==2543==    by 0x15A656: tokio::runtime::builder::Builder::build (builder.rs:318)
==2543==    by 0x129235: tokio::runtime::Runtime::new (mod.rs:343)
==2543==    by 0x123964: tokio_mcve::main (main.rs:4)
==2543==    by 0x12476A: std::rt::lang_start::{{closure}} (rt.rs:67)
==2543==
==2543== Open file descriptor 3:
==2543==    at 0x49B9A9B: epoll_create1 (syscall-template.S:78)
==2543==    by 0x1B8068: mio::sys::unix::epoll::Selector::new (epoll.rs:40)
==2543==    by 0x1ADE7B: mio::poll::Poll::new (poll.rs:657)
==2543==    by 0x1365BC: tokio::io::driver::Driver::new (mod.rs:70)
==2543==    by 0x15AEBB: tokio::runtime::io::variant::create_driver (io.rs:35)
==2543==    by 0x15C6D6: tokio::runtime::builder::Builder::build_threaded_runtime (builder.rs:474)
==2543==    by 0x15A656: tokio::runtime::builder::Builder::build (builder.rs:318)
==2543==    by 0x129235: tokio::runtime::Runtime::new (mod.rs:343)
==2543==    by 0x123964: tokio_mcve::main (main.rs:4)
==2543==    by 0x12476A: std::rt::lang_start::{{closure}} (rt.rs:67)
==2543==    by 0x1D2BE7: {{closure}} (rt.rs:52)
==2543==    by 0x1D2BE7: do_call<closure-0,i32> (panicking.rs:331)
==2543==    by 0x1D2BE7: try<i32,closure-0> (panicking.rs:274)
==2543==    by 0x1D2BE7: catch_unwind<closure-0,i32> (panic.rs:394)
==2543==    by 0x1D2BE7: std::rt::lang_start_internal (rt.rs:51)
==2543==    by 0x124746: std::rt::lang_start (rt.rs:67)
==2543==
==2543== Open file descriptor 2: /dev/pts/2
==2543==    <inherited from parent>
==2543==
==2543== Open file descriptor 1: /dev/pts/2
==2543==    <inherited from parent>
==2543==
==2543== Open file descriptor 0: /dev/pts/2
==2543==    <inherited from parent>
==2543==
==2543==
==2543== HEAP SUMMARY:
==2543==     in use at exit: 73,641 bytes in 163 blocks
==2543==   total heap usage: 617 allocs, 454 frees, 121,491 bytes allocated
==2543==
==2543== LEAK SUMMARY:
==2543==    definitely lost: 0 bytes in 0 blocks
==2543==    indirectly lost: 0 bytes in 0 blocks
==2543==      possibly lost: 288 bytes in 1 blocks
==2543==    still reachable: 73,353 bytes in 162 blocks
==2543==         suppressed: 0 bytes in 0 blocks
==2543== Rerun with --leak-check=full to see details of leaked memory
==2543==
==2543== For lists of detected and suppressed errors, rerun with: -s
==2543== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

@emgre
Copy link
Contributor

emgre commented Jul 8, 2020

I think this is caused by the fact that the driver is leaked as described in #2535. I fixed it in PR #2649.

@carllerche
Copy link
Member

#2649 has merged, closing now. Thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

5 participants