From 61b3a8b2f9c44230d1a2373487c8d9dfa8522c55 Mon Sep 17 00:00:00 2001 From: Leonardo Yvens Date: Tue, 14 May 2019 12:48:46 -0300 Subject: [PATCH 1/5] graph: Bump tokio version from `0.1.15` to `0.1.19` --- Cargo.lock | 105 ++++++++++++++++++++++++++++++----------------- graph/Cargo.toml | 2 +- 2 files changed, 68 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b87965f874e..00cfe394199 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -440,6 +440,15 @@ dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-deque" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-epoch" version = "0.7.1" @@ -453,6 +462,14 @@ dependencies = [ "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "crossbeam-queue" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "crossbeam-utils" version = "0.6.5" @@ -868,8 +885,8 @@ dependencies = [ "slog-envlogger 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-term 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-retry 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1179,12 +1196,12 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1278,7 +1295,7 @@ dependencies = [ "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1356,7 +1373,7 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2122,10 +2139,10 @@ dependencies = [ "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2634,7 +2651,7 @@ dependencies = [ [[package]] name = "tokio" -version = "0.1.15" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2642,15 +2659,16 @@ dependencies = [ "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-fs 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2676,8 +2694,8 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2685,11 +2703,11 @@ dependencies = [ [[package]] name = "tokio-current-thread" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2700,12 +2718,12 @@ dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-executor" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2714,12 +2732,12 @@ dependencies = [ [[package]] name = "tokio-fs" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2745,7 +2763,7 @@ dependencies = [ "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2761,9 +2779,10 @@ dependencies = [ [[package]] name = "tokio-sync" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2782,19 +2801,18 @@ dependencies = [ [[package]] name = "tokio-threadpool" -version = "0.1.11" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2814,7 +2832,7 @@ dependencies = [ "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2827,6 +2845,14 @@ dependencies = [ "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio-trace-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tokio-tungstenite" version = "0.6.0" @@ -3282,7 +3308,9 @@ dependencies = [ "checksum crossbeam 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ad4c7ea749d9fb09e23c5cb17e3b70650860553a0e2744e38446b1803bf7db94" "checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" "checksum crossbeam-deque 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "05e44b8cf3e1a625844d1750e1f7820da46044ff6d28f4d43e455ba3e5bb2c13" +"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" "checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" +"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" "checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" "checksum crunchy 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f4a431c5c9f662e1200b7c7f02c34e91361150e382089a8f2dec3ba680cbda" "checksum crypto-mac 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0999b4ff4d3446d4ddb19a63e9e00c1876e75cd7000d20e57a693b4b3f08d958" @@ -3501,22 +3529,23 @@ dependencies = [ "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9175261fbdb60781fcd388a4d6cc7e14764a2b629a7ad94abb439aed223a44f" -"checksum tokio 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "e0500b88064f08bebddd0c0bed39e19f5c567a5f30975bee52b0c0d3e2eeb38c" +"checksum tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "cec6c34409089be085de9403ba2010b80e36938c9ca992c4f67f407bb13db0b1" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" "checksum tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "aeeffbbb94209023feaef3c196a41cbcdafa06b4a6f893f68779bb5e53796f71" -"checksum tokio-current-thread 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "331c8acc267855ec06eb0c94618dcbbfea45bed2d20b77252940095273fb58f6" +"checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" "checksum tokio-dns-unofficial 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb9bf62ca2c53bf2f2faec3e48a98b6d8c9577c27011cb0203a4beacdc8ab328" -"checksum tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30c6dbf2d1ad1de300b393910e8a3aa272b724a400b6531da03eed99e329fbf0" -"checksum tokio-fs 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e9cbbc8a3698b7ab652340f46633364f9eaa928ddaaee79d8b8f356dd79a09d" +"checksum tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "83ea44c6c0773cc034771693711c35c677b4b5a4b21b9e7071704c54de7d555e" +"checksum tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" "checksum tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b53aeb9d3f5ccf2ebb29e19788f96987fa1355f8fe45ea193928eaaaf3ae820f" "checksum tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "afbcdb0f0d2a1e4c440af82d7bbf0bf91a8a8c0575bcd20c05d15be7e9d3a02f" "checksum tokio-retry 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c03755b956458582182941061def32b8123a26c98b08fc6ddcf49ae89d18f33" -"checksum tokio-sync 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c73850a5ad497d73ccfcfc0ffb494a4502d93f35cb475cfeef4fcf2916d26040" +"checksum tokio-sync 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "5b2f843ffdf8d6e1f90bddd48da43f99ab071660cd92b7ec560ef3cdfd7a409a" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" -"checksum tokio-threadpool 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c3fd86cb15547d02daa2b21aadaf4e37dee3368df38a526178a5afa3c034d2fb" +"checksum tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72558af20be886ea124595ea0f806dd5703b8958e4705429dd58b3d8231f72f2" "checksum tokio-timer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6131e780037787ff1b3f8aad9da83bca02438b72277850dd6ad0d455e0e20efc" "checksum tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2910970404ba6fa78c5539126a9ae2045d62e3713041e447f695f41405a120c6" "checksum tokio-tls 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "354b8cd83825b3c20217a9dc174d6a0c67441a2fae5c41bcb1ea6679f6ae0f7c" +"checksum tokio-trace-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "350c9edade9830dc185ae48ba45667a445ab59f6167ef6d0254ec9d2430d9dd3" "checksum tokio-tungstenite 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4e744ff297473d047436c108c99e478fd73c1dd27e2c08e352907dcd864c720f" "checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" "checksum tokio-uds 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "65ae5d255ce739e8537221ed2942e0445f4b3b813daebac1c0050ddaaa3587f9" diff --git a/graph/Cargo.toml b/graph/Cargo.toml index 6b9817d0b4e..f315dd06525 100644 --- a/graph/Cargo.toml +++ b/graph/Cargo.toml @@ -39,7 +39,7 @@ slog-async = "2.3.0" slog-envlogger = "2.1.0" slog-term = "2.4.0" tiny-keccak = "1.4.2" -tokio = "0.1.11" +tokio = "0.1.19" tokio-executor = "0.1.5" tokio-retry = "0.2" tokio-timer = "0.2.7" From 7889419a57872ec77a77079c8fa0d12f4f1886ac Mon Sep 17 00:00:00 2001 From: Leonardo Yvens Date: Tue, 14 May 2019 13:17:02 -0300 Subject: [PATCH 2/5] node: Shutdown the runtime sucessfuly on panic Previously the panic handler itself would block the runtime from shutting down. --- graph/src/log/mod.rs | 12 +++++++----- node/src/main.rs | 5 ++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/graph/src/log/mod.rs b/graph/src/log/mod.rs index 2d774e9d8e2..da533cacefe 100644 --- a/graph/src/log/mod.rs +++ b/graph/src/log/mod.rs @@ -89,9 +89,7 @@ pub fn register_panic_hook(panic_logger: Logger, shutdown_sender: oneshot::Sende return; } - // Send a shutdown signal to main which will attempt to cleanly shutdown the runtime - // After sending shutdown, the thread sleeps for 3 seconds then forces the process to - // exit because the shutdown is not always able to cleanly exit all workers + // Send a shutdown signal to main which will attempt to cleanly shutdown the runtime. match shutdown_mutex.lock().unwrap().take() { Some(sender) => sender .send(()) @@ -103,7 +101,11 @@ pub fn register_panic_hook(panic_logger: Logger, shutdown_sender: oneshot::Sende .unwrap_or(()), None => debug!(panic_logger, "Shutdown signal already sent"), } - thread::sleep(Duration::from_millis(3000)); - process::exit(1); + + // If shutting down the runtime takes too long, exit the process anyways. + thread::spawn(|| { + thread::sleep(Duration::from_millis(3000)); + process::exit(1); + }); })); } diff --git a/node/src/main.rs b/node/src/main.rs index b181781f182..bfe2b4e4860 100644 --- a/node/src/main.rs +++ b/node/src/main.rs @@ -587,7 +587,10 @@ fn async_main() -> impl Future + Send + 'static { std::thread::spawn(move || loop { std::thread::sleep(Duration::from_millis(100)); let (pong_send, pong_receive) = crossbeam_channel::bounded(1); - ping_send.clone().send(pong_send).wait().unwrap(); + if ping_send.clone().send(pong_send).wait().is_err() { + debug!(contention_logger, "Shutting down contention checker thread"); + break; + } let mut timeout = Duration::from_millis(1); while pong_receive.recv_timeout(timeout).is_err() { warn!(contention_logger, "Possible contention in tokio threadpool"; From 551009ad9578060ad16e7b58f2485c1ed6863165 Mon Sep 17 00:00:00 2001 From: Leonardo Yvens Date: Tue, 14 May 2019 15:28:30 -0300 Subject: [PATCH 3/5] graph: Bump tokio from `0.1.19` to `0.1.20` Things are moving fast! --- Cargo.lock | 18 +++++++++--------- graph/Cargo.toml | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 00cfe394199..9ba90c8de85 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -885,7 +885,7 @@ dependencies = [ "slog-envlogger 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-term 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-retry 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1196,7 +1196,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1295,7 +1295,7 @@ dependencies = [ "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1373,7 +1373,7 @@ dependencies = [ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2139,7 +2139,7 @@ dependencies = [ "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-threadpool 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2651,7 +2651,7 @@ dependencies = [ [[package]] name = "tokio" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2694,7 +2694,7 @@ dependencies = [ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-reactor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2718,7 +2718,7 @@ dependencies = [ "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3529,7 +3529,7 @@ dependencies = [ "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tiny-keccak 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9175261fbdb60781fcd388a4d6cc7e14764a2b629a7ad94abb439aed223a44f" -"checksum tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "cec6c34409089be085de9403ba2010b80e36938c9ca992c4f67f407bb13db0b1" +"checksum tokio 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "94a1f9396aec29d31bb16c24d155cfa144d1af91c40740125db3131bdaf76da8" "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" "checksum tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "aeeffbbb94209023feaef3c196a41cbcdafa06b4a6f893f68779bb5e53796f71" "checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" diff --git a/graph/Cargo.toml b/graph/Cargo.toml index f315dd06525..a227682409d 100644 --- a/graph/Cargo.toml +++ b/graph/Cargo.toml @@ -39,7 +39,7 @@ slog-async = "2.3.0" slog-envlogger = "2.1.0" slog-term = "2.4.0" tiny-keccak = "1.4.2" -tokio = "0.1.19" +tokio = "0.1.20" tokio-executor = "0.1.5" tokio-retry = "0.2" tokio-timer = "0.2.7" From 954cf982969fec40dad643c9d3406f0c03a8e62f Mon Sep 17 00:00:00 2001 From: Leonardo Yvens Date: Tue, 14 May 2019 17:14:04 -0300 Subject: [PATCH 4/5] node, runtime: Simplify panic handling Use `panic_handler` in the runtime builider to simplify our panic handling logic. --- graph/src/log/mod.rs | 83 +--------------------------------------- node/src/main.rs | 69 ++++++++++++++++++--------------- runtime/wasm/src/host.rs | 7 +--- 3 files changed, 43 insertions(+), 116 deletions(-) diff --git a/graph/src/log/mod.rs b/graph/src/log/mod.rs index da533cacefe..cf943899244 100644 --- a/graph/src/log/mod.rs +++ b/graph/src/log/mod.rs @@ -1,19 +1,13 @@ -use backtrace::Backtrace; -use futures::sync::oneshot; -use slog::{crit, debug, o, Drain, FilterLevel, Logger}; +use slog::{o, Drain, FilterLevel, Logger}; use slog_async; use slog_envlogger; use slog_term; -use std::sync::Mutex; -use std::time::Duration; -use std::{env, panic, process, thread}; +use std::env; pub mod codes; pub mod elastic; pub mod split; -pub const MAPPING_THREAD_PREFIX: &str = "mapping-thread"; - pub fn logger(show_debug: bool) -> Logger { let decorator = slog_term::TermDecorator::new().build(); let drain = slog_term::CompactFormat::new(decorator).build().fuse(); @@ -36,76 +30,3 @@ pub fn logger(show_debug: bool) -> Logger { let drain = slog_async::Async::new(drain).build().fuse(); Logger::root(drain, o!()) } - -pub fn guarded_logger() -> (Logger, slog_async::AsyncGuard) { - let decorator = slog_term::TermDecorator::new().build(); - let drain = slog_term::CompactFormat::new(decorator).build().fuse(); - let (drain, guard) = slog_async::Async::new(drain).build_with_guard(); - (Logger::root(drain.fuse(), o!()), guard) -} - -pub fn register_panic_hook(panic_logger: Logger, shutdown_sender: oneshot::Sender<()>) { - let shutdown_mutex = Mutex::new(Some(shutdown_sender)); - panic::set_hook(Box::new(move |panic_info| { - let panic_payload = panic_info - .payload() - .downcast_ref::() - .cloned() - .or_else(|| { - panic_info - .payload() - .downcast_ref::<&str>() - .map(|s| s.to_string()) - }); - - let panic_location = if let Some(location) = panic_info.location() { - format!("{}:{}", location.file(), location.line().to_string()) - } else { - "NA".to_string() - }; - - match env::var_os("RUST_BACKTRACE") { - Some(ref val) if val != "0" => { - crit!( - panic_logger, "{}", panic_payload.unwrap(); - "location" => &panic_location, - "backtrace" => format!("{:?}", Backtrace::new()), - ); - } - _ => { - crit!( - panic_logger, "{}", panic_payload.unwrap(); - "location" => &panic_location, - ); - } - }; - - // Don't kill the process when a mapping thread panics. - if thread::current() - .name() - .filter(|name| name.starts_with(MAPPING_THREAD_PREFIX)) - .is_some() - { - return; - } - - // Send a shutdown signal to main which will attempt to cleanly shutdown the runtime. - match shutdown_mutex.lock().unwrap().take() { - Some(sender) => sender - .send(()) - .map(|_| ()) - .map_err(|_| { - crit!(panic_logger, "Failed to send shutdown signal"); - () - }) - .unwrap_or(()), - None => debug!(panic_logger, "Shutdown signal already sent"), - } - - // If shutting down the runtime takes too long, exit the process anyways. - thread::spawn(|| { - thread::sleep(Duration::from_millis(3000)); - process::exit(1); - }); - })); -} diff --git a/node/src/main.rs b/node/src/main.rs index bfe2b4e4860..a2d7ee08dea 100644 --- a/node/src/main.rs +++ b/node/src/main.rs @@ -18,7 +18,7 @@ extern crate lazy_static; extern crate url; use clap::{App, Arg}; -use futures::sync::{mpsc, oneshot}; +use futures::sync::mpsc; use git_testament::{git_testament, render_testament}; use ipfs_api::IpfsClient; use lazy_static::lazy_static; @@ -27,7 +27,7 @@ use std::str::FromStr; use std::time::Duration; use graph::components::forward; -use graph::log::{guarded_logger, logger, register_panic_hook}; +use graph::log::logger; use graph::prelude::{JsonRpcServer as JsonRpcServerTrait, *}; use graph::tokio_executor; use graph::tokio_timer; @@ -63,38 +63,45 @@ lazy_static! { git_testament!(TESTAMENT); fn main() { - let (shutdown_sender, shutdown_receiver) = oneshot::channel(); - // Register guarded panic logger which ensures logs flush on shutdown - let (panic_logger, _panic_guard) = guarded_logger(); - register_panic_hook(panic_logger, shutdown_sender); - - // Create components for tokio context: multi-threaded runtime, - // executor context on the runtime, and Timer handle. - let runtime = tokio::runtime::Runtime::new().expect("Failed to create runtime"); - let mut executor = runtime.executor(); + use std::sync::Mutex; + use tokio::runtime; + + // Create components for tokio context: multi-threaded runtime, executor + // context on the runtime, and Timer handle. + // + // Configure the runtime to shutdown after a panic. + let runtime: Arc>> = Arc::new(Mutex::new(None)); + let handler_runtime = runtime.clone(); + *runtime.lock().unwrap() = Some( + runtime::Builder::new() + .panic_handler(move |_| { + let runtime = handler_runtime.clone(); + std::thread::spawn(move || { + if let Some(runtime) = runtime.lock().unwrap().take() { + // Try to cleanly shutdown the runtime, but + // unconditionally exit after a while. + std::thread::spawn(|| { + std::thread::sleep(Duration::from_millis(3000)); + std::process::exit(1); + }); + runtime + .shutdown_now() + .wait() + .expect("Failed to shutdown Tokio Runtime"); + println!("Runtime cleaned up and shutdown successfully"); + } + }); + }) + .build() + .unwrap(), + ); + + let mut executor = runtime.lock().unwrap().as_ref().unwrap().executor(); let mut enter = tokio_executor::enter() .expect("Failed to enter runtime executor, multiple executors at once"); let timer = Timer::default(); let timer_handle = timer.handle(); - // Shutdown the runtime after a panic - std::thread::spawn(|| { - let shutdown_logger = logger(false); - shutdown_receiver - .wait() - .map(|_| { - let _ = runtime - .shutdown_now() - .wait() - .expect("Failed to shutdown Tokio Runtime"); - info!( - shutdown_logger, - "Runtime cleaned up and shutdown successfully" - ); - }) - .expect("Runtime shutdown process did not finish"); - }); - // Setup runtime context with defaults and run the main application tokio_executor::with_default(&mut executor, &mut enter, |enter| { tokio_timer::with_default(&timer_handle, enter, |enter| { @@ -592,7 +599,9 @@ fn async_main() -> impl Future + Send + 'static { break; } let mut timeout = Duration::from_millis(1); - while pong_receive.recv_timeout(timeout).is_err() { + while pong_receive.recv_timeout(timeout) + == Err(crossbeam_channel::RecvTimeoutError::Timeout) + { warn!(contention_logger, "Possible contention in tokio threadpool"; "timeout_ms" => timeout.as_millis(), "code" => LogCode::TokioContention); diff --git a/runtime/wasm/src/host.rs b/runtime/wasm/src/host.rs index f3e9572f55d..7e8c0dc45bb 100644 --- a/runtime/wasm/src/host.rs +++ b/runtime/wasm/src/host.rs @@ -12,7 +12,6 @@ use graph::components::ethereum::*; use graph::components::store::Store; use graph::data::subgraph::{DataSource, Source}; use graph::ethabi::{LogParam, RawLog}; -use graph::log; use graph::prelude::{ RuntimeHost as RuntimeHostTrait, RuntimeHostBuilder as RuntimeHostBuilderTrait, *, }; @@ -199,10 +198,8 @@ impl RuntimeHost { // dropping the `mapping_request_receiver` which ultimately causes the // subgraph to fail the next time it tries to handle an event. let conf = thread::Builder::new().name(format!( - "{}-{}-{}", - log::MAPPING_THREAD_PREFIX, - config.subgraph_id, - data_source_name + "mapping-{}-{}", + config.subgraph_id, data_source_name )); conf.spawn(move || { debug!(module_logger, "Start WASM runtime"); From 691dd832f1a69c9d146b51a3a7da9ec74a84165c Mon Sep 17 00:00:00 2001 From: Leonardo Yvens Date: Tue, 14 May 2019 18:09:15 -0300 Subject: [PATCH 5/5] node: Increase thread pool size to 100 I could still observe a small amount of contention and waiting after this, but it's reduced a lot from before. Part of #937. --- node/src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/node/src/main.rs b/node/src/main.rs index a2d7ee08dea..78790c6ed76 100644 --- a/node/src/main.rs +++ b/node/src/main.rs @@ -74,6 +74,7 @@ fn main() { let handler_runtime = runtime.clone(); *runtime.lock().unwrap() = Some( runtime::Builder::new() + .core_threads(100) .panic_handler(move |_| { let runtime = handler_runtime.clone(); std::thread::spawn(move || {