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

Bad RPC call on first launch after adding :os_mon #435

Open
halostatue opened this issue Dec 21, 2023 · 1 comment
Open

Bad RPC call on first launch after adding :os_mon #435

halostatue opened this issue Dec 21, 2023 · 1 comment

Comments

@halostatue
Copy link

Environment

Make sure you are using the latest LiveView and Dashboard versions before continuing.

This is on a freshly created Phoenix application mix phx.new. The only trick is that I’m using an umbrella setup, but I do not think that will change the error.

  • Elixir version (elixir -v):

    Erlang/OTP 26 [erts-14.1.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]
    
    Elixir 1.15.7 (compiled with Erlang/OTP 26)
    
  • Phoenix version (mix deps): phoenix 1.7.10 (Hex package) (mix)

  • Phoenix LiveView version (mix deps): phoenix_live_view 0.20.2 (Hex package) (mix)

  • Phoenix Dashboard version (mix deps): phoenix_live_dashboard 0.8.3 (Hex package) (mix)

  • Operating system: macOS 13.6.3 22G436 arm64

  • Browsers you attempted to reproduce this bug on (the more the merrier): n/a, but Safari

Actual behavior

  1. iex -S mix phx.server; visit live dashboard: OS is not enabled (expected).
  2. Quit iex. Edit the base mix.exs (in an umbrella this would be apps/main_app/mix.exs to add :os_mon to extra_applications.
  3. iex -S mix phx.server; visit live dashboard. OS is enabled (expected). Click on it produces the crash below.
  4. Quit iex.
  5. iex -S mix phx.server; visit live dashboard. OS is enabled and does not crash.
key :system_mem not found…
key :system_mem not found in: {:badrpc,
 {:EXIT,
  {:undef,
   [
     {:cpu_sup, :util, [[:detailed, :per_cpu]], []},
     {Phoenix.LiveDashboard.SystemInfo, :os_mon_callback, 0,
      [file: ~c"lib/phoenix/live_dashboard/system_info.ex", line: 726]}
   ]}}}

Expected behavior

Not a process crash. It seems odd that this is failing this way — but it is reliably failing this way.

@halostatue
Copy link
Author

By reliably failing, I mean that I have been able to reproduce it 5–6 times in a row. Remove :os_mon, restart (disabled). Add :os_mon, restart (enabled, crash), restart (enabled, no crash). Rinse and repeat.

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

1 participant