Crash report
debian@beaglebone:~$ docker run redis Unable to find image 'redis:latest' locally latest: Pulling from library/redis 99c2a28b4a43: Pull complete e49d8abac2cf: Pull complete 035016c3fd20: Pull complete 77f3f1b60400: Pull complete b723fda1bb7c: Pull complete cc255c521622: Pull complete Digest: sha256:92b8b307ee28ed74da17578064c73307ad41e43f422f0b7e4e91498b406c59e3 Status: Downloaded newer image for redis:latest 1:C -14180 Jan 1970 -18:-12:-56.-1091086 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 1:C -14180 Jan 1970 -18:-12:-56.-1091086 # Redis version=7.0.10, bits=32, commit=00000000, modified=0, pid=1, just started 1:C -14180 Jan 1970 -18:-12:-56.-1091086 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf redis-server: monotonic.c:149: monotonicInit_posix: Assertion `rc == 0' failed.
=== REDIS BUG REPORT START: Cut & paste starting from here === 1:M -12627 Jan 1970 -8:-2:-24.6247 # Redis 7.0.10 crashed by signal: 6, si_code: -6 1:M -12627 Jan 1970 -8:-2:-24.6247 # Crashed running the instruction at: 0xb6b7e7e6
------ STACK TRACE ------ EIP: /lib/arm-linux-gnueabihf/libc.so.6(+0x177e6)[0xb6b7e7e6]
Backtrace: /lib/arm-linux-gnueabihf/libc.so.6(+0x27840)[0xb6b8e840] /lib/arm-linux-gnueabihf/libc.so.6(+0x177e6)[0xb6b7e7e6] /lib/arm-linux-gnueabihf/libc.so.6(gsignal+0x7b)[0xb6b8da20]
------ REGISTERS ------ 1:M -14215 Jan 1970 -20:-29:-48.000 # R10:00000000ffffffff R9 :000000000061ac68 R8 :000000000061ac4c R7 :00000000000000af R6 :0000000000000001 R5 :00000000bef75924 R4 :0000000000000000 R3 :0000000000000008 R2 :0000000000000000 R1 :00000000bef75924 R0 :0000000000000000 EC :0000000000000000 fp: 0000000000683ad8 ip:00000000000000af pc:00000000b6b7e7e6 sp:00000000bef75918 cpsr:0000000000010030 fault_address:0000000000000000
1:M -14215 Jan 1970 -20:-29:-48.000 # (bef75927) -> 005d1103 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef75926) -> b680c700 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef75925) -> 00000000 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef75924) -> 00000000 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef75923) -> b65b0000 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef75922) -> b6f75728 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef75921) -> b68007c0 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef75920) -> b6f75728 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef7591f) -> b68007c0 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef7591e) -> b68017c0 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef7591d) -> 00000000 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef7591c) -> 00000000 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef7591b) -> 00000000 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef7591a) -> bef759e3 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef75919) -> b6b8da21 1:M -14215 Jan 1970 -20:-29:-48.000 # (bef75918) -> 00000095
------ INFO OUTPUT ------ 1:M 01 Jan 1970 00:00:01.000 # Redis 7.0.10 crashed by signal: 11, si_code: 1 1:M 01 Jan 1970 00:00:01.000 # Accessing address: 0x10 1:M 01 Jan 1970 00:00:01.000 # Crashed running the instruction at: 0x594d20
------ STACK TRACE ------ EIP: redis-server(lua_gc+0x3)[0x594d20]
Backtrace: /lib/arm-linux-gnueabihf/libc.so.6(+0x27840)[0xb6b8e840]
------ REGISTERS ------ 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # R10:000000000003e488 R9 :00000000bef75378 R8 :0000000000000000 R7 :0000000000002710 R6 :0000000000000000 R5 :0000000000683ad8 R4 :0000000000000000 R3 :0000000000691f98 R2 :0000000000000000 R1 :0000000000000003 R0 :0000000000000000 EC :0000000000000005 fp: 00000000b6ad0c20 ip:00000000b6540304 pc:0000000000594d20 sp:00000000bef74f68 cpsr:00000000200f0030 fault_address:0000000000000010
1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f77) -> 005f685c 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f76) -> 005f41f8 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f75) -> 00000000 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f74) -> 00000000 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f73) -> 00684aa8 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f72) -> 00000000 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f71) -> 00000000 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f70) -> 00000000 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f6f) -> 00000000 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f6e) -> 00002710 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f6d) -> 004fc843 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f6c) -> 00691f98 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f6b) -> 0058950f 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f6a) -> 00683ad8 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f69) -> b6540005 1:M -14226 Jan 1970 -2:-55:-13.-1228526 # (bef74f68) -> 00691f98
------ INFO OUTPUT ------
Additional information
-
OS distribution : Debian Buster debian@beaglebone:~$ hostnamectl Static hostname: beaglebone Icon name: computer Machine ID: 2f66158e454f99f602ac1f6564396522 Boot ID: d1b85498cbe5465d943a4e9e848dda4f Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.94-ti-r42 Architecture: arm
-
Steps to reproduce
- Download and flash the latest Debian image for the Beaglebone Black from here
- Install Docker for Debian. Follow instructions from here
- Run "docker run redis"
Comment From: oranagra
looks like clock_gettime(CLOCK_MONOTONIC) fails.
@sounak-1989 sadly our code doesn't print errno, maybe you can modify the code or write a simple program that attempts to call clock_gettime(CLOCK_MONOTONIC)?
@JimB123 FYI in case you have any other advise.
Comment From: oranagra
maybe this hardware simply doesn't support monotonic clock, and if we are to support it we need to fallback to another clock?
Comment From: oranagra
I suppose this is a regression of redis 6.2 (using monotonic clock), so if we wanna fix it, we should have an automatic fallback to a non-monotonic clock (possibly with some warning print)
Comment From: sounak-1989
maybe this hardware simply doesn't support monotonic clock, and if we are to support it we need to fallback to another clock?
@oranagra An earlier version used to work. I explicitly don't run redis by itself. It is a part of EdgeX which is an open source edge computing IOT framework. I can't remember which version it was.
One more thing that I tested was it crashes only when run using Docker container. I tried running redis directly using the apt package manager following the instruction on Redis website. It did work on the same Hardware. Only when I try to run using Docker it crashes.
Comment From: oranagra
@sounak-1989 are you sure the version that worked outside docker is the same one? Specifically was it 6.2 or newer?
Comment From: sounak-1989
Yes I am sure. Using Docker I tried several versions: 6.2-alpine, 6.2.6 and latest (which is 7+ I think). All of them crashed. Without docker I used apt package manager without specifying any specific version, so I guess it pulled the latest.
Comment From: sounak-1989
I can try an older version of Docker and try to pull Redis using that. I saw Docker made a few updates recently and I am wondering if that is making Redis to crash.
Comment From: oranagra
i'm guessing that 6.0 will work for you in docker since it doesn't use that monotonic clock that seems to cause the issue.
but if indeed 7.0 works outside docker, then the problem might be with docker, and in order to figure out what it is, you'll need to either add some errno log print to redis, or a simple standalone application that uses clock_gettime to get to the bottom of it.
Comment From: sounak-1989
@oranagra Thanks for the suggestion. I am not too familiar with the Redis code. So I will first try with Redis 6.0 and then an older version of Docker. That will help me narrow down the problem. I'll keep you posted. Thanks.
Comment From: yossigo
@sounak-1989 Please also try to run docker with --security-opt seccomp=unconfined, this could be related to a known issue with seccomp (the link provided is related to alpine, but IIRC the problem can affect other images as well).