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

Homebrew CI Test Failure: "thread 'main' panicked" #5

Closed
carlocab opened this issue Dec 11, 2020 · 4 comments
Closed

Homebrew CI Test Failure: "thread 'main' panicked" #5

carlocab opened this issue Dec 11, 2020 · 4 comments

Comments

@carlocab
Copy link

carlocab commented Dec 11, 2020

I'm trying to update Homebrew's Rust to 1.48 here: Homebrew/homebrew-core#66285

Homebrew CI tested all packages that depend on Rust. This revealed the following error from ktmpl:

Backtrace

❯ RUST_BACKTRACE=full ktmpl test.yml -p PORT 8080
thread 'main' panicked at 'attempted to leave type `linked_hash_map::Node<yaml::Yaml, yaml::Yaml>` uninitialized, which is invalid', /private/tmp/rust-20201211-36507-3y6ny0/rustc-1.48.0-src/library/core/src/mem/mod.rs:658:9
stack backtrace:
   0:        0x104889a5e - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h650be7d6317a1169
   1:        0x1048b601e - core::fmt::write::h451c4858d0fea670
   2:        0x1048897ca - std::io::Write::write_fmt::had0d660ea6c32991
   3:        0x1048a384f - std::panicking::default_hook::{{closure}}::h7f9d4cee5e038ae9
   4:        0x1048a3543 - std::panicking::default_hook::h5fb4408d2b8d41f0
   5:        0x1048a3d7a - std::panicking::rust_panic_with_hook::h6f223595664a4622
   6:        0x10488a2fb - std::panicking::begin_panic_handler::{{closure}}::ha7895c801e815942
   7:        0x104889bd8 - std::sys_common::backtrace::__rust_end_short_backtrace::hafb1945b261ddb13
   8:        0x1048a3953 - _rust_begin_unwind
   9:        0x1048c0baf - core::panicking::panic_fmt::h23cb1548c6906f6a
  10:        0x1048c0b07 - core::panicking::panic::h97965fc650fa4c16
  11:        0x10482f6ce - linked_hash_map::LinkedHashMap<K,V,S>::insert::h6aed8966938aeef9
  12:        0x10482d900 - yaml_rust::yaml::YamlLoader::insert_new_node::h84a2dc6aca853064
  13:        0x10482d2fd - <yaml_rust::yaml::YamlLoader as yaml_rust::parser::MarkedEventReceiver>::on_event::h90cc8ed523819ea3
  14:        0x104820ebf - yaml_rust::parser::Parser<T>::load_node::hea42f316d6ec0f94
  15:        0x1048213fe - yaml_rust::parser::Parser<T>::load_mapping::h657e040bebe66fbe
  16:        0x10482095b - yaml_rust::parser::Parser<T>::load::hfaa369a92904d439
  17:        0x10482daa8 - yaml_rust::yaml::YamlLoader::load_from_str::hbc8c4808e30bc98b
  18:        0x104797f36 - ktmpl::template::Template::new::h37f21bc74c7d28da
  19:        0x10478e679 - ktmpl::main::h10bda75d6a75f5e5
  20:        0x10478c38a - std::sys_common::backtrace::__rust_begin_short_backtrace::he46e50b20aaf6f38
  21:        0x10478c3ac - std::rt::lang_start::{{closure}}::h2102adef0070e7f3
  22:        0x1048a10ad - std::rt::lang_start_internal::h2f38ef5052441758
  23:        0x10478f4d9 - _main

For reference, these are the contents of test.yml.

Test File

---
kind: "Template"
apiVersion: "v1"
metadata:
  name: "test"
objects:
  - kind: "Service"
    apiVersion: "v1"
    metdata:
      name: "test"
    spec:
      ports:
        - name: "test"
          protocol: "TCP"
          targetPort: "$((PORT))"
      selector:
        app: "test"
parameters:
  - name: "PORT"
    description: "The port the service should run on"
    required: true
    parameterType: "int"

I haven't had the pleasure of using ktmpl, so I'm not really sure what's going on. I'd appreciate some assistance here. Is the issue with test.yml? It worked with previous CI runs.

For reference, I ran this on macOS 11.0, but the error also appears on macOS 10.14 and 10.15. (All Intel Macs.)

I should also mention that I saw deprecation warnings upon compilation. More details available if you need it.

@stweil
Copy link

stweil commented Dec 14, 2020

This might be fixed by Homebrew/homebrew-core#66914.

@carlocab
Copy link
Author

Yep, I think so too. This is a hilariously embarrassing oversight. Will close this when CI on your PR is green.

@stweil
Copy link

stweil commented Dec 15, 2020

CI is green. 💚

@Bo98
Copy link

Bo98 commented Mar 1, 2021

This is started happening again. It's because of yaml-rust - bumping the version to 0.4.5 fixes the issue for me. ktmpl currently uses 0.4.2.

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

3 participants