I don’t know if anyone else has encountered this problem(unstable branch): running the test with SANITIZER will fail every time, and success without the SANITIZER.

Crash report

Paste the complete crash log between the quotes below. Please include a few lines from the log preceding the crash report to provide some context.

[ok]: Slave is able to evict keys created in writable slaves
[exception]: Executing test client: I/O error reading reply.
I/O error reading reply
    while executing
"[srv $level "client"] {*}$args"
    (procedure "r" line 7)
    invoked from within
"r xrevrange mystream + -"
    invoked from within
"expr {[r xrange mystream - +] == [lreverse [r xrevrange mystream + -]]}"
    ("uplevel" body line 1)
    invoked from within
"uplevel 1 [list expr $condition]"
    (procedure "assert" line 2)
    invoked from within
"assert {[r xrange mystream - +] == [lreverse [r xrevrange mystream + -]]}"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $code"
    (procedure "test" line 48)
    invoked from within
"test {XREVRANGE returns the reverse of XRANGE} {
        assert {[r xrange mystream - +] == [lreverse [r xrevrange mystream + -]]}
    }"
    ("uplevel" body line 186)
    invoked from within
"uplevel 1 $code "
    (procedure "start_server" line 3)
    invoked from within
"start_server {
    tags {"stream"}
} {
    test {XADD can add entries into a stream that XRANGE can fetch} {
        r XADD mystream * item 1 value a
..."
    (file "tests/unit/type/stream.tcl" line 52)
    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 43805
Killing still running Redis server 43823
Killing still running Redis server 43828
Killing still running Redis server 44074
Killing still running Redis server 44198
Killing still running Redis server 44367
Killing still running Redis server 44447
Killing still running Redis server 44869
Killing still running Redis server 44882
Killing still running Redis server 45027
Killing still running Redis server 45040
Killing still running Redis server 45434
Killing still running Redis server 45480
Killing still running Redis server 45485
Killing still running Redis server 45527
Killing still running Redis server 45533
Killing still running Redis server 45589
Killing still running Redis server 45668
Killing still running Redis server 45714
Killing still running Redis server 45842
Killing still running Redis server 45942
Killing still running Redis server 45994
Killing still running Redis server 46036
Killing still running Redis server 46460
Killing still running Redis server 46485
Killing still running Redis server 46519
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)
I/O error reading reply
    while executing
"{*}$r del $k"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 [lindex $args $path]"
    (procedure "randpath" line 3)
    invoked from within
"randpath {
                {*}$r set $k $v
            } {
                {*}$r lpush $k $v
            } {
                {*}$r sadd $k $v
        ..."
    (procedure "createComplexDataset" line 36)
    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 46530

Additional information

  1. OS distribution and version: Linux 5.4.0-90-generic Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

  2. gcc version
    gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

  3. Steps to reproduce (if any)
    make SANITIZER=address -j ./runtest --verbose --tags -slow --dump-logs

Comment From: oranagra

it doesn't reproduce for me (any issue with unit/type/stream), and also not in github actions. please make sure you have a clean build (run make distclean before). if you can still reproduce it, please look into it and either post more info or a PR to fix it.

p.s. i do however see issues with integration/failover:

*** [err]: failover command to specific replica works in tests/integration/failover.tcl
Expected '3' to be equal to '2' (context: type eval line 38 cmd {assert_equal [expr [s -1 sync_partial_ok] - $initial_psyncs] 2} proc ::test)

and integration/logging:

==26745==The signal is caused by a WRITE memory access.
    #0 0x5599ddfd850e in debugCommand /home/oran/work/redis/src/debug.c:493

@tezc FYI.

Comment From: tezc

ozan@ozan-x1:~/Desktop/redis/src$ grep DESC /etc/lsb-release; gcc-9 --version
DISTRIB_DESCRIPTION="Ubuntu 21.04"
gcc-9 (Ubuntu 9.3.0-23ubuntu2) 9.3.0


This is my setup and running same command with you: ./runtest --verbose --tags -slow --dump-logs, I don't see any issues. Please make sure you run make distclean as suggested, let us know if it helps.

Comment From: chenyang8094

Yes, I did not reproduce it when I ran it just now. Then I looked at dmesg and found that there are OOM logs. It should be that other processes consumed a lot of memory during the previous run.

This is not a crash, I will close this issue, thanks for your reply.