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

thread 'main' panicked #30

Closed
mattmartini opened this issue Nov 6, 2023 · 9 comments · Fixed by #37
Closed

thread 'main' panicked #30

mattmartini opened this issue Nov 6, 2023 · 9 comments · Fixed by #37

Comments

@mattmartini
Copy link

mattmartini commented Nov 6, 2023

A search panicked the main thread. Possibly a pdf was included in the cache?

RUST_BACKTRACE=1 bogrep  fugitive
thread 'main' panicked at 'byte index 7369 is not a char boundary; it is inside '\u{a0}' (bytes 7368..7370) of `#REF!Far From The Maddening Crowdby David Nicholls (Based on the novel by Thomas Hardy)   2015september 2013 final shooting     x kb   pdf formatimdbFargoby Joel & Ethan Coen   1996undated, unspecified draft   106 kb   html formatimdbFarg`[...]', src/cmd/search.rs:86:35
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::str::slice_error_fail_rt
   3: core::str::slice_error_fail
   4: bogrep::cmd::search::search_bookmarks
   5: bogrep::cmd::search::search
   6: bogrep::main::{{closure}}
   7: tokio::runtime::park::CachedParkThread::block_on
   8: tokio::runtime::context::runtime::enter_runtime
   9: tokio::runtime::runtime::Runtime::block_on
  10: bogrep::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Here is the full backtrace:

RUST_BACKTRACE=full bogrep fugitive
thread 'main' panicked at 'byte index 7369 is not a char boundary; it is inside '\u{a0}' (bytes 7368..7370) of `#REF!Far From The Maddening Crowdby David Nicholls (Based on the novel by Thomas Hardy)   2015september 2013 final shooting     x kb   pdf formatimdbFargoby Joel & Ethan Coen   1996undated, unspecified draft   106 kb   html formatimdbFarg`[...]', src/cmd/search.rs:86:35
stack backtrace:
   0:        0x10224f8c8 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he69c0e17cb41f255
   1:        0x10227a90b - core::fmt::write::h66293df4c7dd941a
   2:        0x102233206 - std::io::Write::write_fmt::h2f5a7ea5f48a0b56
   3:        0x10224f690 - std::sys_common::backtrace::print::h71fd332624ce1826
   4:        0x1022506f5 - std::panicking::default_hook::{{closure}}::ha2a0e70fb3678142
   5:        0x102250471 - std::panicking::default_hook::hb166cd42dec7ff92
   6:        0x102250cb8 - std::panicking::rust_panic_with_hook::h2b924837648ff0c0
   7:        0x102250bf3 - std::panicking::begin_panic_handler::{{closure}}::h04e24a68d30d9f5c
   8:        0x10224faf9 - std::sys_common::backtrace::__rust_end_short_backtrace::hd45b5152c8265971
   9:        0x10225096d - _rust_begin_unwind
  10:        0x1022a2003 - core::panicking::panic_fmt::h9302663e63786640
  11:        0x102275f22 - core::str::slice_error_fail_rt::h16947361fdce3fc4
  12:        0x1022a1ee9 - core::str::slice_error_fail::hc7dbb20721e2925b
  13:        0x101df3cee - bogrep::cmd::search::search_bookmarks::he87011c56d994e70
  14:        0x101df10bb - bogrep::cmd::search::search::h7c9b200747f586e2
  15:        0x101d9f7f0 - bogrep::main::{{closure}}::h9bf999662de91d64
  16:        0x101d9f08b - tokio::runtime::park::CachedParkThread::block_on::h475f5be8938b1cdf
  17:        0x101d832ef - tokio::runtime::context::runtime::enter_runtime::h0c39744fbd9d979e
  18:        0x101d8ea91 - tokio::runtime::runtime::Runtime::block_on::hcd0b6f794fbc0b1a
  19:        0x101d7ff7b - bogrep::main::h2c2d8feaaf0c8766
  20:        0x101d6da36 - std::sys_common::backtrace::__rust_begin_short_backtrace::h3044435b1b36dee6
  21:        0x101d6da51 - std::rt::lang_start::{{closure}}::h849919968bfedf8b
  22:        0x102250854 - std::panicking::try::hb5cb29dbfee1dcfc
  23:        0x10223bd6e - std::rt::lang_start_internal::h634e63ff6023f727
  24:        0x101d8005c - _main
@mattmartini
Copy link
Author

mattmartini commented Nov 6, 2023

Another one:

 RUST_BACKTRACE=1 bogrep deepfake
thread 'main' panicked at 'byte index 1067 is not a char boundary; it is inside '—' (bytes 1065..1068) of `What can former U.S. president Richard Nixon possibly teach us about artificial intelligence today and the future of misinformation online? Nothing. The real Nixon died 26 years ago.But anAI-generated likeness of himshines new light on a quickly evolving t`[...]', src/cmd/search.rs:86:35
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::str::slice_error_fail_rt
   3: core::str::slice_error_fail
   4: bogrep::cmd::search::search_bookmarks
   5: bogrep::cmd::search::search
   6: bogrep::main::{{closure}}
   7: tokio::runtime::park::CachedParkThread::block_on
   8: tokio::runtime::context::runtime::enter_runtime
   9: tokio::runtime::runtime::Runtime::block_on
  10: bogrep::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Here is the Full Backtrace:

RUST_BACKTRACE=full bogrep deepfake
thread 'main' panicked at 'byte index 1067 is not a char boundary; it is inside '—' (bytes 1065..1068) of `What can former U.S. president Richard Nixon possibly teach us about artificial intelligence today and the future of misinformation online? Nothing. The real Nixon died 26 years ago.But anAI-generated likeness of himshines new light on a quickly evolving t`[...]', src/cmd/search.rs:86:35
stack backtrace:
   0:        0x107c0a8c8 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he69c0e17cb41f255
   1:        0x107c3590b - core::fmt::write::h66293df4c7dd941a
   2:        0x107bee206 - std::io::Write::write_fmt::h2f5a7ea5f48a0b56
   3:        0x107c0a690 - std::sys_common::backtrace::print::h71fd332624ce1826
   4:        0x107c0b6f5 - std::panicking::default_hook::{{closure}}::ha2a0e70fb3678142
   5:        0x107c0b471 - std::panicking::default_hook::hb166cd42dec7ff92
   6:        0x107c0bcb8 - std::panicking::rust_panic_with_hook::h2b924837648ff0c0
   7:        0x107c0bbf3 - std::panicking::begin_panic_handler::{{closure}}::h04e24a68d30d9f5c
   8:        0x107c0aaf9 - std::sys_common::backtrace::__rust_end_short_backtrace::hd45b5152c8265971
   9:        0x107c0b96d - _rust_begin_unwind
  10:        0x107c5d003 - core::panicking::panic_fmt::h9302663e63786640
  11:        0x107c30f22 - core::str::slice_error_fail_rt::h16947361fdce3fc4
  12:        0x107c5cee9 - core::str::slice_error_fail::hc7dbb20721e2925b
  13:        0x1077aecee - bogrep::cmd::search::search_bookmarks::he87011c56d994e70
  14:        0x1077ac0bb - bogrep::cmd::search::search::h7c9b200747f586e2
  15:        0x10775a7f0 - bogrep::main::{{closure}}::h9bf999662de91d64
  16:        0x10775a08b - tokio::runtime::park::CachedParkThread::block_on::h475f5be8938b1cdf
  17:        0x10773e2ef - tokio::runtime::context::runtime::enter_runtime::h0c39744fbd9d979e
  18:        0x107749a91 - tokio::runtime::runtime::Runtime::block_on::hcd0b6f794fbc0b1a
  19:        0x10773af7b - bogrep::main::h2c2d8feaaf0c8766
  20:        0x107728a36 - std::sys_common::backtrace::__rust_begin_short_backtrace::h3044435b1b36dee6
  21:        0x107728a51 - std::rt::lang_start::{{closure}}::h849919968bfedf8b
  22:        0x107c0b854 - std::panicking::try::hb5cb29dbfee1dcfc
  23:        0x107bf6d6e - std::rt::lang_start_internal::h634e63ff6023f727
  24:        0x10773b05c - _main

@quambene
Copy link
Owner

quambene commented Nov 7, 2023

If I remember correctly this is due to the library I'm using to cache in markdown format.

Could you try to remove all markdown files in your cache and try again?

If this issue is due to the cache mode for markdown files, I will have to remove this option for caching in markdown format temporarily to maintain a stable version of bogrep.

@mattmartini
Copy link
Author

mattmartini commented Nov 7, 2023 via email

@mattmartini
Copy link
Author

There also seems to be a memory leak problem. I left the bogrep fetch --mode markdown running even though it seemed to stop processing and it ate all my memory and caused my computer to crash.

@quambene
Copy link
Owner

quambene commented Nov 7, 2023

I will remove markdown support temporarily in bogrep to fix that issue.

@quambene quambene linked a pull request Nov 8, 2023 that will close this issue
@quambene
Copy link
Owner

quambene commented Nov 8, 2023

Fixed on main branch by removing markdown support.

FYI, main branch includes changes for the config path on macOS: https://github.com/quambene/bogrep#supported-operating-systems

@quambene quambene closed this as completed Nov 8, 2023
@mattmartini
Copy link
Author

Will you bring back markdown support? For the brief time it was working, it had nice output.

@quambene
Copy link
Owner

It might be fixed already by filtering out the binary responses. will check later

@quambene
Copy link
Owner

@mattmartini The related MR can be found here: #48 (WIP)

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

Successfully merging a pull request may close this issue.

2 participants