Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix state_history zlib_unpack bug #9895

Merged
merged 3 commits into from
Jan 14, 2021

Conversation

huangminghuang
Copy link
Contributor

Change Description

This PR

  • fixes a bug in zlib_unpack()
  • print more context in state_history_traces_log::get_log_entry if an exception is thrown to facilitate debugging

Change Type

Select ONE:

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Testing Changes

Select ANY that apply:

  • New Tests
  • Existing Tests
  • Test Framework
  • CI System
  • Other

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

if (version == 0) {
return state_history::zlib_decompress(ds);
}
else {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we checking version 1, and throw out exception for other versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Version has been checked in line 56 and I don't want to assume that the code here definitely won't work for future versions.

@allenhan2
Copy link
Contributor

Even the PR has been approved, please double check,
could the newly found bug be related to this change:
debug 2021-01-12T04:03:24.209 thread-0 state_history_plugin.c:189 operator() ] the id for block 162312399 in block request have_positions does not match the existing
debug 2021-01-12T04:03:24.209 thread-0 state_history_plugin.c:193 operator() ] get_blocks_request_v0 start_block_num set to 162312399
error 2021-01-12T04:03:24.210 thread-0 state_history_plugin.c:283 catch_and_close ] 13
N5boost10wrapexceptINS_9iostreams10zlib_errorEEE: zlib error: unspecified iostream_category error

See this, not sure whether it is related to the newly added fix?

@huangminghuang
Copy link
Contributor Author

Even the PR has been approved, please double check,
could the newly found bug be related to this change:
debug 2021-01-12T04:03:24.209 thread-0 state_history_plugin.c:189 operator() ] the id for block 162312399 in block request have_positions does not match the existing
debug 2021-01-12T04:03:24.209 thread-0 state_history_plugin.c:193 operator() ] get_blocks_request_v0 start_block_num set to 162312399
error 2021-01-12T04:03:24.210 thread-0 state_history_plugin.c:283 catch_and_close ] 13
N5boost10wrapexceptINS_9iostreams10zlib_errorEEE: zlib error: unspecified iostream_category error

See this, not sure whether it is related to the newly added fix?

It's not related to the fix.

@huangminghuang huangminghuang merged commit 2be00e6 into develop Jan 14, 2021
@huangminghuang huangminghuang deleted the huangminghuang/fix-ship-unpack branch February 19, 2021 21:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants