OpenFn / OpenFn/lightning

YDoc - GenServer #PID<0.24495.0> terminating

Open
#4,142 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Can't replicate
Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

@rorymckinley notes that web pods restarted here. The first one looked to be a common-or-garden OOMKill, but the second one was due to a ... Rust issue!

Luckily there were some clues earlier in the log where something called Yex was expressing some unhappiness, and I see that it contains some rust code... so perhaps something to keep an eye on?


Image Image

@stuartc indicated that the rust panic doesn't quite make sense when held up against the error on the right. the error on the right seems like an implementation issue i've bumped into in the first month of this yjs stuff, we're asking Yex to fetch a key from a ydoc and giving it a map instead.


Sentry Issue: LIGHTNING-17N

GenServer #PID<0.24495.0> terminating
** (stop) exited in: GenServer.call(#PID<77382.577474.0>, {:update_doc, #Function<6.44919662/1 in Lightning.Collaboration.WorkflowReconciler.reconcile_workflow_changes/2>}, 5000)
    ** (EXIT) no connection to [email]
    (elixir 1.18.3) lib/gen_server.ex:1128: GenServer.call/3
    (lightning 2.14.14) lib/lightning/collaboration/workflow_reconciler.ex:40: Lightning.Collaboration.WorkflowReconciler.reconcile_workflow_changes/2
    (lightning 2.14.14) lib/lightning/workflows.ex:182: Lightning.Workflows.save_workflow/3
    (lightning 2.14.14) lib/lightning_web/live/workflow_live/edit.ex:3511: LightningWeb.WorkflowLive.Edit.rerun/4
    (lightning 2.14.14) lib/lightning_web/live/workflow_live/edit.ex:2092: LightningWeb.WorkflowLive.Edit.handle_event/3
    (phoenix_live_view 1.0.18) lib/phoenix_live_view/channel.ex:509: anonymous fn/3 in Phoenix.LiveView.Channel.view_handle_event/3
    (telemetry 1.3.0) /app/deps/telemetry/src/telemetry.erl:324: :telemetry.span/3
    (phoenix_live_view 1.0.18) lib/phoenix_live_view/channel.ex:260: Phoenix.LiveView.Channel.handle_info/2
Last message: %Phoenix.Socket.Message{topic: "lv:phx-GH4AZrDo8bFnjODS", event: "event", payload: %{"event" => "rerun", "type" => "click", "value" => %{"run_id" => "dc93274a-9aa5-436c-bb80-caf709a8f783", "step_id" => "585943c1-5fd1-4cf0-9d74-a49164b41ba0", "value" => ""}}, ref: "257", join_ref: "247"}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the stack trace in lib/lightning/collaboration/workflow_reconciler.ex:40 and the YDoc/Yex-related log evidence in the issue. Trace the update_doc call from Lightning.Workflows.save_workflow/3 and determine why the GenServer loses its connection or receives an invalid YDoc lookup. Done means the failure is reproducible and the underlying crash is fixed or clearly guarded by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir, rust
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.