cowsql / raft

Asynchronous C implementation of the Raft consensus protocol
https://raft.readthedocs.io
Other
45 stars 6 forks source link

v0.18.3 test failure on Alpine #120

Closed dermotbradley closed 8 months ago

dermotbradley commented 8 months ago

I'm packaging up the cowsql rest fork for Alpine. I've built v0.18.3 and one of the testcases fails:

append/finalizeSegment                                      [ ERROR ]
     src/uv_append.c:598 - enqueue 4 entries
    src/uv_prepare.c:166 - create open segment open-1
     src/uv_append.c:630 - set uv->append_next_index 5
    src/uv_prepare.c:232 - completed creation of open-1
    src/uv_prepare.c:166 - create open segment open-2
    src/uv_prepare.c:232 - completed creation of open-2
    src/uv_prepare.c:166 - create open segment open-3
     src/uv_append.c:598 - enqueue 1 entries
     src/uv_append.c:630 - set uv->append_next_index 6
   src/uv_finalize.c: 39 - finalize open-1 into 0000000000000001-0000000000000004
    src/uv_prepare.c:232 - completed creation of open-3
    src/uv_prepare.c:166 - create open segment open-4
Error: test/integration/test_uv_append.c:193: assertion failed: DirHasFile(f->dir, "0000000000000001-0000000000000004") is not true
Error: child killed by signal 6 (Aborted)
...
...
219 of 220 (100%) tests successful, 11 (5%) test skipped.
FAIL test/integration/uv (exit status: 1)

When building the canonical raft v0.18.0 in the same environment all testcases pass.

freeekanayaka commented 8 months ago

Hey, could please you provide the steps to reproduce this?

I can launch an Alpine container with Incus, but I'm not very familiar with Alpine, so if you could provide info about how to setup the build environment after having launched the container, that would help. Thanks.

dermotbradley commented 8 months ago

Here's the Alpine packaging I'm testing: https://github.com/dermotbradley/alpine-misc-notes/tree/main/incus/raft

I'm running "abuild", the Alpine packing tool, inside an Alpine Edge docker container. Basically I'm using something similar to this: https://github.com/andyshinn/docker-alpine-abuild

More info on how Alpine packaging is done here: https://wiki.alpinelinux.org/wiki/Abuild_and_Helpers

freeekanayaka commented 8 months ago

Do you get the same failure if you just run autoreconf -i; ./configure; make check manually (without running "abuild")?

It would be interesting to also try on an Alpine Edge VM instead of a docker container. I'll try to reproduce it myself as well, but the more info you can provide the easier it will be for me. Thanks.

dermotbradley commented 8 months ago

I testing building in an Alpine VM and did not see the problem, whereas I have been seeing it every time I built via the docker container that I use.

I have patched in the change you raised as #128 and that now resolves the test error when building via Docker.

Thanks!