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

[bug] solana completion -s zsh panics #2929

Closed
zilayo opened this issue Sep 14, 2024 · 1 comment · Fixed by #2934
Closed

[bug] solana completion -s zsh panics #2929

zilayo opened this issue Sep 14, 2024 · 1 comment · Fixed by #2934

Comments

@zilayo
Copy link

zilayo commented Sep 14, 2024

Problem

Porting from solana-labs#35175

Root cause seems to be a clap v2 issue that was fixed in 2020 - clap-rs/clap#2191

❯ RUST_BACKTRACE=full solana completion -s zsh
thread 'main' panicked at /Users/administrator/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap-2.33.3/src/completions/zsh.rs:407:29:
Fatal internal error. Please consider filing a bug report at https://github.com/clap-rs/clap/issues
stack backtrace:
   0:        0x101a722b8 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h298c9ab285ff3934
   1:        0x101a92288 - core::fmt::write::h4e276abdb6d0c2a1
   2:        0x101a6e92c - std::io::Write::write_fmt::hd421848f5f0bf9d0
   3:        0x101a720f4 - std::sys_common::backtrace::print::hd8bd9ecab1f94b94
   4:        0x101a73600 - std::panicking::default_hook::{{closure}}::h520eeb743fc98fb4
   5:        0x101a73348 - std::panicking::default_hook::ha6550ffe49b63df1
   6:        0x101a73a28 - std::panicking::rust_panic_with_hook::hddb0e884a202de7c
   7:        0x101a73928 - std::panicking::begin_panic_handler::{{closure}}::hd2798398a2fd9077
   8:        0x101a72720 - std::sys_common::backtrace::__rust_end_short_backtrace::h9201cc364dbb8a23
   9:        0x101a736c4 - _rust_begin_unwind
  10:        0x101ae6658 - core::panicking::panic_fmt::h4d5168028d4c43c7
  11:        0x101ae6624 - core::option::expect_failed::h055bb418ffad3409
  12:        0x101a307e0 - clap::completions::zsh::get_args_of::hccddb7dce72db024
  13:        0x101a2e9cc - clap::completions::zsh::get_subcommands_of::hcc45c115cfb61b53
  14:        0x101a2ea74 - clap::completions::zsh::get_subcommands_of::hcc45c115cfb61b53
  15:        0x100fe7e38 - clap::completions::zsh::ZshGen::generate_to::hd44dc13d9aa9823e
  16:        0x101087be4 - clap::completions::ComplGen::generate::h51a40881ae71e1f4
  17:        0x101031b14 - clap::app::App::gen_completions_to::heb85530fe8b8da04
  18:        0x100ff290c - solana_cli::cli::parse_command::h2a54377c749a2a68
  19:        0x100f01598 - solana::main::hd21846070d93d582
  20:        0x100f0c5e0 - std::sys_common::backtrace::__rust_begin_short_backtrace::h0c4665b679d3c185
  21:        0x100f0b9f8 - std::rt::lang_start::{{closure}}::hf78f1ec8a3da1308
  22:        0x101a6827c - std::rt::lang_start_internal::h5b246d44f1526226
  23:        0x100f0b9dc - std::rt::lang_start::h7c43e30160d78765
  24:        0x100f02f5c - _main

Proposed Solution

Further investigation is needed to determine how this can be patched in Agave whilst remaining on clap v2.33.1

@McSim85
Copy link

McSim85 commented Sep 15, 2024

Same issue:

solana -V
solana-cli 2.0.8 (src:00000000; feat:1420694968, client:Agave)

panic:

RUST_BACKTRACE=full solana completion -s zsh
thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap-2.33.3/src/completions/zsh.rs:407:29:
Fatal internal error. Please consider filing a bug report at https://github.com/clap-rs/clap/issues
stack backtrace:
   0:     0x563c1c081552 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hffecb437d922f988
   1:     0x563c1c0adacc - core::fmt::write::hd9a8d7d029f9ea1a
   2:     0x563c1c07d83f - std::io::Write::write_fmt::h0e1226b2b8d973fe
   3:     0x563c1c081324 - std::sys_common::backtrace::print::he907f6ad7eee41cb
   4:     0x563c1c082adb - std::panicking::default_hook::{{closure}}::h3926193b61c9ca9b
   5:     0x563c1c082833 - std::panicking::default_hook::h25ba2457dea68e65
   6:     0x563c1c082f7d - std::panicking::rust_panic_with_hook::h0ad14d90dcf5224f
   7:     0x563c1c082e52 - std::panicking::begin_panic_handler::{{closure}}::h4a1838a06f542647
   8:     0x563c1c081a26 - std::sys_common::backtrace::__rust_end_short_backtrace::h77cc4dc3567ca904
   9:     0x563c1c082b84 - rust_begin_unwind
  10:     0x563c1affd0e5 - core::panicking::panic_fmt::h940d4fd01a4b4fd1
  11:     0x563c1c0ab1f1 - core::panicking::panic_display::h277de99b44f66bbb
  12:     0x563c1affd0ab - core::option::expect_failed::h9d76e63e47b0f089
  13:     0x563c1c034c21 - clap::completions::zsh::get_args_of::hf015ff051e07ec86
  14:     0x563c1c0320b0 - clap::completions::zsh::get_subcommands_of::hba25697d052fe841
  15:     0x563c1c03216b - clap::completions::zsh::get_subcommands_of::hba25697d052fe841
  16:     0x563c1b23f5a5 - clap::completions::zsh::ZshGen::generate_to::h5ce40e80af3a0a1e
  17:     0x563c1b267daf - clap::completions::ComplGen::generate::h77533846a0dd236b
  18:     0x563c1b287259 - clap::app::App::gen_completions_to::hf02ea9e74713f7f1
  19:     0x563c1b031688 - solana_cli::cli::parse_command::h1344c42351432637
  20:     0x563c1b0009cd - solana::main::hdb35502702f11689
  21:     0x563c1b00adc3 - std::sys_common::backtrace::__rust_begin_short_backtrace::hcbfdddd7b88ba82a
  22:     0x563c1b00c229 - std::rt::lang_start::{{closure}}::h0c670a28f33109bc
  23:     0x563c1c074ff3 - std::rt::lang_start_internal::h103c42a9c4e95084
  24:     0x563c1b002fc5 - main
  25:     0x7eff69270d90 - <unknown>
  26:     0x7eff69270e40 - __libc_start_main
  27:     0x563c1affd795 - _start
  28:                0x0 - <unknown>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants