diesel icon indicating copy to clipboard operation
diesel copied to clipboard

[diesel_cli] index out of bounds when running migrations on windows 10 WSL

Open MTRNord opened this issue 5 years ago • 1 comments

Setup

Versions

  • Rust: rustc 1.37.0-nightly (929b48ec9 2019-06-21)
  • Diesel: diesel 1.4.0
  • Database: Postgresql 11
  • Operating System: Windows 10 WSL with Debian stretch

Feature Flags

  • diesel: postgres

Problem Description

When running diesel migration run I get a thread panick.

What are you trying to accomplish?

I am trying to run the migrations for that project.

What is the expected output?

That all migrations are applied

What is the actual output?

marcel@DESKTOP-1HTO3TF:/mnt/c/Users/marce/IdeaProjects/bunnysync$ diesel migration run
thread 'main' panicked at 'index out of bounds: the len is 256 but the index is 290', src/libcore/unicode/bool_trie.rs:42:25
stack backtrace:
   0:     0x7f96a3203a8b - backtrace::backtrace::libunwind::trace::hcc11b0051d9c739c
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/libunwind.rs:88
   1:     0x7f96a3203a8b - backtrace::backtrace::trace_unsynchronized::h3b58410f75e96857
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/mod.rs:66
   2:     0x7f96a3203a8b - std::sys_common::backtrace::_print::h3b42c4b088f05103
                               at src/libstd/sys_common/backtrace.rs:47
   3:     0x7f96a3203a8b - std::sys_common::backtrace::print::h4cc39805027fc680
                               at src/libstd/sys_common/backtrace.rs:36
   4:     0x7f96a3203a8b - std::panicking::default_hook::{{closure}}::h2e800464f258e026
                               at src/libstd/panicking.rs:198
   5:     0x7f96a3203767 - std::panicking::default_hook::ha44ddd2fe3d1fda2
                               at src/libstd/panicking.rs:212
   6:     0x7f96a32041a0 - std::panicking::rust_panic_with_hook::hb20e5ee9c7b3a62c
                               at src/libstd/panicking.rs:475
   7:     0x7f96a3203d22 - std::panicking::continue_panic_fmt::h6bd583e9533c73b9
                               at src/libstd/panicking.rs:382
   8:     0x7f96a3203c06 - rust_begin_unwind
                               at src/libstd/panicking.rs:309
   9:     0x7f96a322315d - core::panicking::panic_fmt::h5152ff697a341efd
                               at src/libcore/panicking.rs:85
  10:     0x7f96a3223115 - core::panicking::panic_bounds_check::h79a50406288c243d
                               at src/libcore/panicking.rs:61
  11:     0x7f96a32282f1 - core::unicode::bool_trie::BoolTrie::lookup::h8f9a1feedbf812da
                               at src/libcore/unicode/bool_trie.rs:0
  12:     0x7f96a322773e - core::unicode::tables::derived_property::Grapheme_Extend::h6e780c9a0384b93a
                               at src/libcore/unicode/tables.rs:681
  13:     0x7f96a322773e - core::char::methods::<impl char>::is_grapheme_extended::h6f3281f3fd457514
                               at src/libcore/char/methods.rs:712
  14:     0x7f96a322773e - core::char::methods::<impl char>::escape_debug_ext::h113f39783b4cfdc7
                               at src/libcore/char/methods.rs:200
  15:     0x7f96a322773e - core::char::methods::<impl char>::escape_debug::heba914d395f7cedf
                               at src/libcore/char/methods.rs:246
  16:     0x7f96a322773e - <str as core::fmt::Debug>::fmt::h47ee3664f9306198
                               at src/libcore/fmt/mod.rs:1961
  17:     0x7f96a3225dce - core::fmt::builders::DebugTuple::field::{{closure}}::h0847324ddb324b58
                               at src/libcore/fmt/builders.rs:288
  18:     0x7f96a3225dce - core::result::Result<T,E>::and_then::h8ebac24b14fa8802
                               at src/libcore/result.rs:639
  19:     0x7f96a3225dce - core::fmt::builders::DebugTuple::field::hf1bfd17281a5054a
                               at src/libcore/fmt/builders.rs:276
  20:     0x7f96a317eb4e - <diesel::result::ConnectionError as core::fmt::Debug>::fmt::h0a6d4cdd5c9688f8
  21:     0x7f96a3225dce - core::fmt::builders::DebugTuple::field::{{closure}}::h0847324ddb324b58
                               at src/libcore/fmt/builders.rs:288
  22:     0x7f96a3225dce - core::result::Result<T,E>::and_then::h8ebac24b14fa8802
                               at src/libcore/result.rs:639
  23:     0x7f96a3225dce - core::fmt::builders::DebugTuple::field::hf1bfd17281a5054a
                               at src/libcore/fmt/builders.rs:276
  24:     0x7f96a304eb6c - <diesel::database_error::DatabaseError as core::fmt::Debug>::fmt::h3567cade3cb4b2ae
  25:     0x7f96a322673c - core::fmt::write::h665f3e10b8c4c314
                               at src/libcore/fmt/mod.rs:1016
  26:     0x7f96a3203ed5 - core::fmt::Write::write_fmt::h2d7cce560b8a9355
                               at /rustc/929b48ec98aaff2239257574b5897f419cec2647/src/libcore/fmt/mod.rs:195
  27:     0x7f96a3203ed5 - std::panicking::continue_panic_fmt::PanicPayload::fill::{{closure}}::hb8ed5d4adb4fa050
                               at src/libstd/panicking.rs:357
  28:     0x7f96a3203ed5 - core::option::Option<T>::get_or_insert_with::h2c7b15b044222196
                               at /rustc/929b48ec98aaff2239257574b5897f419cec2647/src/libcore/option.rs:814
  29:     0x7f96a3203ed5 - std::panicking::continue_panic_fmt::PanicPayload::fill::h361887c3cf294bfc
                               at src/libstd/panicking.rs:355
  30:     0x7f96a3203ed5 - <std::panicking::continue_panic_fmt::PanicPayload as core::panic::BoxMeUp>::get::hbe7274952584889e
                               at src/libstd/panicking.rs:370
  31:     0x7f96a320418c - std::panicking::rust_panic_with_hook::hb20e5ee9c7b3a62c
                               at src/libstd/panicking.rs:474
  32:     0x7f96a3203d22 - std::panicking::continue_panic_fmt::h6bd583e9533c73b9
                               at src/libstd/panicking.rs:382
  33:     0x7f96a3203c06 - rust_begin_unwind
                               at src/libstd/panicking.rs:309
  34:     0x7f96a322315d - core::panicking::panic_fmt::h5152ff697a341efd
                               at src/libcore/panicking.rs:85
  35:     0x7f96a30589ae - core::result::unwrap_failed::hb46be88fa7fb110a
  36:     0x7f96a3068e59 - diesel::main::h2e14d441621c07c8
  37:     0x7f96a30a0b23 - std::rt::lang_start::{{closure}}::h11d5e04761a174e9
  38:     0x7f96a3203ba3 - std::rt::lang_start_internal::{{closure}}::hea72f6871a61f2ce
                               at src/libstd/rt.rs:49
  39:     0x7f96a3203ba3 - std::panicking::try::do_call::h08da391def37af73
                               at src/libstd/panicking.rs:294
  40:     0x7f96a320adba - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:82
  41:     0x7f96a32046ad - std::panicking::try::h1c5d32a15c34ebef
                               at src/libstd/panicking.rs:273
  42:     0x7f96a32046ad - std::panic::catch_unwind::h258e2ebe83b8e3d5
                               at src/libstd/panic.rs:388
  43:     0x7f96a32046ad - std::rt::lang_start_internal::h17b31dbbc70ec76f
                               at src/libstd/rt.rs:48
  44:     0x7f96a306a822 - main
  45:     0x7f96a1dd02e1 - __libc_start_main
  46:     0x7f96a304658a - _start
  47:                0x0 - <unknown>
thread panicked while panicking. aborting.
Illegal instruction (core dumped)

Are you seeing any additional errors?

Steps to reproduce

Known to be broken with https://gitlab.com/Nordgedanken/bunnysync . Propably not related to the project itself

  1. Install windows 10 WSL
  2. Do the usual diesel setup for the cli (Installing, rust, postgres and so on)
  3. Run diesel migration run

Checklist

  • [x] I have already looked over the issue tracker for similar issues.
  • [x] This issue can be reproduced on Rust's stable channel. (Your issue will be closed if this is not the case)

MTRNord avatar Jun 22 '19 11:06 MTRNord

The back trace indicates that this happens in code generated by #[derive(Debug)]. Could someone check if that's fixed by a newer rust version?

weiznich avatar Jan 27 '21 09:01 weiznich