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

Not working on M1 Macs / arm64 #7

Closed
HaswinVidanage opened this issue Sep 7, 2023 · 9 comments
Closed

Not working on M1 Macs / arm64 #7

HaswinVidanage opened this issue Sep 7, 2023 · 9 comments

Comments

@HaswinVidanage
Copy link

I'm seeing this error thread 'main' panicked at 'failed to get local time offset: IndeterminateOffset', src/main.rs:101:51 followed by a [ERR] 2023-09-07 07:57:10.524 condure: Exited unexpectedly when running the docker image on Mac M1/ arm64.

Can we get support on M1 Macs ?
Thanks.

Full log:

[INFO] 2023-09-07 07:57:10.393 starting...
[INFO] 2023-09-07 07:57:10.402 using config: /etc/pushpin/pushpin.conf
[INFO] 2023-09-07 07:57:10.431 started
thread 'main' panicked at 'failed to get local time offset: IndeterminateOffset', src/main.rs:101:51
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
[INFO] 2023-09-07 07:57:10.460 [proxy] starting...
[INFO] 2023-09-07 07:57:10.465 [zurl] starting...
[INFO] 2023-09-07 07:57:10.467 [handler] starting...
[ERR] 2023-09-07 07:57:10.524 condure: Exited unexpectedly
[INFO] 2023-09-07 07:57:10.546 [proxy] routes loaded with 1 entries
[INFO] 2023-09-07 07:57:10.552 [handler] zhttp in stream: ipc:///var/run/pushpin/pushpin-condure-out-stream
[INFO] 2023-09-07 07:57:10.554 [handler] zhttp out: ipc:///var/run/pushpin/pushpin-condure-in
[INFO] 2023-09-07 07:57:10.555 [handler] inspect server: ipc:///var/run/pushpin/pushpin-inspect
[INFO] 2023-09-07 07:57:10.555 [handler] accept server: ipc:///var/run/pushpin/pushpin-accept
[INFO] 2023-09-07 07:57:10.557 [handler] control server: tcp://:5563
[INFO] 2023-09-07 07:57:10.558 [handler] in pull: tcp://
:5560
[INFO] 2023-09-07 07:57:10.558 [handler] in sub: tcp://*:5562
[INFO] 2023-09-07 07:57:10.559 [handler] retry: ipc:///var/run/pushpin/pushpin-retry
[INFO] 2023-09-07 07:57:10.559 [handler] ws control in: ipc:///var/run/pushpin/pushpin-ws-control-out
[INFO] 2023-09-07 07:57:10.559 [handler] ws control out: ipc:///var/run/pushpin/pushpin-ws-control-in
[INFO] 2023-09-07 07:57:10.559 [zurl] started
[INFO] 2023-09-07 07:57:10.562 [handler] stats: ipc:///var/run/pushpin/pushpin-stats
[INFO] 2023-09-07 07:57:10.563 [handler] proxy stats: ipc:///var/run/pushpin/pushpin-proxy-stats
[INFO] 2023-09-07 07:57:10.563 [handler] proxy control client: ipc:///var/run/pushpin/pushpin-proxy-command
[INFO] 2023-09-07 07:57:10.565 [zurl] stopping...
[INFO] 2023-09-07 07:57:10.566 [zurl] stopped
[INFO] 2023-09-07 07:57:10.567 [handler] http control server: 0.0.0.0:5561
[INFO] 2023-09-07 07:57:10.567 [handler] started
[INFO] 2023-09-07 07:57:10.615 [handler] stopping...
[INFO] 2023-09-07 07:57:10.622 [proxy] started
[INFO] 2023-09-07 07:57:10.623 [proxy] stopping...
[INFO] 2023-09-07 07:57:10.630 [handler] stopped
[INFO] 2023-09-07 07:57:10.646 [proxy] stopped
[INFO] 2023-09-07 07:57:10.655 stopped

@HaswinVidanage
Copy link
Author

Also please note that this issue only occurs on the latest version and works fine on version 1.35.0-1

@jkarneges
Copy link
Member

I wonder if you can work around this by setting the TZ environment variable?

@chrisbodhi
Copy link

chrisbodhi commented Oct 19, 2023

The defect seems to stem from the line in Condure here.

There is an issue in the Rust library time that discusses the underlying problem: time-rs/time#296

ETA: setting the TZ env var to 'UTC' does not resolve the issue.

@jannic
Copy link

jannic commented Oct 19, 2023

time-rs has a related bug ticket: time-rs/time#500

Unfortunately, it was closed without a solution. After looking at the time-rs source code, I agree with @jhpratt that it's probably some issue with num_threads, or that there are in fact multiple threads, for some reason.

We call current_local_offset rather early, so it's not clear where a second thread could come from. And I don't have a M1 Mac to reproduce the issue. So I can't investigate the root cause.

However, the time-rs docs suggest that callers should always be prepared to handle failure when calling current_local_offset. Do we really need to panic in that case? Wouldn't it be sensible to just log using UTC timestamps, instead?

@jannic
Copy link

jannic commented Oct 19, 2023

Possible solution: fanout/condure#15

@chrisbodhi
Copy link

Wouldn't it be sensible to just log using UTC timestamps, instead?

FWIW, I think this is a great solution.

@jhpratt
Copy link

jhpratt commented Oct 19, 2023

Please refrain from pinging a user when the sole purpose is to mention them, not alert them of something.

@jannic
Copy link

jannic commented Oct 19, 2023

Please refrain from pinging a user when the sole purpose is to mention them, not alert them of something.

I pinged you intentionally, as in time-rs/time#500 you mentioned you were "unable to reproduce due to lack of code", and this might be a situation where code is available and reasonably simple, so it could be an opportunity to investigate why it doesn't work on Mac M1. But I also see that this is of limited use as you also mentioned you don't have that hardware. (I don't, either.)

Therefore, sorry if the ping was annoying to you!

@jkarneges
Copy link
Member

This issue has been fixed in 1.38.0 and a multi-platform docker image has been posted!

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

5 participants