Fix: catch error when post_partial_solution#675
Open
zhongzichang wants to merge 1 commit intoArweaveTeam:masterfrom
Open
Fix: catch error when post_partial_solution#675zhongzichang wants to merge 1 commit intoArweaveTeam:masterfrom
zhongzichang wants to merge 1 commit intoArweaveTeam:masterfrom
Conversation
This uncaught error causes ar_mining_server to be terminated. b64fast.encode > ar_serialize.poa_to_json_struct > ar_serialize.solution_to_json_struct > ar_http_iface_client,post_partial_solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This uncaught error causes ar_mining_server to be terminated.
2024-12-19T22:40:27.863586+08:00 [info] ar_http_iface_middleware:handle_mining_h2/2:3194 event: h2_received, peer: 172.16.2.38:10059 2024-12-19T22:40:27.864503+08:00 [error] ar_data_sync:get_chunk/2:374 event: chunk_record_not_found, tags: [solution_proofs], modules_covering_offset: [], root_sync_records: [], seek_offset: 214299957829879, is _recorded_unpacked: false 2024-12-19T22:40:27.865105+08:00 [info] ar_mining_server:prepare_poa/3:801 event: failed_to_find_poa_proofs_locally, poa: poa2, error: chunk_not_found, tags: [solution_proofs], recall_byte: 214299957854116, pac king_difficulty: 1, modules_covering_recall_byte: [] 2024-12-19T22:40:27.865310+08:00 [info] ar_mining_server:prepare_poa/3:816 event: failed_to_fetch_proofs_from_peers, tags: [solution_proofs], poa: poa2, recall_byte: 214299957854116, nonce: 2553, partition: 6, mining_address: <<"M2Ms4TxJJHP7h2b1FX1Ji3gcmxdBW8D45NqTGPfGNzk">>, packing_difficulty: 1 2024-12-19T22:40:28.205241+08:00 [error] gen_server:error_info/7:949 Generic server ar_mining_server terminating. Reason: {badarg,[{b64fast,encode,1,[{file,"/home/zzc/projs/arweave/_build/default/lib/b64fast/sr c/b64fast.erl"},{line,22}]},{ar_serialize,poa_to_json_struct,1,[{file,"/home/zzc/projs/arweave/apps/arweave/src/ar_serialize.erl"},{line,1416}]},{ar_serialize,solution_to_json_struct,1,[{file,"/home/zzc/projs/a rweave/apps/arweave/src/ar_serialize.erl"},{line,1965}]},{ar_http_iface_client,post_partial_solution,2,[{file,"/home/zzc/projs/arweave/apps/arweave/src/ar_http_iface_client.erl"},{line,696}]},{ar_mining_server, post_solution,3,[{file,"/home/zzc/projs/arweave/apps/arweave/src/ar_mining_server.erl"},{line,903}]},{ar_mining_server,handle_cast,2,[{file,"/home/zzc/projs/arweave/apps/arweave/src/ar_mining_server.erl"},{line ,226}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,695}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,771}]}]}. Last message: {'$gen_cast',{prepare_and_post_solution,{mining_candidate ,not_set,not_set,not_set,{115792080403080871531728842960860526452649036571989637701808933585541008457727,115791205813783806231406193359937536394012070923692126229978523204812483330047},[],not_set,<<29,190,111,1 7,211,67,92,205,196,221,17,3,195,70,237,145,168,34,101,82,199,184,44,208,60,79,82,255,20,45,216,18>>,<<239,66,23,49,237,94,170,170,127,246,179,25,60,130,97,177,53,108,45,232,16,179,56,244,163,232,190,48,157,70, 8,1>>,<<255,255,251,142,150,150,176,122,11,97,174,47,90,151,124,200,38,137,47,211,154,255,91,168,210,196,110,24,240,94,8,112>>,<<51,99,44,225,60,73,36,115,251,135,102,245,21,125,73,139,120,28,155,23,65,91,192,2 48,228,218,147,24,247,198,55,57>>,<<96,115,131,18,69,211,65,120,174,132,186,198,116,123,59,217,12,120,156,95,183,233,119,221,112,29,74,249,46,245,112,116,251,13,166,235,138,48,111,77,68,118,209,228,166,29,74,13 8>>,824815,2553,<<67,174,61,183,208,223,201,174,73,176,177,199,120,133,199,243,149,252,70,181,19,91,86,222,133,211,215,161,33,7,10,74>>,6,59,244809639960822,{poa,1,<<>>,<<>>,<<82,185,74,42,235,197,207,121,78,13 8,234,85,218,14,54,248,63,243,177,28,221,170,21,80,230,33,40,247,88,88,120,48,187,149,196,126,100,176,133,17,130,191,55,53,8,14,136,213,253,206,221,150,4,178,30,175,38,83,235,94,123,139,227,91,184,248,167,57,93 ,246,156,29,224,101,106,145,89,199,241,34,227,154,250,58,166,248,101,254,127,94,191,8,50,28,142,80,176,4,235,202,166,175,107,254,253,149,182,192,76,196,41,69,218,216,31,87,148,158,219,78,133,169,157,64,249,23,9 0,103,234,131,220,230,171,70,110,126,158,85,157,4,179,116,193,216,151,150,94,141,153,0,23,186,185,200,113,114,28,125,145,202,180,158,59,89,61,176,78,138,140,213,59,177,55,100,70,252,126,71,129,62,79,194,14,91,1 28,97,86,107,188,116,38,238,231,43,128,9,148,198,212,168,160,168,87,84,238,246,244,240,65,220,212,42,53,248,39,118,234,18,175,60,140,19,76,92,247,184,240,...>>,<<>>},<<58,98,106,217,158,220,9,3,112,163,62,176,1 52,102,102,136,206,196,247,184,93,3,164,184,171,202,55,25,34,71,101,106>>,<<62,72,58,241,142,127,80,140,99,121,90,171,40,1,186,151,188,122,90,180,98,74,75,44,131,196,230,2,115,176,179,200,172,218,31,17,142,238, 37,41,188,72,39,146,26,25,226,75>>,{<<96,115,131,18,69,211,65,120,174,132,186,198,116,123,59,217,12,120,156,95,183,233,119,221,112,29,74,249,46,245,112,116,251,13,166,235,138,48,111,77,68,118,209,228,166,29,74, 138>>,49850,824815},49850,59820499,1,<<"cm">>}}}. State: {state,false,#{{0,1} => ar_mining_worker_0_1,{1,1} => ar_mining_worker_1_1,{2,1} => ar_mining_worker_2_1,{3,1} => ar_mining_worker_3_1,{4,1} => ar_mining _worker_4_1,{5,1} => ar_mining_worker_5_1,{6,1} => ar_mining_worker_6_1,{7,1} => ar_mining_worker_7_1,{8,1} => ar_mining_worker_8_1,{9,1} => ar_mining_worker_9_1,{10,1} => ar_mining_worker_10_1,{11,1} => ar_min ing_worker_11_1,{12,1} => ar_mining_worker_12_1,{13,1} => ar_mining_worker_13_1,{14,1} => ar_mining_worker_14_1,{15,1} => ar_mining_worker_15_1,{16,1} => ar_mining_worker_16_1,{17,1} => ar_mining_worker_17_1,{1 8,1} => ar_mining_worker_18_1,{19,1} => ar_mining_worker_19_1,{20,1} => ar_mining_worker_20_1,{21,1} => ar_mining_worker_21_1,{22,1} => ar_mining_worker_22_1,{23,1} => ar_mining_worker_23_1,{24,1} => ar_mining_ worker_24_1,{25,1} => ar_mining_worker_25_1,{26,1} => ar_mining_worker_26_1,{27,1} => ar_mining_worker_27_1,{28,1} => ar_mining_worker_28_1,{29,1} => ar_mining_worker_29_1,{30,1} => ar_mining_worker_30_1},{set, 2,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[{<<96,115,131,18,69,211,65,120,174,132,186,198,116,123,59,217,12,120,156,95,183,233,119,221,112,29,74,249,46,245,112, 116,251,13,166,235,138,48,111,77,68,118,209,228,166,29,74,138>>,49850,824815}],[],[],[],[],[],[{<<62,72,58,241,142,127,80,140,99,121,90,171,40,1,186,151,188,122,90,180,98,74,75,44,131,196,230,2,115,176,179,200, 172,218,31,17,142,238,37,41,188,72,39,146,26,25,226,75>>,49849,824815}],[]}}},#{{<<62,72,58,241,142,127,80,140,99,121,90,171,40,1,186,151,188,122,90,180,98,74,75,44,131,196,230,2,115,176,179,200,172,218,31,17,1 42,238,37,41,188,72,39,146,26,25,226,75>>,49849,824815} => <<203,116,17,213,187,63,181,135,84,100,19,127,147,165,183,125,20,214,149,107,196,89,93,105,28,219,110,175,167,88,214,227,137,175,94,136,143,36,80,140,1 04,40,109,33,2,214,243,88>>,{<<96,115,131,18,69,211,65,120,174,132,186,198,116,123,59,217,12,120,156,95,183,233,119,221,112,29,74,249,46,245,112,116,251,13,166,235,138,48,111,77,68,118,209,228,166,29,74,138>>,4 9850,824815} => <<62,72,58,241,142,127,80,140,99,121,90,171,40,1,186,151,188,122,90,180,98,74,75,44,131,196,230,2,115,176,179,200,172,218,31,17,142,238,37,41,188,72,39,146,26,25,226,75>>},{115792089236094550537 861482538254833984170781445250902909651388552218429789642,115792089115151706852620737965380520943349662626674451058838038438443144610458},37161,20000,#Ref<0.1654166057.2406219777.227728>,151066495197430,true,tr ue,1}. 2024-12-19T22:40:28.219529+08:00 [error] proc_lib:crash_report/4:525 crasher: initial call: ar_mining_server:init/1, pid: <0.2693.0>, registered_name: ar_mining_server, error: {badarg,[{b64fast,encode,1,[{file, "/home/zzc/projs/arweave/_build/default/lib/b64fast/src/b64fast.erl"},{line,22}]},{ar_serialize,poa_to_json_struct,1,[{file,"/home/zzc/projs/arweave/apps/arweave/src/ar_serialize.erl"},{line,1416}]},{ar_seriali ze,solution_to_json_struct,1,[{file,"/home/zzc/projs/arweave/apps/arweave/src/ar_serialize.erl"},{line,1965}]},{ar_http_iface_client,post_partial_solution,2,[{file,"/home/zzc/projs/arweave/apps/arweave/src/ar_h ttp_iface_client.erl"},{line,696}]},{ar_mining_server,post_solution,3,[{file,"/home/zzc/projs/arweave/apps/arweave/src/ar_mining_server.erl"},{line,903}]},{ar_mining_server,handle_cast,2,[{file,"/home/zzc/projs /arweave/apps/arweave/src/ar_mining_server.erl"},{line,226}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,695}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,771}]}]}, ancestors: [ar_mi ning_sup,ar_sup,<0.853.0>], message_queue_len: 66, messages: [{'$gen_cast',{compute_h2_for_peer,{mining_candidate,not_set,not_set,not_set,{11579208040308087153172884296086052645264903657198963770180893358554100 8457727,115791205813783806231406193359937536394012070923692126229978523204812483330047},[{...}|...],{...},...}}},{'$gen_cast',{compute_h2_for_peer,{mining_candidate,not_set,not_set,not_set,{11579208040308087153 1728842960860526452649036571989637701808933585541008457727,...},[...],...}}},{'$gen_cast',{compute_h2_for_peer,{mining_candidate,not_set,not_set,not_set,{...},...}}},{'$gen_cast',{compute_h2_for_peer,{mining_ca ndidate,not_set,not_set,not_set,...}}},{'$gen_cast',{compute_h2_for_peer,{mining_candidate,not_set,not_set,...}}},{'$gen_cast',{compute_h2_for_peer,{mining_candidate,not_set,...}}},{'$gen_cast',...}|...], links : [<0.2661.0>], dictionary: [{zero_chunk,<<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,...>>}], trap_exit: true, status: running, heap_size: 318187, stack_size: 29, reduc tions: 2114738769; neighbours: [] 2024-12-19T22:40:28.228414+08:00 [error] supervisor:do_restart/3:736 Supervisor: {local,ar_mining_sup}. Context: child_terminated. Reason: {badarg,[{b64fast,encode,1,[{file,"/home/zzc/projs/arweave/_build/defau lt/lib/b64fast/src/b64fast.erl"},{line,22}]},{ar_serialize,poa_to_json_struct,1,[{file,"/home/zzc/projs/arweave/apps/arweave/src/ar_serialize.erl"},{line,1416}]},{ar_serialize,solution_to_json_struct,1,[{file," /home/zzc/projs/arweave/apps/arweave/src/ar_serialize.erl"},{line,1965}]},{ar_http_iface_client,post_partial_solution,2,[{file,"/home/zzc/projs/arweave/apps/arweave/src/ar_http_iface_client.erl"},{line,696}]},{ ar_mining_server,post_solution,3,[{file,"/home/zzc/projs/arweave/apps/arweave/src/ar_mining_server.erl"},{line,903}]},{ar_mining_server,handle_cast,2,[{file,"/home/zzc/projs/arweave/apps/arweave/src/ar_mining_s erver.erl"},{line,226}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,695}]},{gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,771}]}]}. Offender: id=ar_mining_server,pid=<0.2693.0>. 2024-12-19T22:40:28.601657+08:00 [info] ar_mining_server:init/0:149 event: mining_server_init, packing: composite_M2Ms4TxJJHP7h2b1FX1Ji3gcmxdBW8D45NqTGPfGNzk.1, partitions: 31 2024-12-19T22:40:30.209708+08:00 [info] ar_mining_server:add_sessions/1:374 event: new_mining_session, session_key: {<<"YHODEkXTQXiuhLrGdHs72Qx4nF-36XfdcB1K-S71cHT7DabrijBvTUR20eSmHUqK">>,49850,824815} 2024-12-19T22:40:34.989017+08:00 [info] ar_mining_stats:log_report_lines/0:558