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

Disable http2 with Nix to work around segfaults #4427

Merged
merged 2 commits into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Disable http2 in dev-env calls to nix-build as well
  • Loading branch information
aherrmann committed Feb 6, 2020
commit b39e8b20b197a8ac8b5c93d4d8400cd1358b6447
3 changes: 2 additions & 1 deletion dev-env/bin/dade-freeze
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ fi
DADE_REPO_ROOT="$DADE_CURRENT_SCRIPT_DIR/../../"
VERSION=$(cat "$DADE_REPO_ROOT/dev-env/VERSION")
semver bump $BUMP $VERSION > "$DADE_REPO_ROOT/dev-env/VERSION"
nix-build "$DADE_REPO_ROOT/nix" -A cached.dev-env --no-out-link
# Work around sporadic segfaults. See https://github.com/digital-asset/daml/pull/4427
nix-build --option http2 false "$DADE_REPO_ROOT/nix" -A cached.dev-env --no-out-link
6 changes: 4 additions & 2 deletions dev-env/lib/dade-common
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ dadeBaseHash() {

# List tools defined in dade
dadeListTools() {
cat $(nix-build $DADE_BASE_ROOT/nix -A dade.tools-list)
# Work around sporadic segfaults. See https://github.com/digital-asset/daml/pull/4427
cat $(nix-build --option http2 false $DADE_BASE_ROOT/nix -A dade.tools-list)
}

# dadeGetOutput get output of a target
Expand Down Expand Up @@ -108,7 +109,8 @@ buildTool() {
errcho "Building tools.${attr}${forced}..."
# Allow to fail, so we can capture outpath and to capture the exit code too.
set +e
outpath=$(nix-build "${DADE_BASE_ROOT}/nix/default.nix" -A tools.$attr -Q -o "${target}")
# Work around sporadic segfaults. See https://github.com/digital-asset/daml/pull/4427
outpath=$(nix-build --option http2 false "${DADE_BASE_ROOT}/nix/default.nix" -A tools.$attr -Q -o "${target}")
local dade_build_exit_code=$?
set -e
if [[ "$dade_build_exit_code" != "0" ]]; then
Expand Down
3 changes: 2 additions & 1 deletion dev-env/lib/dade-dump-profile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ if [[ $(uname -v) =~ 'Ubuntu' ]]; then
(
export LC_ALL=C
unset NIX_PATH
out=$(nix-build --no-out-link -Q "${DADE_DEVENV_DIR}/../nix" -I "${TMP_NIX_PATH}" -A pkgs.glibcLocales)
# Work around sporadic segfaults. See https://github.com/digital-asset/daml/pull/4427
out=$(nix-build --option http2 false --no-out-link -Q "${DADE_DEVENV_DIR}/../nix" -I "${TMP_NIX_PATH}" -A pkgs.glibcLocales)
echo "export LOCALE_ARCHIVE=\"${out}/lib/locale/locale-archive\""
)
fi
Expand Down