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: Issue running echo.py: Thread 'main' panicked at src/main.rs:118:46: local time offset: IndeterminateOffset #468

Closed
cosmicBboy opened this issue Nov 30, 2023 · 4 comments · Fixed by #471
Labels
bug Something isn't working

Comments

@cosmicBboy
Copy link

cosmicBboy commented Nov 30, 2023

Describe the bug

Running through the echo.py example in the docs: https://mosecorg.github.io/mosec/examples/echo.html

The following error occurs:

❯ python echo.py            mosec
thread 'main' panicked at src/main.rs:118:46:
local time offset: IndeterminateOffset
stack backtrace:
   0:        0x10025984b - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h65343ad3a85b4e34
   1:        0x10027a04b - core::fmt::write::h11839d3825cb5605
   2:        0x100256b1e - std::io::Write::write_fmt::h3ab12d369399333c
   3:        0x100259629 - std::sys_common::backtrace::print::h405f7c76ca12eb27
   4:        0x10025aca5 - std::panicking::default_hook::{{closure}}::hed87c355606e1822
   5:        0x10025a9d1 - std::panicking::default_hook::hdf696ec8ea0d65aa
   6:        0x10025b210 - std::panicking::rust_panic_with_hook::h7c5059af1af54377
   7:        0x10025b133 - std::panicking::begin_panic_handler::{{closure}}::hd658b0e1cffe3d4d
   8:        0x100259d29 - std::sys_common::backtrace::__rust_end_short_backtrace::h3d7834d0cea60a50
   9:        0x10025ae5d - _rust_begin_unwind
  10:        0x100294833 - core::panicking::panic_fmt::ha9964785de0afb40
  11:        0x100294c21 - core::result::unwrap_failed::h789415aec617156b
  12:        0x100123d45 - mosec::main::h33c2cd57ac359549
  13:        0x100124656 - std::sys_common::backtrace::__rust_begin_short_backtrace::h1c8f6e2f32904e1d
  14:        0x10010238c - std::rt::lang_start::{{closure}}::h0a9486bd5ffa6650
  15:        0x10025324a - std::rt::lang_start_internal::h54faea1e36783632
  16:        0x100123f7c - _main
{"timestamp": "2023-11-30T14:47:35.933771-0500", "level": "INFO", "fields": {"message": "received signum[101], terminating server [mosec daemon [rs_runtime] exited on error code: 101]"}, "target": "mosec::server.py:_terminate"}
{"timestamp": "2023-11-30T14:47:36.017446-0500", "level": "INFO", "fields": {"message": "<Preprocess_1|1> warmup successfully"}, "target": "mosec::coordinator.py:warmup"}
{"timestamp": "2023-11-30T14:47:36.018711-0500", "level": "INFO", "fields": {"message": "sleeping for 0.0002 seconds"}, "target": "user::echo.py:forward"}
{"timestamp": "2023-11-30T14:47:36.019112-0500", "level": "INFO", "fields": {"message": "<Inference_2|1> warmup successfully"}, "target": "mosec::coordinator.py:warmup"}
{"timestamp": "2023-11-30T14:47:36.937760-0500", "level": "ERROR", "fields": {"message": "mosec service halted on error [101]"}, "target": "mosec::runtime.py:halt"}
{"timestamp": "2023-11-30T14:47:36.940701-0500", "level": "INFO", "fields": {"message": "mosec exited normally"}, "target": "mosec::server.py:_halt"}
{"timestamp": "2023-11-30T14:47:37.021816-0500", "level": "ERROR", "fields": {"message": "<Preprocess_1|1> cannot find the socket file: /var/folders/5r/4t87zv7x32s7xv9fmnmbd8z80000gn/T/mosec_f26299b1/ipc_Preprocess_1.socket, will shutdown"}, "target": "mosec::coordinator.py:init_protocol"}
{"timestamp": "2023-11-30T14:47:37.023946-0500", "level": "ERROR", "fields": {"message": "<Inference_2|1> cannot find the socket file: /var/folders/5r/4t87zv7x32s7xv9fmnmbd8z80000gn/T/mosec_f26299b1/ipc_Inference_2.socket, will shutdown"}, "target": "mosec::coordinator.py:init_protocol"}
{"timestamp": "2023-11-30T14:47:37.028937-0500", "level": "ERROR", "fields": {"message": "<Postprocess_3|1> cannot find the socket file: /var/folders/5r/4t87zv7x32s7xv9fmnmbd8z80000gn/T/mosec_f26299b1/ipc_Postprocess_3.socket, will shutdown"}, "target": "mosec::coordinator.py:init_protocol"}

To Reproduce

Using conda as virtual env:

conda create -n mosec python=3.11 -y
conda activate mosec
pip install mosec

Create echo.py file with the contents from the docs

python echo.py

Expected behavior

This example should work

The mosec version

mosec==0.8.1

Additional context

Mac M2 Sonoma 14.1.1

@cosmicBboy cosmicBboy added the bug Something isn't working label Nov 30, 2023
@kemingy
Copy link
Member

kemingy commented Dec 1, 2023

It's caused by the OffsetTime but I don't know why it panics here.

I found a related issue: time-rs/time#630

Hi @cosmicBboy which OS are you using?

@cosmicBboy
Copy link
Author

cosmicBboy commented Dec 1, 2023

Mac M2 Sonoma 14.1.1

Yeah for some reason google (or chatgpt) can't really come up with a solution.

@cosmicBboy
Copy link
Author

I also have another Mac M2, same specs, and it works on that one 😅

@kemingy
Copy link
Member

kemingy commented Dec 5, 2023

Hi @cosmicBboy, I created a new release 0.8.2 that uses the UTC instead of local time to avoid this panic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants