This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Conversation
This file contains 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
This was referenced Jan 20, 2021
…e package builder step anyways
…ich have yet to recieve Ubuntu 20.04
kj4ezj
changed the title
Generate Debug Binaries in CI
Create eosio-debug-build Pipeline
Jan 30, 2021
scottarnette
approved these changes
Feb 1, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Change Description
From AUTO-363, Blockchain asked that we publish an Ubuntu package produced by a debug build
in the eosio pipeline.This pull request modifies the CI code to support the eosio-debug-build pipeline, which builds debug builds for each commit. For example:
eos:develop
eos:release/2.1.x
eos:release/2.0.x
eos:release/1.8.x
The eosio-debug-build pipeline also allows engineers to define a build type by declaring
DCMAKE_BUILD_TYPE
in the environment. For example, I performed aRelWithDebInfo
build in build 16:DCMAKE_BUILD_TYPE='RelWithDebInfo'
This variable can also be declared in the eosio, eosio-build-unpinned, or eosio-lrt pipelines. However, we do not recommend running tests against non-optimized (debug) builds.
Background
During startup,
nodeos
performs a number of checks to protect itself from accidentally corrupting the state files, such as verifying the state files were not created with a newer version ofnodeos
, checking thegenesis.json
orsnapshot.bin
chain ID, and comparing the library versions leveraged to write the state files to those in the running copy ofnodeos
. That last check can make it time consuming for Blockchain to debug when replaying real chains.For example, during an intense late-night debugging video call, we had stood up a cloud instance, loaded hundreds of gigabytes of chain data onto the cloud instance, then ran a release build of
nodeos
obtained from CI. We stopped it at a particular block just before our bug and wanted to step through with a debugger. Unfortunately, these state files are unlikely to be accepted by a debugging build ofnodeos
built on the cloud instance or our local machine, because the build environment and thus libraries are different. So we had to rebuildnodeos
twice on the same machine, once for a release build and once for a debug build, in order to switch back and forth between a release (optimized) and debug (non-optimized) build ofnodeos
while replaying this problematic chain segment.To prevent this from being an issue in the future, this pull request introducesDebug
andRelWithDebInfo
build and packaging steps for the latest supported Ubuntu operating system. Since the CI system uses a deterministic build environment with consistent library versions, this will allow Blockchain engineers to pull packages with the level of debug tooling and optimization necessary for their work, and to switch between them at-will without risk of corrupting their state files or failing the startup checks.See Also
eos:develop
eos:release/2.1.x
eos:release/2.0.x
eos:release/1.8.x
Change Type
Select ONE:
Testing Changes
Select ANY that apply:
Consensus Changes
API Changes
Documentation Additions