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

Fix cpu miner panic when not header #908

Merged
merged 1 commit into from
May 16, 2024

Conversation

Fi3
Copy link
Collaborator

@Fi3 Fi3 commented May 14, 2024

No description provided.

Copy link
Contributor

github-actions bot commented May 14, 2024

🐰Bencher

ReportThu, May 16, 2024 at 19:47:33 UTC
ProjectStratum v2 (SRI)
BranchFixCpuMinerNoHeader
Testbedsv2
Click to view all benchmark results
BenchmarkEstimated CyclesEstimated Cycles Results
estimated cycles | (Δ%)
Estimated Cycles Upper Boundary
estimated cycles | (%)
InstructionsInstructions Results
instructions | (Δ%)
Instructions Upper Boundary
instructions | (%)
L1 AccessesL1 Accesses Results
accesses | (Δ%)
L1 Accesses Upper Boundary
accesses | (%)
L2 AccessesL2 Accesses Results
accesses | (Δ%)
L2 Accesses Upper Boundary
accesses | (%)
RAM AccessesRAM Accesses Results
accesses | (Δ%)
RAM Accesses Upper Boundary
accesses | (%)
client_sv2_handle_message_common✅ (view plot)2,061.00 (+0.38%)2,136.76 (96.45%)✅ (view plot)473.00 (+0.50%)486.77 (97.17%)✅ (view plot)736.00 (+0.60%)755.18 (97.46%)✅ (view plot)6.00 (-18.83%)11.85 (50.62%)✅ (view plot)37.00 (+0.80%)38.72 (95.55%)
client_sv2_handle_message_mining✅ (view plot)8,279.00 (+0.91%)8,355.83 (99.08%)✅ (view plot)2,137.00 (+0.48%)2,171.85 (98.40%)✅ (view plot)3,159.00 (+0.51%)3,215.43 (98.24%)✅ (view plot)37.00 (-5.46%)43.33 (85.38%)✅ (view plot)141.00 (+1.42%)142.42 (99.00%)
client_sv2_mining_message_submit_standard✅ (view plot)6,318.00 (+0.53%)6,395.93 (98.78%)✅ (view plot)1,750.00 (+0.03%)1,763.61 (99.23%)✅ (view plot)2,553.00 (-0.01%)2,575.98 (99.11%)✅ (view plot)18.00 (+1.32%)22.84 (78.82%)✅ (view plot)105.00 (+0.89%)107.09 (98.05%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)14,855.00 (+0.44%)15,066.72 (98.59%)✅ (view plot)4,694.00 (+0.01%)4,707.61 (99.71%)✅ (view plot)6,755.00 (+0.02%)6,775.53 (99.70%)✅ (view plot)45.00 (-5.59%)53.09 (84.76%)✅ (view plot)225.00 (+0.99%)230.78 (97.49%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)27,576.00 (+0.29%)27,895.84 (98.85%)✅ (view plot)10,545.00 (+0.03%)10,558.91 (99.87%)✅ (view plot)15,336.00 (-0.01%)15,360.21 (99.84%)✅ (view plot)89.00 (+5.56%)90.83 (97.99%)✅ (view plot)337.00 (+0.49%)346.62 (97.23%)
client_sv2_open_channel✅ (view plot)4,527.00 (+0.72%)4,615.65 (98.08%)✅ (view plot)1,461.00 (+0.06%)1,474.88 (99.06%)✅ (view plot)2,152.00 (-0.03%)2,173.39 (99.02%)✅ (view plot)13.00 (+7.98%)15.48 (83.97%)✅ (view plot)66.00 (+1.23%)68.27 (96.68%)
client_sv2_open_channel_serialize✅ (view plot)14,250.00 (+0.13%)14,488.39 (98.35%)✅ (view plot)5,064.00 (+0.02%)5,077.88 (99.73%)✅ (view plot)7,320.00 (+0.04%)7,339.77 (99.73%)✅ (view plot)35.00 (-5.90%)41.79 (83.75%)✅ (view plot)193.00 (+0.40%)199.58 (96.70%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)22,734.00 (+0.31%)23,085.76 (98.48%)✅ (view plot)7,987.00 (+0.05%)8,001.48 (99.82%)✅ (view plot)11,614.00 (+0.01%)11,636.79 (99.80%)✅ (view plot)75.00 (+2.46%)81.78 (91.70%)✅ (view plot)307.00 (+0.55%)316.58 (96.97%)
client_sv2_setup_connection✅ (view plot)4,703.00 (+0.04%)4,767.55 (98.65%)✅ (view plot)1,502.00 (+0.05%)1,515.88 (99.08%)✅ (view plot)2,278.00 (+0.06%)2,300.18 (99.04%)✅ (view plot)9.00 (-2.13%)13.39 (67.20%)✅ (view plot)68.00 (+0.06%)69.63 (97.66%)
client_sv2_setup_connection_serialize✅ (view plot)16,372.00 (+0.65%)16,472.36 (99.39%)✅ (view plot)5,963.00 (+0.01%)5,976.88 (99.77%)✅ (view plot)8,652.00 (-0.04%)8,678.11 (99.70%)✅ (view plot)46.00 (+3.03%)49.26 (93.39%)✅ (view plot)214.00 (+1.37%)216.84 (98.69%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)35,590.00 (+0.13%)35,772.46 (99.49%)✅ (view plot)14,814.00 (+0.03%)14,828.48 (99.90%)✅ (view plot)21,745.00 (-0.02%)21,772.41 (99.87%)✅ (view plot)109.00 (+8.68%)115.15 (94.66%)✅ (view plot)380.00 (+0.05%)384.74 (98.77%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Copy link
Contributor

github-actions bot commented May 14, 2024

🐰Bencher

ReportThu, May 16, 2024 at 19:47:28 UTC
ProjectStratum v2 (SRI)
BranchFixCpuMinerNoHeader
Testbedsv1
Click to view all benchmark results
BenchmarkEstimated CyclesEstimated Cycles Results
estimated cycles | (Δ%)
Estimated Cycles Upper Boundary
estimated cycles | (%)
InstructionsInstructions Results
instructions | (Δ%)
Instructions Upper Boundary
instructions | (%)
L1 AccessesL1 Accesses Results
accesses | (Δ%)
L1 Accesses Upper Boundary
accesses | (%)
L2 AccessesL2 Accesses Results
accesses | (Δ%)
L2 Accesses Upper Boundary
accesses | (%)
RAM AccessesRAM Accesses Results
accesses | (Δ%)
RAM Accesses Upper Boundary
accesses | (%)
get_authorize✅ (view plot)8,440.00 (+0.25%)8,708.77 (96.91%)✅ (view plot)3,746.00 (+0.27%)3,852.73 (97.23%)✅ (view plot)5,250.00 (+0.24%)5,395.25 (97.31%)✅ (view plot)8.00 (-1.21%)10.47 (76.41%)✅ (view plot)90.00 (+0.28%)93.66 (96.09%)
get_submit✅ (view plot)95,553.00 (+0.01%)96,152.77 (99.38%)✅ (view plot)59,439.00 (-0.03%)59,778.56 (99.43%)✅ (view plot)85,348.00 (-0.05%)85,830.90 (99.44%)✅ (view plot)60.00 (+8.20%)63.01 (95.23%)✅ (view plot)283.00 (+0.26%)288.03 (98.25%)
get_subscribe✅ (view plot)8,015.00 (+0.55%)8,273.28 (96.88%)✅ (view plot)2,841.00 (+0.46%)2,941.82 (96.57%)✅ (view plot)3,965.00 (+0.36%)4,101.28 (96.68%)✅ (view plot)19.00 (+16.61%)19.84 (95.74%)✅ (view plot)113.00 (+0.40%)116.93 (96.63%)
serialize_authorize✅ (view plot)12,159.00 (-0.16%)12,460.79 (97.58%)✅ (view plot)5,317.00 (+0.19%)5,423.73 (98.03%)✅ (view plot)7,414.00 (+0.18%)7,559.22 (98.08%)✅ (view plot)11.00 (-0.53%)13.61 (80.81%)✅ (view plot)134.00 (-0.70%)139.10 (96.33%)
serialize_deserialize_authorize✅ (view plot)24,472.00 (+0.10%)24,675.89 (99.17%)✅ (view plot)9,898.00 (+0.06%)10,016.06 (98.82%)✅ (view plot)13,957.00 (+0.03%)14,130.72 (98.77%)✅ (view plot)38.00 (+2.54%)41.81 (90.89%)✅ (view plot)295.00 (+0.15%)297.22 (99.25%)
serialize_deserialize_handle_authorize✅ (view plot)30,169.00 (+0.11%)30,325.08 (99.49%)✅ (view plot)12,101.00 (+0.08%)12,207.73 (99.13%)✅ (view plot)17,119.00 (+0.05%)17,274.99 (99.10%)✅ (view plot)62.00 (+6.25%)63.75 (97.26%)✅ (view plot)364.00 (+0.05%)366.58 (99.30%)
serialize_deserialize_handle_submit✅ (view plot)126,442.00 (+0.03%)127,045.12 (99.53%)✅ (view plot)73,224.00 (-0.02%)73,622.36 (99.46%)✅ (view plot)104,937.00 (-0.03%)105,509.42 (99.46%)✅ (view plot)129.00 (+6.80%)132.70 (97.21%)✅ (view plot)596.00 (+0.16%)599.31 (99.45%)
serialize_deserialize_handle_subscribe✅ (view plot)27,485.00 (+0.11%)27,603.37 (99.57%)✅ (view plot)9,643.00 (+0.14%)9,743.82 (98.97%)✅ (view plot)13,635.00 (+0.11%)13,778.55 (98.96%)✅ (view plot)68.00 (+4.43%)70.62 (96.29%)✅ (view plot)386.00 (+0.01%)388.40 (99.38%)
serialize_deserialize_submit✅ (view plot)115,069.00 (+0.02%)115,622.49 (99.52%)✅ (view plot)68,001.00 (-0.05%)68,383.42 (99.44%)✅ (view plot)97,549.00 (-0.07%)98,110.30 (99.43%)✅ (view plot)74.00 (+6.82%)74.67 (99.10%)✅ (view plot)490.00 (+0.37%)492.58 (99.48%)
serialize_deserialize_subscribe✅ (view plot)22,908.00 (+0.20%)23,099.14 (99.17%)✅ (view plot)8,195.00 (+0.15%)8,297.95 (98.76%)✅ (view plot)11,538.00 (+0.11%)11,682.10 (98.77%)✅ (view plot)41.00 (+4.08%)43.85 (93.50%)✅ (view plot)319.00 (+0.22%)321.19 (99.32%)
serialize_submit✅ (view plot)99,836.00 (-0.04%)100,460.76 (99.38%)✅ (view plot)61,483.00 (-0.03%)61,828.34 (99.44%)✅ (view plot)88,196.00 (-0.04%)88,685.85 (99.45%)✅ (view plot)60.00 (+7.26%)62.06 (96.69%)✅ (view plot)324.00 (-0.16%)329.13 (98.44%)
serialize_subscribe✅ (view plot)11,310.00 (+0.00%)11,583.76 (97.64%)✅ (view plot)4,188.00 (+0.31%)4,288.82 (97.65%)✅ (view plot)5,825.00 (+0.27%)5,961.15 (97.72%)✅ (view plot)19.00 (+15.49%)19.20 (98.96%)✅ (view plot)154.00 (-0.52%)159.02 (96.84%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Copy link
Contributor

github-actions bot commented May 14, 2024

🐰Bencher

ReportThu, May 16, 2024 at 19:47:28 UTC
ProjectStratum v2 (SRI)
BranchFixCpuMinerNoHeader
Testbedsv2
Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client_sv2_handle_message_common✅ (view plot)44.03 (-1.11%)45.23 (97.37%)
client_sv2_handle_message_mining✅ (view plot)74.93 (+2.28%)82.41 (90.92%)
client_sv2_mining_message_submit_standard✅ (view plot)14.63 (-0.15%)14.69 (99.61%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)250.85 (-5.18%)284.42 (88.20%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)611.63 (+3.07%)625.22 (97.83%)
client_sv2_open_channel✅ (view plot)168.57 (+1.83%)171.20 (98.47%)
client_sv2_open_channel_serialize✅ (view plot)278.17 (-2.19%)296.14 (93.93%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)374.43 (-0.53%)402.41 (93.05%)
client_sv2_setup_connection✅ (view plot)168.35 (+2.62%)174.93 (96.24%)
client_sv2_setup_connection_serialize✅ (view plot)465.07 (-1.66%)498.17 (93.35%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)974.19 (+0.58%)1,041.15 (93.57%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Copy link
Contributor

github-actions bot commented May 14, 2024

🐰Bencher

ReportThu, May 16, 2024 at 19:47:28 UTC
ProjectStratum v2 (SRI)
Branch908/merge
Testbedsv1

🚨 1 ALERT: Threshold Boundary Limit exceeded!
BenchmarkMeasure (units)ViewValueLower BoundaryUpper Boundary
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserializeLatency (nanoseconds (ns))🚨 (view plot | view alert)642.55 (+4.30%)641.91 (100.10%)

Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client-submit-serialize✅ (view plot)6,802.90 (-1.73%)7,274.31 (93.52%)
client-submit-serialize-deserialize✅ (view plot)7,981.40 (+1.70%)8,269.01 (96.52%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle✅ (view plot)8,415.80 (-0.11%)8,825.09 (95.36%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle✅ (view plot)887.23 (-1.24%)926.99 (95.71%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize✅ (view plot)715.84 (+2.53%)721.87 (99.16%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize✅ (view plot)248.39 (+0.16%)254.43 (97.63%)
client-sv1-get-authorize/client-sv1-get-authorize✅ (view plot)155.49 (-0.81%)160.05 (97.15%)
client-sv1-get-submit✅ (view plot)6,749.20 (+0.89%)7,038.81 (95.89%)
client-sv1-get-subscribe/client-sv1-get-subscribe✅ (view plot)276.78 (-0.74%)291.58 (94.92%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle✅ (view plot)752.51 (+0.57%)779.73 (96.51%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize🚨 (view plot | view alert)642.55 (+4.30%)641.91 (100.10%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize✅ (view plot)206.89 (+0.16%)220.00 (94.04%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

@plebhash
Copy link
Collaborator

can you provide a description of the bug this PR is fixing?

} else {
std::thread::yield_now();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the purpose of this yield_now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

avoid entering a spin loop, this i better than the hint as we can just wait here as it can happen only when the application is starting, the there will always be an header

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean by hint?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://doc.rust-lang.org/std/hint/index.html in that case a spin_loop hint

@plebhash plebhash merged commit bd494af into stratum-mining:dev May 16, 2024
13 checks passed
@plebhash plebhash mentioned this pull request May 23, 2024
Fi3 added a commit that referenced this pull request May 28, 2024
Co-authored-by: fi3 <email@email.com>
@plebhash plebhash mentioned this pull request May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants