helium / blockchain-etl

Blockchain follower that follows and stores the Helium blockchain
Apache License 2.0
64 stars 37 forks source link

The program keeps crashing and doesn't work properly #338

Closed YuXiaoCoder closed 11 months ago

YuXiaoCoder commented 2 years ago

I use Docker to run the environment, the specific software version is as follows: Postgres: PostgreSQL-12.9 PostGIS: 3.1.4 0 Docker-Image: https://hub.docker.com/layers/postgis/postgis/postgis/12-3.1-alpine/images/sha256-a87f043db5d1b429228532b06c2267c12e5c78015d27903bca35f12b7f27106b?context=explore

etl=# SELECT version();
                                                   version
--------------------------------------------------------------------------------------------------------------
 PostgreSQL 12.9 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit
(1 row)

etl=# SELECT PostGIS_full_version();
                                                                          postgis_full_version
-------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ----------------
  POSTGIS="3.1.4 0" [EXTENSION] PGSQL="120" GEOS="3.9.1-CAPI-1.14.2" PROJ="7.2.1" LIBXML="2.9.12" LIBJSON="0.15" LIBPROTOBUF= "1.3.3" WAGYU="0.5.0 (Internal)" TOPOLOGY
(1 row)

ETL's Tag: 1.1.143 https://github.com/helium/blockchain-etl/tree/1.1.143

The error log is as follows:

# error log
2022-05-22 02:26:52.616 [error] <0.24635.0> CRASH REPORT Process <0.24635.0> with 0 neighbours exited with reason: {killed,{gen_statem,call,[<0.24634.0>,{recv,4,10000},infinity]}} in gen:do_call/4 line 177
"/mnt_etl/log/error.log" 293L, 58421C                                                                                                                           284,1         Bot
2022-05-22 02:15:45.917 [error] <0.18011.0> gen_statem <0.18011.0> in state established terminated with reason: {killed,handle_event_function}
2022-05-22 02:15:45.917 [error] <0.16068.0> gen_statem <0.16068.0> in state established terminated with reason: {killed,handle_event_function}
2022-05-22 02:15:45.917 [error] <0.18023.0> CRASH REPORT Process <0.18023.0> with 0 neighbours exited with reason: killed in gen_statem:loop_receive/3 line 993
2022-05-22 02:15:45.917 [error] <0.18011.0> CRASH REPORT Process <0.18011.0> with 0 neighbours exited with reason: killed in gen_statem:loop_receive/3 line 993
2022-05-22 02:15:45.917 [error] <0.16068.0> CRASH REPORT Process <0.16068.0> with 0 neighbours exited with reason: killed in gen_statem:loop_receive/3 line 993
2022-05-22 02:15:45.918 [error] <0.18014.0> gen_statem <0.18014.0> in state established terminated with reason: {killed,handle_event_function}
2022-05-22 02:15:45.918 [error] <0.18256.0> gen_server <0.18256.0> terminated with reason: {killed,{gen_statem,call,[<0.18023.0>,{recv,4,10000},infinity]}} in gen:do_call/4 line 177
2022-05-22 02:15:45.918 [error] <0.18014.0> CRASH REPORT Process <0.18014.0> with 0 neighbours exited with reason: killed in gen_statem:loop_receive/3 line 993
2022-05-22 02:15:45.918 [error] <0.18256.0> CRASH REPORT Process <0.18256.0> with 0 neighbours exited with reason: {killed,{gen_statem,call,[<0.18023.0>,{recv,4,10000},infinity]}} in gen:do_call/4 line 177

# crash.log
2022-05-22 02:46:22 =ERROR REPORT====
** Generic server <0.5012.1> terminating
** Last message in was {inert_read,5,{connection,libp2p_yamux_stream,<0.4785.1>}}
** When Server state == {state,libp2p_gossip_stream,{state,blockchain_swarm,{connection,libp2p_yamux_stream,<0.4785.1>},libp2p_group_gossip_server,<0.1373.0>,"gossip/1.0.2",#Ref<0.851803922.2059272196.9034>,"/p2p/112k6tvJFzw49koxT5aBQAgFEx84xbpi6UtLkjvP4ZN4asDFuJEw",peerbook,#Ref<0.851803922.2059141122.188070>},client,{connection,libp2p_yamux_stream,<0.4785.1>},#Ref<0.851803922.2059141122.188069>,#{#Ref<0.851803922.2059141121.164533> => {#Ref<0.851803922.2059141121.164534>,{reply,{<0.1376.0>,#Ref<0.851803922.2059141121.164532>}}}},<0.5013.1>,false,undefined,undefined,false,[],<<>>,<<>>,<<>>,<<>>,0,0}
** Reason for termination ==
** {{killed,{gen_statem,call,[<0.4785.1>,{recv,4,10000},infinity]}},[{gen,do_call,4,[{file,"gen.erl"},{line,177}]},{gen_statem,call_dirty,4,[{file,"gen_statem.erl"},{line,623}]},{libp2p_yamux_stream,statem,2,[{file,"libp2p_yamux_stream.erl"},{line,110}]},{libp2p_framed_stream,recv,2,[{file,"libp2p_framed_stream.erl"},{line,389}]},{libp2p_framed_stream,handle_info,2,[{file,"libp2p_framed_stream.erl"},{line,225}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,637}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,711}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}
2022-05-22 02:46:22 =CRASH REPORT====
  crasher:
    initial call: libp2p_framed_stream:init/1
    pid: <0.5012.1>
    registered_name: []
    exception exit: {{killed,{gen_statem,call,[<0.4785.1>,{recv,4,10000},infinity]}},[{gen,do_call,4,[{file,"gen.erl"},{line,177}]},{gen_statem,call_dirty,4,[{file,"gen_statem.erl"},{line,623}]},{libp2p_yamux_stream,statem,2,[{file,"libp2p_yamux_stream.erl"},{line,110}]},{libp2p_framed_stream,recv,2,[{file,"libp2p_framed_stream.erl"},{line,389}]},{libp2p_framed_stream,handle_info,2,[{file,"libp2p_framed_stream.erl"},{line,225}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,637}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,711}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}
    ancestors: [<0.4784.1>]
    message_queue_len: 1
    messages: [{'DOWN',#Ref<0.851803922.2059141122.188069>,process,<0.4785.1>,killed}]
    links: [<0.1376.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 1598
    stack_size: 27
    reductions: 759
  neighbours:
YuXiaoCoder commented 2 years ago

All the SQL of ETL has been migrated, I confirmed it with the following command:

/opt/etl/bin/blockchain_etl migrations list
image
etl=# SELECT * FROM __migrations ORDER BY id DESC;
image