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

Most if not all examples crash #1

Closed
Swoorup opened this issue Jan 16, 2019 · 7 comments
Closed

Most if not all examples crash #1

Swoorup opened this issue Jan 16, 2019 · 7 comments

Comments

@Swoorup
Copy link

Swoorup commented Jan 16, 2019

I have only tested this on windows. async-echo example

thread 'main' panicked at 'already borrowed: BorrowMutError', src\libcore\result.rs:997:5
stack backtrace:
   0: std::sys::windows::backtrace::set_frames
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\sys\windows\backtrace\mod.rs:94
   1: std::sys::windows::backtrace::unwind_backtrace
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\sys\windows\backtrace\mod.rs:81
   2: std::sys_common::backtrace::_print
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\sys_common\backtrace.rs:70
   3: std::sys_common::backtrace::print
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\sys_common\backtrace.rs:58
   4: std::panicking::default_hook::{{closure}}
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\panicking.rs:200
   5: std::panicking::default_hook
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\panicking.rs:215
   6: std::panicking::rust_panic_with_hook
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\panicking.rs:478
   7: std::panicking::continue_panic_fmt
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\panicking.rs:385
   8: std::panicking::rust_begin_panic
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\panicking.rs:312
   9: core::panicking::panic_fmt
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libcore\panicking.rs:85
  10: core::result::unwrap_failed<core::cell::BorrowMutError>
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\src\libcore\macros.rs:16
  11: core::result::Result<core::cell::RefMut<slab::Slab<asyncio::executor::Task>>, core::cell::BorrowMutError>::expect<core::cell::RefMut<slab::Slab<asyncio::executor::Task>>,core::cell::BorrowMutError>
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\src\libcore\result.rs:825
  12: core::cell::RefCell<slab::Slab<asyncio::executor::Task>>::borrow_mut<slab::Slab<asyncio::executor::Task>>
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\src\libcore\cell.rs:876
  13: asyncio::executor::spawn::{{closure}}<std::future::GenFuture<generator>>
             at .\src\executor.rs:239
  14: std::thread::local::LocalKey<asyncio::executor::Executor>::try_with<asyncio::executor::Executor,closure,core::result::Result<(), failure::error::Error>>
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\src\libstd\thread\local.rs:299
  15: std::thread::local::LocalKey<asyncio::executor::Executor>::with<asyncio::executor::Executor,closure,core::result::Result<(), failure::error::Error>>
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\src\libstd\thread\local.rs:245
  16: asyncio::executor::spawn<std::future::GenFuture<generator>>
             at .\src\executor.rs:224
  17: async_echo::main::{{closure}}
             at .\examples\async-echo.rs:18
  18: std::future::{{impl}}::poll::{{closure}}<generator>
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\src\libstd\future.rs:36
  19: std::future::set_task_waker<closure,core::task::poll::Poll<core::result::Result<(), failure::error::Error>>>
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\src\libstd\future.rs:67
  20: std::future::{{impl}}::poll<generator>
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\src\libstd\future.rs:36
  21: asyncio::executor::block_on::{{closure}}<core::result::Result<(), failure::error::Error>,std::future::GenFuture<generator>>
             at .\src\executor.rs:177
  22: std::thread::local::LocalKey<asyncio::executor::Executor>::try_with<asyncio::executor::Executor,closure,core::result::Result<core::result::Result<(), failure::error::Error>, failure::error::Error>>
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\src\libstd\thread\local.rs:299
  23: std::thread::local::LocalKey<asyncio::executor::Executor>::with<asyncio::executor::Executor,closure,core::result::Result<core::result::Result<(), failure::error::Error>, failure::error::Error>>
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\src\libstd\thread\local.rs:245
  24: asyncio::executor::block_on<core::result::Result<(), failure::error::Error>,std::future::GenFuture<generator>>
             at .\src\executor.rs:156
  25: async_echo::main
             at .\examples\async-echo.rs:12
  26: std::rt::lang_start::{{closure}}<core::result::Result<(), failure::error::Error>>
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\src\libstd\rt.rs:64
  27: std::rt::lang_start_internal::{{closure}}
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\rt.rs:49
  28: std::panicking::try::do_call<closure,i32>
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\panicking.rs:297
  29: panic_unwind::__rust_maybe_catch_panic
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libpanic_unwind\lib.rs:92
  30: std::panicking::try
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\panicking.rs:276
  31: std::panic::catch_unwind
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\panic.rs:388
  32: std::rt::lang_start_internal
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\/src\libstd\rt.rs:48
  33: std::rt::lang_start<core::result::Result<(), failure::error::Error>>
             at /rustc/e2f221c75932de7a29845c8d6f1f73536ad00c41\src\libstd\rt.rs:64
  34: main
  35: invoke_main
             at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  36: __scrt_common_main_seh
             at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  37: BaseThreadInitThunk
  38: RtlUserThreadStart
error: process didn't exit successfully: `target\debug\examples\async-echo.exe` (exit code: 101)
@Hexilee
Copy link
Owner

Hexilee commented Jan 17, 2019

could you provide your toolchain version?

@Swoorup
Copy link
Author

Swoorup commented Jan 17, 2019

rustc 1.33.0-nightly (e2f221c75 2019-01-15)

I also had to renamed Box::pinned to Box::pin

Can also confirm that this crashes on linux using the same compiler

@Hexilee
Copy link
Owner

Hexilee commented Jan 17, 2019

Are you sure? You can try again with the new branch 1.33. I can run example async-echo successfully on rustc 1.33.0-gnu-nightly-2019-01-16 and rustc 1.33.0-darwin-nightly-2019-01-16

@Swoorup
Copy link
Author

Swoorup commented Jan 17, 2019

I probably was not descriptive enough. It runs but as soon as I visit the URL the browser displays something, the program then crashes.

@Hexilee
Copy link
Owner

Hexilee commented Jan 18, 2019

I should fix it in both of branch master and branch 1.32.

@Hexilee
Copy link
Owner

Hexilee commented Jan 18, 2019

And.. this is a tcp server, you should access it using other tcp client like telnet instead of browser

@Swoorup
Copy link
Author

Swoorup commented Jan 20, 2019

Cool, can confirm don't have encountered much issues since. The async-echo program closes as soon as it replays back the stream which is bit unusual, but that is just implementation detail

@Hexilee Hexilee closed this as completed Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants