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

Toikio runtime error #4

Closed
shonfeder opened this issue Jan 8, 2021 · 12 comments
Closed

Toikio runtime error #4

shonfeder opened this issue Jan 8, 2021 · 12 comments
Labels
bug Something isn't working waiting-for-upstream

Comments

@shonfeder
Copy link

shonfeder commented Jan 8, 2021

Very promising utility! Thank you :)

We are trying to set this up in our CI, but hitting a tokio runtime error. Here is a trace produced with RUST_BAKCTRACKE=full:

thread 'tokio-runtime-worker' panicked at 'not currently running on the Tokio runtime.', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.22/src/runtime/handle.rs:118:28
stack backtrace:
   0:     0x5596babccc70 - std::backtrace_rs::backtrace::libunwind::trace::h04d12fdcddff82aa
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/../../backtrace/src/backtrace/libunwind.rs:100:5
   1:     0x5596babccc70 - std::backtrace_rs::backtrace::trace_unsynchronized::h1459b974b6fbe5e1
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x5596babccc70 - std::sys_common::backtrace::_print_fmt::h9b8396a669123d95
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x5596babccc70 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he009dcaaa75eed60
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x5596babf032c - core::fmt::write::h77b4746b0dea1dd3
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/fmt/mod.rs:1078:17
   5:     0x5596babc5af2 - std::io::Write::write_fmt::heb7e50902e98831c
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/io/mod.rs:1518:15
   6:     0x5596babcf295 - std::sys_common::backtrace::_print::h2d880c9e69a21be9
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x5596babcf295 - std::sys_common::backtrace::print::h5f02b1bb49f36879
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x5596babcf295 - std::panicking::default_hook::{{closure}}::h658e288a7a809b29
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:208:50
   9:     0x5596babcef38 - std::panicking::default_hook::hb52d73f0da9a4bb8
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:227:9
  10:     0x5596babcfa31 - std::panicking::rust_panic_with_hook::hfe7e1c684e3e6462
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:593:17
  11:     0x5596babcf577 - std::panicking::begin_panic_handler::{{closure}}::h42939e004b32765c
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:499:13
  12:     0x5596babcd12c - std::sys_common::backtrace::__rust_end_short_backtrace::h9d2070f7bf9fd56c
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x5596babcf4d9 - rust_begin_unwind
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/panicking.rs:495:5
  14:     0x5596babedfb1 - core::panicking::panic_fmt::ha0bb065d9a260792
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/panicking.rs:92:14
  15:     0x5596babedd43 - core::option::expect_failed::h4c033402fb75f2bf
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/option.rs:1260:5
  16:     0x5596baa6eff1 - tokio::runtime::handle::Handle::current::ha96f9b87de88945a
  17:     0x5596ba9513c5 - tokio::runtime::blocking::pool::spawn_blocking::h48d8eb66ca56c37c
  18:     0x5596ba960efc - <hyper::client::connect::dns::GaiResolver as tower_service::Service<hyper::client::connect::dns::Name>>::call::ha6caa77d3238ba36
  19:     0x5596ba8785c3 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h6d2fdba67ca2a4d9
  20:     0x5596ba87b2d6 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hb369d20dc3c4460c
  21:     0x5596ba883272 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::he5270fa0d1b0e32a
  22:     0x5596ba883954 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hec84679a73862f34
  23:     0x5596ba891700 - <hyper::service::oneshot::Oneshot<S,Req> as core::future::future::Future>::poll::h8248a346f62ae3cf
  24:     0x5596ba8f9f43 - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::h188bbbc53295e174
  25:     0x5596ba8fbf7c - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::hb744b892a0754836
  26:     0x5596ba8c6db0 - <futures_util::future::try_future::try_flatten::TryFlatten<Fut,<Fut as futures_core::future::TryFuture>::Ok> as core::future::future::Future>::poll::h1e1a2f078ac740d9
  27:     0x5596ba9065a3 - <hyper::common::lazy::Lazy<F,R> as core::future::future::Future>::poll::h8ef353031301abfb
  28:     0x5596ba8fadfe - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::h5449dc8c5939a14b
  29:     0x5596ba8ec733 - <futures_util::future::future::flatten::Flatten<Fut,<Fut as core::future::future::Future>::Output> as core::future::future::Future>::poll::hdbaa70c7872ee2d5
  30:     0x5596ba8fb2be - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::h6f3f6b04dbb91bd4
  31:     0x5596ba8c7607 - <futures_util::future::try_future::try_flatten::TryFlatten<Fut,<Fut as futures_core::future::TryFuture>::Ok> as core::future::future::Future>::poll::hff06c07390f9fe4c
  32:     0x5596ba8db33e - <futures_util::future::poll_fn::PollFn<F> as core::future::future::Future>::poll::h190cce32350404e8
  33:     0x5596ba9540b1 - <hyper::client::ResponseFuture as core::future::future::Future>::poll::hd5d3e67d2e5a386d
  34:     0x5596ba8df6c8 - <reqwest::async_impl::client::PendingRequest as core::future::future::Future>::poll::hecb61596f5e67e74
  35:     0x5596ba8df5cd - <reqwest::async_impl::client::Pending as core::future::future::Future>::poll::heefe428c8b026eba
  36:     0x5596ba81a74b - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::hf4c2b3d55226607f
  37:     0x5596ba8275af - <futures_util::future::try_future::try_flatten::TryFlatten<Fut,<Fut as futures_core::future::TryFuture>::Ok> as core::future::future::Future>::poll::h7b0c5395a8d9cc10
  38:     0x5596ba819306 - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::ha9c46b590bb1036b
  39:     0x5596ba82684d - <futures_util::future::try_future::try_flatten::TryFlatten<Fut,<Fut as futures_core::future::TryFuture>::Ok> as core::future::future::Future>::poll::h153d5f01992c0c10
  40:     0x5596ba7d1669 - <futures_util::future::try_future::AndThen<Fut1,Fut2,F> as core::future::future::Future>::poll::hcfea5f076abfc10d
  41:     0x5596ba81905c - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::h86c54c84c6395c1f
  42:     0x5596ba7d1639 - <futures_util::future::try_future::MapOk<Fut,F> as core::future::future::Future>::poll::h32bd97ae42308282
  43:     0x5596ba53a76e - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h8e0397bc56e02a18
  44:     0x5596ba59cc21 - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::hcf4a58d87c105805
  45:     0x5596ba5f14f8 - tokio::runtime::task::harness::Harness<T,S>::poll::hdfec8d71d6ccb250
  46:     0x5596baa74721 - std::thread::local::LocalKey<T>::with::h848442eb0d5943c5
  47:     0x5596baa9190c - tokio::runtime::thread_pool::worker::Context::run_task::habb45a59caf9f439
  48:     0x5596baa90d85 - tokio::runtime::thread_pool::worker::Context::run::hb0566a7d8888162f
  49:     0x5596baa76b35 - tokio::macros::scoped_tls::ScopedKey<T>::set::h77527d491a9f0090
  50:     0x5596baa90446 - tokio::runtime::thread_pool::worker::run::h85c2f07fb5f23aca
  51:     0x5596baa8bf40 - tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut::heea0107c5a745ef1
  52:     0x5596baa95bff - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h623daca22f10b316
  53:     0x5596baa9d263 - tokio::runtime::task::harness::Harness<T,S>::poll::hd92b4305da53de1b
  54:     0x5596baa87b09 - tokio::runtime::blocking::pool::Inner::run::he43dd590140b6e88
  55:     0x5596baa7420e - std::sys_common::backtrace::__rust_begin_short_backtrace::h5929b2ece450dc2e
  56:     0x5596baa9a694 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h7b3347f8d58bd52e
  57:     0x5596babd330a - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h09ff301006f1aeca
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/alloc/src/boxed.rs:1307:9
  58:     0x5596babd330a - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he79488c8f00b5f31
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/alloc/src/boxed.rs:1307:9
  59:     0x5596babd330a - std::sys::unix::thread::Thread::new::thread_start::h587efff279c68ba7
                               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/std/src/sys/unix/thread.rs:71:17
  60:     0x7fd4ac75ffa3 - start_thread
  61:     0x7fd4ac8914cf - clone
  62:                0x0 - <unknown>
🚫 https://lamport.azurewebsites.net/tla/current-tools.pdf/n// [404 Not Found]

In case it's to do with the source being parsed, the relevent section of HTML looks like this:

<a href="https://lamport.azurewebsites.net/tla/current-tools.pdf">Current Versions of the TLA+ Tools</a>.

(Unless it is trying to parse out of a code block, which I don't think it is).

I can report that running lychee 0.4.1 locally on the same content does not produce this problem.

For reference, here is a failing pipeline: https://github.com/informalsystems/apalache/runs/1670165829?check_suite_focus=true#logs

@alebcay
Copy link

alebcay commented Feb 2, 2021

I am also seeing this issue, but I was able to reproduce the issue in my local (non-CI) environment, so I've opened lycheeverse/lychee#131.

@mre
Copy link
Member

mre commented Feb 2, 2021

I can report that running lychee 0.4.1 locally on the same content does not produce this problem.

Thanks. We migrated to tokio 1.0 in 0.5.0. That's where the issue is coming from. Apparently one of our deps is still using an older version of tokio that is incompatible. Investigating.

@mre
Copy link
Member

mre commented Feb 9, 2021

As mentioned in lycheeverse/lychee#131, the reason most likely https://github.com/reacherhq/check-if-email-exists. The issue is fixed in the master branch, but we're waiting on a new release so we can bump the dependency version to see if that fixes the problem.

@mre mre added bug Something isn't working waiting-for-upstream labels Feb 12, 2021
@mre
Copy link
Member

mre commented Feb 15, 2021

We decided to merge in the changes to lychee-master, which means that the Github action should now be working as expected. As soon as upstream merges in the changes, we'll do another release. Gonna close this as the problem should be resolved. Please reopen if this is not the case. 😃 Thanks for reporting.

@mre mre closed this as completed Feb 15, 2021
@alebcay
Copy link

alebcay commented Mar 21, 2021

Hi @mre, sorry for the delay in getting back on this. I'm currently using this action with https://github.com/nektos/act locally for testing and still seeing the issue with v1.0.6 of this action.

@mre mre reopened this Mar 22, 2021
@mre
Copy link
Member

mre commented Mar 22, 2021

That's sad to hear; reopened.

@mre
Copy link
Member

mre commented Mar 22, 2021

It could be that there's still a crate that is using a version of tokio older than 1.x. Any chance you can dump the versions of the dependencies?
Also a cargo tree would help. Perhaps you can spot the dependency there.

@alebcay
Copy link

alebcay commented Mar 22, 2021

The plot thickens for me at the moment - running cargo tree in the Lychee source tree results in:

error: failed to get `async-smtp` as a dependency of package `check-if-email-exists v0.8.19 (https://github.com/reacherhq/check-if-email-exists.git#387ce62a)`

https://github.com/reacherhq/check-if-email-exists/blob/master/core/Cargo.toml notes the dependency on async-smtp but https://github.com/amaurym/async-smtp is a 404. check-if-email-exists is tracking this at reacherhq/check-if-email-exists#888.

@alebcay
Copy link

alebcay commented Mar 29, 2021

Managed to run a cargo tree with recent changes in lychee. Couldn't find any versions of tokio less than 1.x. Building and running lychee (current HEAD) outside of the CI environment on my previous test/use case seems to work without errors. Will just wait for the next version of this action before I try in CI environment again.

@mre
Copy link
Member

mre commented Mar 29, 2021

Thanks so much for the feedback.

@alebcay
Copy link

alebcay commented Apr 23, 2021

FYI, I'm unable to reproduce this issue anymore (locally or in CI environment).

@mre
Copy link
Member

mre commented Apr 23, 2021

Great! Thanks for the feedback. Closing. 🙌

@mre mre closed this as completed Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting-for-upstream
Projects
None yet
Development

No branches or pull requests

3 participants