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

Database crash : Caused by terminating chain reader Process #434

Closed
apoorv-2204 opened this issue Jul 8, 2022 · 0 comments
Closed

Database crash : Caused by terminating chain reader Process #434

apoorv-2204 opened this issue Jul 8, 2022 · 0 comments
Assignees
Labels
bug Something isn't working DB Involve database

Comments

@apoorv-2204
Copy link
Contributor

apoorv-2204 commented Jul 8, 2022

Issue

Logs:

2022-07-07 06:57:02.150 [error] GenServer #PID<0.27226.2> terminating
** (MatchError) no match of right hand side value: {:ok, <<68, 203, 134, 110, 109, 232, 211, 31, 42, 14, 123, 0, 224, 64, 251, 206, 28, 93, 80, 141, 142, 240, 11, 5, 64, 115, 130, 226, 87, 226, 18, 41, 53, 99, 50, 151, 100, 103, 88, 7, 26, 0, 0, 0, 8, 118, 97, 108, ...>>}
    (archethic 0.17.0) lib/archethic/db/embedded_impl/chain_reader.ex:106: Archethic.DB.EmbeddedImpl.ChainReader.read_transaction/5
    (archethic 0.17.0) lib/archethic/db/embedded_impl/chain_reader.ex:136: Archethic.DB.EmbeddedImpl.ChainReader.scan_chain/4
    (archethic 0.17.0) lib/archethic/db/embedded_impl/chain_reader.ex:86: Archethic.DB.EmbeddedImpl.ChainReader.get_transaction_chain/4
    (archethic 0.17.0) lib/archethic/p2p/message.ex:1071: Archethic.P2P.Message.process/1
    (archethic 0.17.0) lib/archethic/p2p/client/default_impl.ex:52: Archethic.P2P.Client.DefaultImpl.send_message/3
    (archethic 0.17.0) lib/archethic/p2p.ex:579: Archethic.P2P.quorum_read/4
    (archethic 0.17.0) lib/archethic/transaction_chain.ex:687: Archethic.TransactionChain.fetch_transaction_chain/3
    (archethic 0.17.0) lib/archethic/transaction_chain.ex:665: Archethic.TransactionChain.do_stream_chain/4
    (elixir 1.12.3) lib/stream.ex:1531: Stream.do_resource/5
    (elixir 1.12.3) lib/stream.ex:880: Stream.do_transform/5
    (elixir 1.12.3) lib/stream.ex:1719: Enumerable.Stream.do_each/4
    (elixir 1.12.3) lib/enum.ex:3958: Enum.reverse/1
    (elixir 1.12.3) lib/enum.ex:3315: Enum.to_list/1
    (archethic 0.17.0) lib/archethic_web/live/chains/beacon_live.ex:266: anonymous fn/2 in ArchethicWeb.BeaconChainLive.list_transaction_from_chain/1
    (flow 1.1.0) lib/flow/materialize.ex:643: Flow.Materialize."-build_reducer/2-lists^foldl/2-0-"/3
    (flow 1.1.0) lib/flow/materialize.ex:643: anonymous fn/5 in Flow.Materialize.build_reducer/2
    (flow 1.1.0) lib/flow/map_reducer.ex:59: Flow.MapReducer.handle_events/3
    (gen_stage 1.1.2) lib/gen_stage.ex:2471: GenStage.consumer_dispatch/6
    (gen_stage 1.1.2) lib/gen_stage.ex:2660: GenStage.take_pc_events/3
    (stdlib 3.17) gen_server.erl:695: :gen_server.try_dispatch/4
Last message: {:"$gen_consumer", {#PID<0.27209.2>, #Reference<0.2450918992.1895301124.20948>}, [{<<0, 0, 66, 12, 21, 15, 115, 244, 116, 77, 7, 36, 7, 21, 59, 114, 8, 247, 107, 66, 18, 125, 82, 20, 49, 196, 145, 51, 186, 7, 184, 186, 228, 215>>, [%Archethic.P2P.Node{authorization_date: ~U[2022-07-07 06:51:27.958440Z], authorized?: true, availability_history: <<1::size(1)>>, available?: true, average_availability: 1.0, enrollment_date: ~U[2022-07-07 06:51:27.913184Z], first_public_key: <<0, 1, 29, 150, 125, 113, 178, 225, 53, 200, 66, 6, 221, 209, 8, 181, 146, 90, 44, 217, 156, 142, 188, 90, 181, 216, 253, 46, 201, 64, 12, 227, 201, 138>>, geo_patch: "F0A", http_port: 4000, ip: {127, 0, 0, 1}, last_address: <<0, 0, 238, 157, 220, 82, 41, 235, 255, 225, 151, 39, 112, 88, 241, 26, 65, 226, 34, 82, 216, 106, 144, 76, 140, 188, 243, 140, 30, 252, 66, 171, ...>>, last_public_key: <<0, 1, 29, 150, 125, 113, 178, 225, 53, 200, 66, 6, 221, 209, 8, 181, 146, 90, 44, 217, 156, 142, 188, 90, 181, 216, 253, 46, 201, 64, 12, ...>>, network_patch: "F0A", origin_public_key: <<0, 1, 71, 147, 26, 46, 91, 142, 137, 28, 132, 242, 144, 34, 178, 80, 35, 47, 218, 202, 212, 213, 215, 94, 51, 121, 236, 35, 19, ...>>, port: 3002, reward_address: <<0, 0, 110, 165, 180, 212, 247, 242, 174, 222, 111, 150, 241, 41, 35, 114, 75, 26, 31, 147, 10, 28, 108, 161, 163, 91, 194, ...>>, synced?: true, transport: :tcp}, %Archethic.P2P.Node{authorization_date: ~U[2022-07-07 06:53:00Z], authorized?: true, availability_history: <<1::size(1)>>, available?: true, average_availability: 1.0, enrollment_date: ~U[2022-07-07 06:51:38.011837Z], first_public_key: <<0, 1, 190, 20, 188, 141, 156, 135, 91, 37, 96, 187, 27, 24, 41, 130, 118, 93, 43, 240, 229, 97, 227, 194, 31, 97, 228, 78, 156, 194, 154, 74, 160, 104>>, geo_patch: "B0C", http_port: 4001, ip: {127, 0, 0, 1}, last_address: <<0, 0, 141, 83, 46, 255, 162, 69, 241, 157, 120, 84, 165, 133, 135, 94, 245, 149, 16, 239, 130, 214, 62, 81, 49, 250, 118, 108, 244, 124, 188, ...>>, last_public_key: <<0, 1, 190, 20, 188, 141, 156, 135, 91, 37, 96, 187, 27, 24, 41, 130, 118, 93, 43, 240, 229, 97, 227, 194, 31, 97, 228, 78, 156, 194, ...>>, network_patch: "B0C", origin_public_key: <<0, 1, 107, 178, 230, 144, 157, 129, 130, 152, 93, 113, 55, 75, 44, 5, 167, 86, 213, 128, 211, 152, 97, 62, 56, 159, 113, 201, ...>>, port: 3003, reward_address: <<0, 0, 210, 215, 125, 252, 245, 205, 206, 163, 87, 19, 163, 20, 183, 2, 48, 171, 30, 145, 43, 19, 21, 144, 49, 168, ...>>, synced?: true, transport: :tcp}, %Archethic.P2P.Node{authorization_date: ~U[2022-07-07 06:53:00Z], authorized?: true, availability_history: <<1::size(1)>>, available?: true, average_availability: 1.0, enrollment_date: ~U[2022-07-07 06:51:40.382514Z], first_public_key: <<0, 1, 221, 229, 74, 49, 62, 93, 205, 115, 228, 19, 116, 140, 191, 102, 121, 240, 119, 23, 248, 189, 198, 108, 190, 143, 152, 30, 30, 71, 90, 152, 96, 92>>, geo_patch: "6E1", http_port: 4002, ip: {127, 0, 0, 1}, last_address: <<0, 0, 21, 54, 100, 105, 120, 247, 5, 46, 184, 90, 16, 15, 226, 63, 255, 210, 156, 75, 237, 164, 143, 152, 36, 193, 183, 99, 82, 119, ...>>, last_public_key: <<0, 1, 221, 229, 74, 49, 62, 93, 205, 115, 228, 19, 116, 140, 191, 102, 121, 240, 119, 23, 248, 189, 198, 108, 190, 143, 152, 30, 30, ...>>, network_patch: "6E1", origin_public_key: <<0, 1, 226, 195, 136, 130, 213, 132, 49, 97, 219, 195, 176, 184, 240, 68, 85, 70, 157, 47, 73, 236, 244, 214, 2, 7, 251, ...>>, port: 3004, reward_address: <<0, 0, 229, 241, 30, 90, 96, 214, 159, 56, 218, 172, 131, 194, 53, 19, 166, 79, 142, 24, 115, 188, 68, 202, 66, ...>>, synced?: true, transport: :tcp}], <<17>>}, {<<0, 0, 88, 75, 7, 146, 86, 46, 162, 209, 180, 137, 237, 95, 195, 78, 4, 97, 248, 169, 123, 164, 171, 160, 244, 213, 141, 156, 40, 236, 65, 227, 74, 36>>, [%Archethic.P2P.Node{authorization_date: ~U[2022-07-07 06:51:27.958440Z], authorized?: true, availability_history: <<1::size(1)>>, available?: true, average_availability: 1.0, enrollment_date: ~U[2022-07-07 06:51:27.913184Z], first_public_key: <<0, 1, 29, 150, 125, 113, 178, 225, 53, 200, 66, 6, 221, 209, 8, 181, 146, 90, 44, 217, 156, 142, 188, 90, 181, 216, 253, 46, 201, 64, 12, 227, 201, 138>>, geo_patch: "F0A", http_port: 4000, ip: {127, 0, 0, 1}, last_address: <<0, 0, 238, 157, 220, 82, 41, 235, 255, 225, 151, 39, 112, 88, 241, 26, 65, 226, 34, 82, 216, 106, 144, 76, 140, 188, 243, 140, 30, 252, 66, ...>>, last_public_key: <<0, 1, 29, 150, 125, 113, 178, 225, 53, 200, 66, 6, 221, 209, 8, 181, 146, 90, 44, 217, 156, 142, 188, 90, 181, 216, 253, 46, 201, 64, ...>>, network_patch: "F0A", origin_public_key: <<0, 1, 71, 147, 26, 46, 91, 142, 137, 28, 132, 242, 144, 34, 178, 80, 35, 47, 218, 202, 212, 213, 215, 94, 51, 121, 236, 35, ...>>, port: 3002, reward_address: <<0, 0, 110, 165, 180, 212, 247, 242, 174, 222, 111, 150, 241, 41, 35, 114, 75, 26, 31, 147, 10, 28, 108, 161, 163, 91, ...>>, synced?: true, transport: :tcp}, %Archethic.P2P.Node{authorization_date: ~U[2022-07-07 06:53:00Z], authorized?: true, availability_history: <<1::size(1)>>, available?: true, average_availability: 1.0, enrollment_date: ~U[2022-07-07 06:51:38.011837Z], first_public_key: <<0, 1, 190, 20, 188, 141, 156, 135, 91, 37, 96, 187, 27, 24, 41, 130, 118, 93, 43, 240, 229, 97, 227, 194, 31, 97, 228, 78, 156, 194, 154, 74, 160, 104>>, geo_patch: "B0C", http_port: 4001, ip: {127, 0, 0, 1}, last_address: <<0, 0, 141, 83, 46, 255, 162, 69, 241, 157, 120, 84, 165, 133, 135, 94, 245, 149, 16, 239, 130, 214, 62, 81, 49, 250, 118, 108, 244, 124, ...>>, last_public_key: <<0, 1, 190, 20, 188, 141, 156, 135, 91, 37, 96, 187, 27, 24, 41, 130, 118, 93, 43, 240, 229, 97, 227, 194, 31, 97, 228, 78, 156, ...>>, network_patch: "B0C", origin_public_key: <<0, 1, 107, 178, 230, 144, 157, 129, 130, 152, 93, 113, 55, 75, 44, 5, 167, 86, 213, 128, 211, 152, 97, 62, 56, 159, 113, ...>>, port: 3003, reward_address: <<0, 0, 210, 215, 125, 252, 245, 20 (truncated)
2022-07-07 06:57:00.400 [error] ** (MatchError) no match of right hand side value: {:ok, <<68, 203, 134, 110, 109, 232, 211, 31, 42, 14, 123, 0, 224, 64, 251, 206, 28, 93, 80, 141, 142, 240, 11, 5, 64, 115, 130, 226, 87, 226, 18, 41, 53, 99, 50, 151, 100, 103, 88, 7, 26, 0, 0, 0, 8, 118, 97, 108, ...>>}
    (archethic 0.17.0) lib/archethic/db/embedded_impl/chain_reader.ex:106: Archethic.DB.EmbeddedImpl.ChainReader.read_transaction/5
    (archethic 0.17.0) lib/archethic/db/embedded_impl/chain_reader.ex:136: Archethic.DB.EmbeddedImpl.ChainReader.scan_chain/4
    (archethic 0.17.0) lib/archethic/db/embedded_impl/chain_reader.ex:86: Archethic.DB.EmbeddedImpl.ChainReader.get_transaction_chain/4
    (archethic 0.17.0) lib/archethic/p2p/message.ex:1071: Archethic.P2P.Message.process/1
    (archethic 0.17.0) lib/archethic/p2p/listener_protocol/broadway_pipeline.ex:66: Archethic.P2P.ListenerProtocol.BroadwayPipeline.process/1
    (archethic 0.17.0) lib/archethic/p2p/listener_protocol/broadway_pipeline.ex:45: anonymous fn/1 in Archethic.P2P.ListenerProtocol.BroadwayPipeline.handle_message/3
    (broadway 1.0.1) lib/broadway/message.ex:48: Broadway.Message.update_data/2
    (broadway 1.0.1) lib/broadway/topology/processor_stage.ex:156: anonymous fn/6 in Broadway.Topology.ProcessorStage.handle_messages/4
    (telemetry 0.4.3) /home/apoorv-2204/Documents/testnetwork/node1/deps/telemetry/src/telemetry.erl:272: :telemetry.span/3
    (broadway 1.0.1) lib/broadway/topology/processor_stage.ex:143: Broadway.Topology.ProcessorStage.handle_messages/4
    (broadway 1.0.1) lib/broadway/topology/processor_stage.ex:63: anonymous fn/2 in Broadway.Topology.ProcessorStage.handle_events/3
    (telemetry 0.4.3) /home/apoorv-2204/Documents/testnetwork/node1/deps/telemetry/src/telemetry.erl:272: :telemetry.span/3
    (gen_stage 1.1.2) lib/gen_stage.ex:2471: GenStage.consumer_dispatch/6
    (stdlib 3.17) gen_server.erl:695: :gen_server.try_dispatch/4
    (stdlib 3.17) gen_server.erl:771: :gen_server.handle_msg/6
    (stdlib 3.17) proc_lib.erl:236: :proc_lib.wake_up/3

No response

@apoorv-2204 apoorv-2204 added the bug Something isn't working label Jul 8, 2022
@Neylix Neylix added the DB Involve database label Jul 8, 2022
@Neylix Neylix mentioned this issue Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DB Involve database
Projects
None yet
Development

No branches or pull requests

2 participants