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

Aggregating metrics causes crash in membrane_core #814

Closed
FelonEkonom opened this issue Jun 3, 2024 · 2 comments · Fixed by #835 or #849
Closed

Aggregating metrics causes crash in membrane_core #814

FelonEkonom opened this issue Jun 3, 2024 · 2 comments · Fixed by #835 or #849
Assignees
Labels

Comments

@FelonEkonom
Copy link
Member

Logs below originate from the FishJam tests, problem was reported by @Rados13

%Membrane.ParentError{
  message: "Error starting child :endpoint_bin, reason: {%Membrane.ParentError{message: \"Error starting child :ice, reason: {:badarg, [{:ets, :insert, [#Reference<0.2241832208.2648571908.247683>, {{:message_queue_length, [\\\"<0.3072.0>/\\\", \\\"{:endpoint, \\\\\\\"b07d2473-354a-452f-9f43-489912be630c\\\\\\\"}/\\\", \\\":endpoint_bin/\\\", \\\":ice\\\"], nil}, {:__membrane_stalker_function_metric__, #Function<2.21975877/0 in Membrane.Core.Element.init/1>}}], [error_info: %{cause: :id, module: :erl_stdlib_errors}]}, {Membrane.Core.Element, :init, 1, [file: ~c\\\"lib/membrane/core/element.ex\\\", line: 119]}, {:gen_server, :init_it, 2, [file: ~c\\\"gen_server.erl\\\", line: 980]}, {:gen_server, :init_it, 6, [file: ~c\\\"gen_server.erl\\\", line: 935]}, {:proc_lib, :init_p_do_apply, 3, [file: ~c\\\"proc_lib.erl\\\", line: 241]}]}\"}, [{Membrane.Core.Parent.ChildLifeController.StartupUtils, :start_child, 6, [file: ~c\"lib/membrane/core/parent/child_life_controller/startup_utils.ex\", line: 230]}, {Enum, :\"-map/2-lists^map/1-1-\", 2, [file: ~c\"lib/enum.ex\", line: 1700]}, {Membrane.Core.Parent.ChildLifeController, :setup_children, 3, [file: ~c\"lib/membrane/core/parent/child_life_controller.ex\", line: 253]}, {Enum, :\"-flat_map_reduce/3-fun-1-\", 3, [file: ~c\"lib/enum.ex\", line: 1301]}, {Enumerable.List, :reduce, 3, [file: ~c\"lib/enum.ex\", line: 4842]}, {Enum, :flat_map_reduce, 3, [file: ~c\"lib/enum.ex\", line: 1300]}, {Membrane.Core.Parent.ChildLifeController, :handle_spec, 2, [file: ~c\"lib/membrane/core/parent/child_life_controller.ex\", line: 141]}, {Membrane.Core.CallbackHandler, :\"-handle_callback_result/5-fun-0-\", 5, [file: ~c\"lib/membrane/core/callback_handler.ex\", line: 196]}, {Enum, :\"-reduce/3-lists^foldl/2-0-\", 3, [file: ~c\"lib/enum.ex\", line: 2528]}, {Membrane.Core.CallbackHandler, :handle_callback_result, 5, [file: ~c\"lib/membrane/core/callback_handler.ex\", line: 194]}, {Membrane.Core.Bin, :init, 1, [file: ~c\"lib/membrane/core/bin.ex\", line: 134]}, {:gen_server, :init_it, 2, [file: ~c\"gen_server.erl\", line: 980]}, {:gen_server, :init_it, 6, [file: ~c\"gen_server.erl\", line: 935]}, {:proc_lib, :init_p_do_apply, 3, [file: ~c\"proc_lib.erl\", line: 241]}]}"
}
    (membrane_core 1.1.0-rc0) lib/membrane/core/parent/child_life_controller/startup_utils.ex:230: Membrane.Core.Parent.ChildLifeController.StartupUtils.start_child/6
    (elixir 1.16.0) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
    (membrane_core 1.1.0-rc0) lib/membrane/core/parent/child_life_controller.ex:253: Membrane.Core.Parent.ChildLifeController.setup_children/3
    (elixir 1.16.0) lib/enum.ex:1301: anonymous fn/3 in Enum.flat_map_reduce/3
    (elixir 1.16.0) lib/enum.ex:4842: Enumerable.List.reduce/3
    (elixir 1.16.0) lib/enum.ex:1300: Enum.flat_map_reduce/3
    (membrane_core 1.1.0-rc0) lib/membrane/core/parent/child_life_controller.ex:141: Membrane.Core.Parent.ChildLifeController.handle_spec/2
    (membrane_core 1.1.0-rc0) lib/membrane/core/callback_handler.ex:196: anonymous fn/5 in Membrane.Core.CallbackHandler.handle_callback_result/5
    (elixir 1.16.0) lib/enum.ex:2528: Enum."-reduce/3-lists^foldl/2-0-"/3
    (membrane_core 1.1.0-rc0) lib/membrane/core/callback_handler.ex:194: Membrane.Core.CallbackHandler.handle_callback_result/5
    (membrane_core 1.1.0-rc0) lib/membrane/core/bin.ex:134: Membrane.Core.Bin.init/1
    (stdlib 5.2) gen_server.erl:980: :gen_server.init_it/2
    (stdlib 5.2) gen_server.erl:935: :gen_server.init_it/6
    (stdlib 5.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
@mat-hek
Copy link
Member

mat-hek commented Jul 10, 2024

Apparently warnings are still present: #837 (comment). @dmorn does this happen to you only when something else crashes in the pipeline?

@dmorn
Copy link

dmorn commented Jul 10, 2024

@mat-hek the setup that reproduces the behaviour is a pipeline with bins that are dynamically added/removed and scheduled on different nodes. I have to confirm that but it might be that this happens after you've removed the child.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment