Skip to content

Fix crash on multiple progpow threads without hack#837

Merged
codeofalltrades merged 1 commit intoVeil-Project:1.1.0from
blondfrogs:fix_progpow_crash
Aug 25, 2020
Merged

Fix crash on multiple progpow threads without hack#837
codeofalltrades merged 1 commit intoVeil-Project:1.1.0from
blondfrogs:fix_progpow_crash

Conversation

@blondfrogs
Copy link
Collaborator

@blondfrogs blondfrogs commented Aug 24, 2020

Problem

Starting multiple ProgPoW threads crashes deep in the depths of the algorithm:

ethash::(anonymous namespace)::fnv1 (v=..., u=...) at crypto/ethash/lib/ethash/ethash.cpp:44
44              r.word32s[i] = fnv1(u.word32s[i], v.word32s[i]);
(gdb) bt
#0  ethash::(anonymous namespace)::fnv1 (v=..., u=...) at crypto/ethash/lib/ethash/ethash.cpp:44
#1  ethash::item_state::update (round=180, this=0xffffcfffbe00) at crypto/ethash/lib/ethash/ethash.cpp:203
#2  ethash::calculate_dataset_item_2048 (context=..., index=<optimized out>) at crypto/ethash/lib/ethash/ethash.cpp:245
#3  0x0000aaaaab16d350 in progpow::(anonymous namespace)::round (    lookup=0xaaaaab16b920 <ethash::calculate_dataset_item_2048(ethash_epoch_context const&, unsigned int)>, state=..., mix=..., r=62,  context=...) at crypto/ethash/lib/ethash/progpow.cpp:165
#4  progpow::(anonymous namespace)::hash_mix (context=..., block_number=block_number@entry=24121, seed=seed@entry=0xffffcfffcbb8, lookup=0xaaaaab16b920 <ethash::calculate_dataset_item_2048(ethash_epoch_context const&, unsigned int)>) at crypto/ethash/lib/ethash/progpow.cpp:257
#5  0x0000aaaaab16da9c in progpow::hash (context=..., block_number=24121, header_hash=..., nonce=<optimized out>) at crypto/ethash/lib/ethash/progpow.cpp:310
#6  0x0000aaaaab0f5bd0 in ProgPowHash (blockHeader=..., mix_hash=...) at /usr/include/c++/9/bits/unique_ptr.h:360

Root Cause

Unknown

@codeofalltrades codeofalltrades added Algo: ProgPow Component: Miner Both PoW and PoS block creation Tag: PoW Related to Proof of Work consensus Tag: Waiting For Code Review Waiting for code review from a core developer labels Aug 24, 2020
@CaveSpectre11 CaveSpectre11 added this to the v1.1.0 milestone Aug 25, 2020
@CaveSpectre11
Copy link
Collaborator

Awesome @blondfrogs !

ACK 2095195

Copy link
Collaborator

@codeofalltrades codeofalltrades left a comment

Choose a reason for hiding this comment

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

ACK 2095195

@codeofalltrades codeofalltrades added Code Review: Passed and removed Tag: Waiting For Code Review Waiting for code review from a core developer labels Aug 25, 2020
@codeofalltrades codeofalltrades merged commit d07b61b into Veil-Project:1.1.0 Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Algo: ProgPow Code Review: Passed Component: Miner Both PoW and PoS block creation Tag: PoW Related to Proof of Work consensus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants