Describe the bug
[exception]: Executing test client: permission denied was found during "make test"
To reproduce
Install Debian12 [amd64] then
- sudo apt update
- sudo apt install build-essential make automake
then follow by:
- git clone https://github.com/redis/redis.git
- cd redis
- make
- make test
Expected behavior
~/Testing/redis$ make test
Testing unit/networking
[ok]: MGET: mget shouldn't be propagated in Lua (100 ms)
[ok]: CONFIG SET oom-score-adj works as expected (86 ms)
[ok]: CONFIG SET oom-score-adj handles configuration failures (2 ms)
[ok]: CONFIG SET oom-score-adj-values doesn't touch proc when disabled (0 ms)
[ok]: HyperLogLog sparse encoding stress test (2890 ms)
[ok]: Corrupted sparse HyperLogLogs are detected: Additional at tail (2 ms)
[ok]: Corrupted sparse HyperLogLogs are detected: Broken magic (1 ms)
[ok]: Corrupted sparse HyperLogLogs are detected: Invalid encoding (1 ms)
[ok]: Corrupted dense HyperLogLogs are detected: Wrong length (1 ms)
[ok]: EXPIRE: We can call scripts rewriting client->argv from Lua (101 ms)
[exception]: Executing test client: permission denied.
permission denied
while executing
"close $fd"
(procedure "set_oom_score_adj" line 7)
invoked from within
"set_oom_score_adj 22"
("uplevel" body line 3)
invoked from within
"uplevel 1 $code"
(procedure "test" line 58)
invoked from within
"test {CONFIG SET oom score restored on disable} {
r config set oom-score-adj no
set_oom_score_adj 22
assert_equal ..."
("uplevel" body line 98)
invoked from within
"uplevel 1 $code "
(procedure "start_server" line 2)
invoked from within
"start_server {tags {"oom-score-adj external:skip"}} {
proc get_oom_score_adj {{pid ""}} {
if {$pid == ""} {
set pi..."
(file "tests/unit/oom-score-adj.tcl" line 5)
invoked from within
"source $path"
(procedure "execute_test_file" line 4)
invoked from within
"execute_test_file $data"
(procedure "test_client_main" line 10)
invoked from within
"test_client_main $::test_server_port "
Killing still running Redis server 4025
Killing still running Redis server 8072
Killing still running Redis server 8096
Killing still running Redis server 8199
Killing still running Redis server 8279
Killing still running Redis server 8316
Killing still running Redis server 12677
Killing still running Redis server 12866
Killing still running Redis server 12918
Killing still running Redis server 13084
Killing still running Redis server 13170
Killing still running Redis server 13205
Killing still running Redis server 13253
Killing still running Redis server 13291
I/O error reading reply
while executing
"$r set [expr rand()] [expr rand()]"
(procedure "gen_write_load" line 7)
invoked from within
"gen_write_load [lindex $argv 0] [lindex $argv 1] [lindex $argv 2] [lindex $argv 3]"
(file "tests/helpers/gen_write_load.tcl" line 18)
I/O error reading reply
while executing
"{*}$r type $k"
(procedure "createComplexDataset" line 49)
invoked from within
"createComplexDataset $r $ops"
(procedure "bg_complex_data" line 5)
invoked from within
"bg_complex_data [lindex $argv 0] [lindex $argv 1] [lindex $argv 2] [lindex $argv 3] [lindex $argv 4]"
(file "tests/helpers/bg_complex_data.tcl" line 13)
I/O error reading reply
while executing
"{*}$r randomkey"
(procedure "findKeyWithType" line 3)
invoked from within
"findKeyWithType {*}$r zset"
("uplevel" body line 2)
invoked from within
"uplevel 1 [lindex $args $path]"
(procedure "randpath" line 3)
invoked from within
"randpath {{*}$r zadd $k $d $v} {{*}$r zrem $k $v} {
set otherzset [findKeyWithType {*}$r zset]
..."
(procedure "createComplexDataset" line 74)
invoked from within
"createComplexDataset $r $ops"
(procedure "bg_complex_data" line 5)
invoked from within
"bg_complex_data [lindex $argv 0] [lindex $argv 1] [lindex $argv 2] [lindex $argv 3] [lindex $argv 4]"
(file "tests/helpers/bg_complex_data.tcl" line 13)
I/O error reading reply
while executing
"{*}$r type $k"
(procedure "createComplexDataset" line 49)
invoked from within
"createComplexDataset $r $ops"
(procedure "bg_complex_data" line 5)
invoked from within
"bg_complex_data [lindex $argv 0] [lindex $argv 1] [lindex $argv 2] [lindex $argv 3] [lindex $argv 4]"
(file "tests/helpers/bg_complex_data.tcl" line 13)
Killing still running Redis server 13356
Killing still running Redis server 13376
I/O error reading reply
while executing
"{*}$r type $k"
(procedure "createComplexDataset" line 49)
invoked from within
"createComplexDataset $r $ops"
(procedure "bg_complex_data" line 5)
invoked from within
"bg_complex_data [lindex $argv 0] [lindex $argv 1] [lindex $argv 2] [lindex $argv 3] [lindex $argv 4]"
(file "tests/helpers/bg_complex_data.tcl" line 13)
I/O error reading reply
while executing
"{*}$r type $k"
(procedure "createComplexDataset" line 33)
invoked from within
"createComplexDataset $r $ops"
(procedure "bg_complex_data" line 5)
invoked from within
"bg_complex_data [lindex $argv 0] [lindex $argv 1] [lindex $argv 2] [lindex $argv 3] [lindex $argv 4]"
(file "tests/helpers/bg_complex_data.tcl" line 13)
I/O error reading reply
while executing
"{*}$r type $k"
(procedure "findKeyWithType" line 7)
invoked from within
"findKeyWithType {*}$r zset"
("uplevel" body line 2)
invoked from within
"uplevel 1 [lindex $args $path]"
(procedure "randpath" line 3)
invoked from within
"randpath {{*}$r zadd $k $d $v} {{*}$r zrem $k $v} {
set otherzset [findKeyWithType {*}$r zset]
..."
(procedure "createComplexDataset" line 74)
invoked from within
"createComplexDataset $r $ops"
(procedure "bg_complex_data" line 5)
invoked from within
"bg_complex_data [lindex $argv 0] [lindex $argv 1] [lindex $argv 2] [lindex $argv 3] [lindex $argv 4]"
(file "tests/helpers/bg_complex_data.tcl" line 13)
Killing still running Redis server 13524
Killing still running Redis server 13558
Killing still running Redis server 13632
Killing still running Redis server 13639
Killing still running Redis server 13664
Killing still running Redis server 13747
Killing still running Redis server 13931
Killing still running Redis server 13976
Killing still running Redis server 13995
Killing still running Redis server 14021
make[1]: *** [Makefile:467: test] Error 1
make[1]: Leaving directory '/home/money/Testing/redis/src'
make: *** [Makefile:6: test] Error 2
Additional information
$ uname -a Linux debian12 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux
` $ sudo apt list --installed | grep tcl libtcl8.6/stable,now 8.6.13+dfsg-2 amd64 [installed,automatic] tcl8.6-dev/stable,now 8.6.13+dfsg-2 amd64 [installed,automatic] tcl8.6/stable,now 8.6.13+dfsg-2 amd64 [installed,automatic] tcl/stable,now 8.6.13 amd64 [installed,automatic]
`
Comment From: sundb
Another similar issue: #12662
Can you start a Redis instance and try echo 1000 > /proc/$(pgrep redis-server)/oom_score_adj to check the permission?
Comment From: slkbnt
Another similar issue: #12662 Can you start a Redis instance and try
echo 1000 > /proc/$(pgrep redis-server)/oom_score_adjto check the permission?
I have executed the command which stated by you and there were no permission issue
Comment From: sundb
this test also failed in my ubuntu 23.
the minimum oom_score_adj that the non-root user is allowed to set is 100, not 0.
@slkbnt could you help to run echo (22, 99, 100) > /proc/2260315/oom_score_adj to verify it again? thanks.
Comment From: slkbnt
echo (22, 99, 100) > /proc/2260315/oom_score_adj
@sundb
$ echo (22, 99, 100) > /proc/2260315/oom_score_adj bash: syntax error near unexpected token `22,'
Comment From: sundb
@slkbnt sorry for my misleading.
please use the flowing three:
echo 22 > /proc/$(pgrep redis-server)/oom_score_adj
echo 99 > /proc/$(pgrep redis-server)/oom_score_adj
echo 100 > /proc/$(pgrep redis-server)/oom_score_adj