When a dqlite follower node terminates unexpectedly (without a graceful shutdown), convertClearFollower() tries to free an invalid current_leader.address pointer, causing a crash:
#6 0x00007668d86add55 in __GI___libc_free (mem=0x1) at ./malloc/malloc.c:3375
#7 0x00007668d88c0e54 in convertClearFollower (r=0x766840003ce0) at src/raft/convert.c:49
We discovered this segfault during LXD's test_clustering_heal_networks_stop() integration test (prior to canonical/lxd#16806).
core.tar.gz contains the core dump captured at crash.
Additional information:
- dqlite compiled with
autoreconf -i && CFLAGS="-g -O0" ./configure --enable-build-raft --enable-debug && make -j
- lxd compiled with
CC="cc" CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" go install -v -tags "libsqlite3" -trimpath -gcflags="all=-N -l" ./lxd
When a dqlite follower node terminates unexpectedly (without a graceful shutdown),
convertClearFollower()tries to free an invalidcurrent_leader.addresspointer, causing a crash:We discovered this segfault during LXD's
test_clustering_heal_networks_stop()integration test (prior to canonical/lxd#16806).core.tar.gz contains the core dump captured at crash.
Additional information:
autoreconf -i && CFLAGS="-g -O0" ./configure --enable-build-raft --enable-debug && make -jCC="cc" CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" go install -v -tags "libsqlite3" -trimpath -gcflags="all=-N -l" ./lxd