Closed simon28li closed 2 weeks ago
Huh. What's you go version
?
Took me a while to see: you are on aarch64.
Works fine on Debian aarch64 with go1.21:
jakob@pi4:~/code/earlyoom $ go version
go version go1.21.4 linux/arm64
jakob@pi4:~/code/earlyoom $ uname -a
Linux pi4 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
jakob@pi4:~/code/earlyoom $
jakob@pi4:~/code/earlyoom $
jakob@pi4:~/code/earlyoom $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
jakob@pi4:~/code/earlyoom $
jakob@pi4:~/code/earlyoom $ make test
cppcheck -q . || echo "skipping optional cppcheck"
/bin/sh: 1: cppcheck: not found
skipping optional cppcheck
go test -v
=== RUN TestCli
=== RUN TestCli/-h
=== RUN TestCli/--help
=== RUN TestCli/#00
=== RUN TestCli/-p
=== RUN TestCli/-v
=== RUN TestCli/-d
=== RUN TestCli/-m_1
=== RUN TestCli/-m_0
=== RUN TestCli/-m_-10
=== RUN TestCli/-m_100
=== RUN TestCli/-s_2
=== RUN TestCli/-s_100
=== RUN TestCli/-s_101
=== RUN TestCli/-s_0
=== RUN TestCli/-s_-10
=== RUN TestCli/-M_18935
=== RUN TestCli/-M_9999999999999999
=== RUN TestCli/-r=0
=== RUN TestCli/-r_0.1
=== RUN TestCli/--avoid_MyProcess1
=== RUN TestCli/--prefer_MyProcess2
=== RUN TestCli/--ignore-root-user
=== RUN TestCli/--sort-by-rss
=== RUN TestCli/-i
=== RUN TestCli/xyz
=== RUN TestCli/-i_1
=== RUN TestCli/-m_2,1
=== RUN TestCli/-m_1,2
=== RUN TestCli/-m_1,-1
=== RUN TestCli/-m_1000,-1000
=== RUN TestCli/-s_2,1
=== RUN TestCli/-s_1,2
=== RUN TestCli/-m_5,0
=== RUN TestCli/-m_5,9
=== RUN TestCli/-M_-1
=== RUN TestCli/-M_2147483648
=== RUN TestCli/-M_4294967296
=== RUN TestCli/-m_-1
=== RUN TestCli/-m_2147483648
=== RUN TestCli/-m_4294967296
=== RUN TestCli/-S_-1
=== RUN TestCli/-S_2147483648
=== RUN TestCli/-S_4294967296
=== RUN TestCli/-s_-1
=== RUN TestCli/-s_2147483648
=== RUN TestCli/-s_4294967296
=== RUN TestCli/-m_3.14
=== RUN TestCli/-m_7,3.14
=== RUN TestCli/-s_12.34
=== RUN TestCli/-m_10_-M_18935
=== RUN TestCli/-S_2047
=== RUN TestCli/-s_10_-S_2047
--- PASS: TestCli (0.58s)
--- PASS: TestCli/-h (0.00s)
--- PASS: TestCli/--help (0.00s)
--- PASS: TestCli/#00 (0.01s)
--- PASS: TestCli/-p (0.01s)
--- PASS: TestCli/-v (0.00s)
--- PASS: TestCli/-d (0.02s)
--- PASS: TestCli/-m_1 (0.01s)
--- PASS: TestCli/-m_0 (0.00s)
--- PASS: TestCli/-m_-10 (0.00s)
--- PASS: TestCli/-m_100 (0.00s)
--- PASS: TestCli/-s_2 (0.01s)
--- PASS: TestCli/-s_100 (0.01s)
--- PASS: TestCli/-s_101 (0.00s)
--- PASS: TestCli/-s_0 (0.00s)
--- PASS: TestCli/-s_-10 (0.00s)
--- PASS: TestCli/-M_18935 (0.01s)
--- PASS: TestCli/-M_9999999999999999 (0.00s)
--- PASS: TestCli/-r=0 (0.10s)
--- PASS: TestCli/-r_0.1 (0.01s)
--- PASS: TestCli/--avoid_MyProcess1 (0.01s)
--- PASS: TestCli/--prefer_MyProcess2 (0.01s)
--- PASS: TestCli/--ignore-root-user (0.01s)
--- PASS: TestCli/--sort-by-rss (0.01s)
--- PASS: TestCli/-i (0.01s)
--- PASS: TestCli/xyz (0.00s)
--- PASS: TestCli/-i_1 (0.00s)
--- PASS: TestCli/-m_2,1 (0.01s)
--- PASS: TestCli/-m_1,2 (0.01s)
--- PASS: TestCli/-m_1,-1 (0.00s)
--- PASS: TestCli/-m_1000,-1000 (0.00s)
--- PASS: TestCli/-s_2,1 (0.02s)
--- PASS: TestCli/-s_1,2 (0.03s)
--- PASS: TestCli/-m_5,0 (0.02s)
--- PASS: TestCli/-m_5,9 (0.04s)
--- PASS: TestCli/-M_-1 (0.01s)
--- PASS: TestCli/-M_2147483648 (0.00s)
--- PASS: TestCli/-M_4294967296 (0.00s)
--- PASS: TestCli/-m_-1 (0.00s)
--- PASS: TestCli/-m_2147483648 (0.01s)
--- PASS: TestCli/-m_4294967296 (0.00s)
--- PASS: TestCli/-S_-1 (0.00s)
--- PASS: TestCli/-S_2147483648 (0.01s)
--- PASS: TestCli/-S_4294967296 (0.00s)
--- PASS: TestCli/-s_-1 (0.00s)
--- PASS: TestCli/-s_2147483648 (0.00s)
--- PASS: TestCli/-s_4294967296 (0.00s)
--- PASS: TestCli/-m_3.14 (0.01s)
--- PASS: TestCli/-m_7,3.14 (0.02s)
--- PASS: TestCli/-s_12.34 (0.01s)
--- PASS: TestCli/-m_10_-M_18935 (0.01s)
--- PASS: TestCli/-S_2047 (0.01s)
--- PASS: TestCli/-s_10_-S_2047 (0.02s)
=== RUN TestRss
testsuite_cli_test.go:213: earlyoom RSS: 138 kiB
--- PASS: TestRss (0.02s)
=== RUN TestParseTuple
warning: SIGTERM value 5.00 is below SIGKILL value 9.00, setting SIGTERM = SIGKILL = 9.00
warning: SIGTERM value 0.00 is below SIGKILL value 5.00, setting SIGTERM = SIGKILL = 5.00
warning: SIGTERM value 4.00 is below SIGKILL value 5.00, setting SIGTERM = SIGKILL = 5.00
--- PASS: TestParseTuple (0.00s)
=== RUN TestIsAlive
is_alive: state=S num_threads=6
is_alive: state=S num_threads=1
--- PASS: TestIsAlive (0.00s)
=== RUN TestIsAliveMock
is_alive: state=R num_threads=1
is_alive: state=Z num_threads=1
is_alive: state=R num_threads=1
is_alive: state=R num_threads=1
is_alive: state=R num_threads=1
is_alive: state=R num_threads=1
is_alive: state=R num_threads=1
is_alive: state=R num_threads=1
is_alive: state=Z num_threads=2
--- PASS: TestIsAliveMock (0.00s)
=== RUN Test_fix_truncated_utf8
--- PASS: Test_fix_truncated_utf8 (0.00s)
=== RUN Test_get_oom_score
--- PASS: Test_get_oom_score (0.00s)
=== RUN Test_get_comm
testsuite_unit_test.go:173: process name "earlyoom.test"
--- PASS: Test_get_comm (0.00s)
=== RUN Test_get_cmdline
testsuite_unit_test.go:193: process cmdline "/tmp/go-build1434123673/b001/earlyoom.test -test.paniconexit0 -test.timeout=10m0s -test.v=true"
--- PASS: Test_get_cmdline (0.00s)
=== RUN Test_parse_proc_pid_stat_buf
--- PASS: Test_parse_proc_pid_stat_buf (0.00s)
=== RUN Test_parse_proc_pid_stat_1
--- PASS: Test_parse_proc_pid_stat_1 (0.00s)
=== RUN Test_parse_proc_pid_stat_Mock
--- PASS: Test_parse_proc_pid_stat_Mock (0.00s)
=== RUN Test_is_larger
testsuite_unit_test.go:312: procdir_path="/tmp/Test_is_larger3934139678"
--- PASS: Test_is_larger (0.00s)
=== RUN Test_is_larger_by_rss
testsuite_unit_test.go:331: procdir_path="/tmp/Test_is_larger_by_rss2181912672"
is_larger: pid 104 "": rss=0 but oom_score=102. Zombie main thread? Using oom_score for this process.
is_larger: pid 104 "": rss=0 but oom_score=102. Zombie main thread? Using oom_score for this process.
is_larger: pid 104 "": rss=0 but oom_score=102. Zombie main thread? Using oom_score for this process.
is_larger: pid 104 "": rss=0 but oom_score=102. Zombie main thread? Using oom_score for this process.
is_larger: pid 104 "": rss=0 but oom_score=102. Zombie main thread? Using oom_score for this process.
is_larger: pid 104 "": rss=0 but oom_score=102. Zombie main thread? Using oom_score for this process.
--- PASS: Test_is_larger_by_rss (0.01s)
PASS
ok github.com/rfjakob/earlyoom 0.629s
Cannot repro
I encountered the following error when I tested 1.8 1.8.1 1.8.2. Is it my environment problem? My environmental information is as follows: