No Branch/Tag Specified
arm
asyncnotedecryption
danger
dev
dev-aarch64
dev-mac
dev-old-randomx
divzaddrs
dragonx
duke
freebsd
getfilterednotes
hip39
hushutils
insync
jahway603
master
mvstuff
onryo
p2p_privacy
ramhash
relaytx
rx-largepages
setbestchain
warmup
witness_cache
wolfssl
wolfssl_win
z_createrawtransaction
z_importwallet
z_signmessage
v0.11.2.z0
v0.11.2.z1
v0.11.2.z2
v0.11.2.z3
v0.11.2.z4
v0.11.2.z5
v0.11.2.z6
v0.11.2.z7
v0.11.2.z8
v0.11.2.z9
v1.0.0
v1.0.0-beta1
v1.0.0-beta2
v1.0.0-rc1
v1.0.0-rc2
v1.0.0-rc3
v1.0.0-rc4
v1.0.1
v1.0.10
v1.0.10-1
v1.0.11
v1.0.11-rc1
v1.0.12
v1.0.12-rc1
v1.0.13
v1.0.13-rc1
v1.0.13-rc2
v1.0.14
v1.0.14-rc1
v1.0.15
v1.0.15-rc1
v1.0.2
v1.0.3
v1.0.4
v1.0.5
v1.0.6
v1.0.7-1
v1.0.8
v1.0.8-1
v1.0.9
v1.1.0
v1.1.0-rc1
v1.1.1
v1.1.1-rc1
v1.1.1-rc2
v1.1.2
v1.1.2-rc1
v2.0.0
v2.0.0-rc1
v2.0.1
v3.0.0
v3.1.0
v3.1.1
v3.10.0
v3.10.1
v3.10.2
v3.2.0
v3.2.1
v3.2.1-alpha
v3.2.1-beta
v3.2.2
v3.2.3
v3.3.0
v3.3.1
v3.3.2
v3.4.0
v3.4.1
v3.5.0
v3.5.1
v3.5.2
v3.6.0
v3.6.1
v3.6.2
v3.6.3
v3.7.0
v3.7.1
v3.8.0
v3.9.0
v3.9.1
v3.9.2
v3.9.3
v3.9.4
Labels
bounty up to 500 HUSH 2001-5000 bounty
bounty between 2001 and 5000 HUSH 501-2000 bounty
bounty between 501 and 2000 HUSH arm
something doesn't work on arm beginners
for new developers bug
may or may not be a bug build
problems building documentation
not enough information feature
new feature high priority
high priority i2p
related to i2p low priority
low priority medium priority
medium priority question
something is not clear release
release label or issue related to it testing
related to testing tor
related to tor wontfix
this won't be fixed
Apply labels
Clear labels
0-500 bounty
bounty up to 500 HUSH 2001-5000 bounty
bounty between 2001 and 5000 HUSH 501-2000 bounty
bounty between 501 and 2000 HUSH arm
something doesn't work on arm beginners
for new developers bug
may or may not be a bug build
problems building documentation
not enough information feature
new feature high priority
high priority i2p
related to i2p low priority
low priority medium priority
medium priority question
something is not clear release
release label or issue related to it testing
related to testing tor
related to tor wontfix
this won't be fixed
No Label
0-500 bounty
2001-5000 bounty
501-2000 bounty
arm
beginners
bug
build
documentation
feature
high priority
i2p
low priority
medium priority
question
release
testing
tor
wontfix
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
This issue currently doesn't have any dependencies.
Reference in new issue
There is no content yet.
Delete Branch '%!s(MISSING)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
hushd had recently crashed for me when doing a long rescan with rescanheight and keepnotewitnesscache=1 parameters, using the dev branch, and then I used the same exact command on the reduce_memory branch and got the assertion from this new code added in the branch in src/chain.h :
When I uncomment the assert and add
I get
with a coredump backtrace of
The reason I consider this a bug is that if I use the
dev
branch instead ofreduce_memory
, with the exact same hushd command, it can continue to rescan the node, even after the crash. So this is shitty upstream Zcash code, which adds an assertion that crashes the node and makes it very hard for the user to continue. In this situation, a user likely has to reindex the entire chain history or do a fresh sync. Addingassert()
is very user hostile and we should do better than Zcash, who obviously did not test this code in a variety of situations. It's likely that many Zcash users will not be able to easily recover after a crash and will be forced to do a fresh sync or reindex of all time 💩@duke I am getting the same coredump after building and trying to run. I was running
dev
branch and stopped it before trying to runreduce_memory
branch. No crashed node or rescan and thedev
branch starts back up fine.This happens directly on startup of
reduce_memory
branch.@fekt thanks for testing. I guess we need to see if the code works correctly on a fresh sync, that might give us a clue.
The latest code on this branch attempts to recalculate the blockhash if
phashBlock
is null. It asks the block index on disk for the data but does not yet store the data inphashBlock
. Needs testing.I am testing the latest code on a fresh sync, and there is no crash. So it seems that this bug only happens when hushd partially syncs with a different branch and then tries to continue syncing with the
reduce_memory
code.The latest code gets further in the startup process, but eventually crashes. To test, I synced a small number of blocks with the
duke
branch, then stopped the node and then continued the sync with thereduce_memory
branch .STDERR looks like :
followed by about 650K lines of "phashBlock NULL" lines and then finally
debug.log has a few more details :
It seems that on line 1943 of src/init.cpp the call to
RewindBlockIndex()
is failing, which gives theUnable to rewind the database...
error. Inside that function is a call topblocktree->WriteBatchSync()
which seems to fail on line 3698 of src/main.cpp . That is what callsAbortNode
with "Files to write to block index database" .WriteBatchSync
is a thin wrapper aroundCDBWrapper::WriteBatch
which is a thinner wrapper aroundleveldb::DB->Write
, which can be seen in src/dbwrapper.cpp . So the origin of this bug is LevelDB is not happy (which is the database format of the block index), which is most likely caused by some data not being present which is what causesphashBlock
to be null.There was some important code missing in this branch and when I added it, we now get a different kind of error, which at least does not corrupt the block index.
There is new code on this branch, currently undergoing testing
this no longer happens with the new code, closing