From 64287a6917ff1a343314a900e39537f0abae30bb Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Tue, 27 Feb 2024 13:17:02 +0100 Subject: [PATCH 1/2] ci: Remove the alping compilation test This workflow has never had a particularly good signal-to-noise ratio, and disabling it saves us a couple of GH Actions cycles, with only minor reduction in test reach. We should rather rethink this and use the installation instructions to write Dockerfiles for each described architecture, and then have the CI test-build those Dockerfiles. That would also cover the docs during testing, rather than having yet another place where the instructions can bitrot away. Changelog-None No user-visible change. --- .github/workflows/ci_build.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .github/workflows/ci_build.yml diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml deleted file mode 100644 index 71e51cabb837..000000000000 --- a/.github/workflows/ci_build.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: CI Compilation testing - -on: [push, pull_request] - -jobs: - test: - runs-on: ubuntu-latest - timeout-minutes: 120 - strategy: - fail-fast: false - matrix: - include: - - { OS: alpine } - steps: - - uses: actions/checkout@v2 - - name: Integration testing - run: | - docker build -f contrib/docker/Dockerfile.${{matrix.OS}} -t clightning-${{matrix.OS}} . From e38fb0cd6d631b88ddeedb7bdb227acd5512a0b9 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 27 Feb 2024 14:05:48 +1030 Subject: [PATCH 2/2] gossmap: fix OpenBSD crash. Thanks to amazing debugging assistance from grubles, we figured out that indeed, my memory was correct: write and mmap are not consistent on all platforms. The easiest fix is to disable mmap on OpenBSD for now: the better fix is to do in-place updates using the mmap, and only rely on write() for append (which always causes a remap anyway before it's accessed). Fixes: https://github.com/ElementsProject/lightning/issues/7109 Signed-off-by: Rusty Russell --- common/gossmap.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/gossmap.c b/common/gossmap.c index 9957bc4ddc14..a4f6fa6bdf5f 100644 --- a/common/gossmap.c +++ b/common/gossmap.c @@ -690,9 +690,13 @@ static bool load_gossip_store(struct gossmap *map) { map->map_size = lseek(map->fd, 0, SEEK_END); map->local = NULL; + + /* gossipd uses pwritev(), which is not consistent with mmap on OpenBSD! */ +#ifndef __OpenBSD__ /* If this fails, we fall back to read */ map->mmap = mmap(NULL, map->map_size, PROT_READ, MAP_SHARED, map->fd, 0); if (map->mmap == MAP_FAILED) +#endif /* __OpenBSD__ */ map->mmap = NULL; /* We only support major version 0 */ @@ -994,8 +998,11 @@ bool gossmap_refresh_mayfail(struct gossmap *map, bool *updated) if (map->mmap) munmap(map->mmap, map->map_size); map->map_size = len; + /* gossipd uses pwritev(), which is not consistent with mmap on OpenBSD! */ +#ifndef __OpenBSD__ map->mmap = mmap(NULL, map->map_size, PROT_READ, MAP_SHARED, map->fd, 0); if (map->mmap == MAP_FAILED) +#endif /* __OpenBSD__ */ map->mmap = NULL; return map_catchup(map, updated);