Skip to content

ETCD 3.6.1 on macos (aarch64) fallocates member/wal/0.tmp of the size 186G and more #20188

Open
@ochaton

Description

@ochaton

Bug report criteria

What happened?

TLDR: wal/0.tmp uses 186Gb on FS, while contains only 61Mb data in it (probably because of sparse file?)

❯ du -h /opt/homebrew/var/default.etcd/member/wal/0.tmp
186G	/opt/homebrew/var/default.etcd/member/wal/0.tmp

❯ ls -lh /opt/homebrew/var/default.etcd/member/wal/0.tmp
-rw-------  1 ochaton  admin    61M Jun 18 13:39 /opt/homebrew/var/default.etcd/member/wal/0.tmp

❯ stat /opt/homebrew/var/default.etcd/member/wal/0.tmp
16777232 265439495 -rw------- 1 ochaton admin 0 64000000 "Jun 18 13:31:21 2025" "Jun 18 13:39:27 2025" "Jun 18 13:39:27 2025" "Jun  8 22:05:01 2025" 4096 390250000 0 /opt/homebrew/var/default.etcd/member/wal/0.tmp

What did you expect to happen?

That ETCD WILL NOT occupy all of my hard drive (186G is clearly too much)

How can we reproduce it (as minimally and precisely as possible)?

It is reproduced on my machine every day. It just drains all of my HardDrive.

Anything else we need to know?

No response

Etcd version (please run commands below)

etcd --version
etcd Version: 3.6.1
Git SHA: a4708beb0
Go Version: go1.24.4
Go OS/Arch: darwin/arm64etcdctl version
etcdctl version: 3.6.1
API version: 3.6

Etcd configuration (command line flags or environment variables)

Default brew services configuration. Etcd is run with brew services start etcd

Process Env after restart

❯ ps -Eww 24677
24677 ??         0:01.81 /opt/homebrew/opt/etcd/bin/etcd ETCD_UNSUPPORTED_ARCH=arm64 XPC_SERVICE_NAME=homebrew.mxcl.etcd SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.AqO5V0oyUB/Listeners PATH=/usr/bin:/bin:/usr/sbin:/sbin XPC_FLAGS=1 LOGNAME=ochaton USER=ochaton HOME=/Users/ochaton SHELL=/bin/zsh TMPDIR=/var/folders/8x/1m5v3n6d4mn62g9w_65vvt_r0000gn/T/

Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)

Well, ETCD went down, because no space left on a hard drive.
Results after I rebootstrap etcd:

etcdctl member list -w table
+------------------+---------+---------+-----------------------+-----------------------+------------+
|        ID        | STATUS  |  NAME   |      PEER ADDRS       |     CLIENT ADDRS      | IS LEARNER |
+------------------+---------+---------+-----------------------+-----------------------+------------+
| 8e9e05c52164694d | started | default | http://localhost:2380 | http://localhost:2379 |      false |
+------------------+---------+---------+-----------------------+-----------------------+------------+etcdctl --endpoints=http://localhost:2379 endpoint status -w table
+-----------------------+------------------+---------+-----------------+---------+--------+-----------------------+-------+-----------+------------+-----------+------------+--------------------+--------+--------------------------+-------------------+
|       ENDPOINT        |        ID        | VERSION | STORAGE VERSION | DB SIZE | IN USE | PERCENTAGE NOT IN USE | QUOTA | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS | DOWNGRADE TARGET VERSION | DOWNGRADE ENABLED |
+-----------------------+------------------+---------+-----------------+---------+--------+-----------------------+-------+-----------+------------+-----------+------------+--------------------+--------+--------------------------+-------------------+
| http://localhost:2379 | 8e9e05c52164694d |   3.6.1 |           3.6.0 |   98 kB |  98 kB |                    0% |   0 B |      true |      false |         2 |          4 |                  4 |        |                          |             false |
+-----------------------+------------------+---------+-----------------+---------+--------+-----------------------+-------+-----------+------------+-----------+------------+--------------------+--------+--------------------------+-------------------+

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions