AsamK / signal-cli

signal-cli provides an unofficial commandline, JSON-RPC and dbus interface for the Signal messenger.
GNU General Public License v3.0
3.22k stars 306 forks source link

Segfault detected, aborting process - aarch64 - Raspberry Pi 3 Model B Rev 1.2 #1557

Closed RolandFelnhofer closed 3 months ago

RolandFelnhofer commented 3 months ago

signal-cli-native terminates on any command with a segfault

Model           : Raspberry Pi 3 Model B Rev 1.2

Linux server 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
ACCOUNT='+43xxxxxxxx62'
prompt # /usr/bin/signal-cli --config /etc/signal-cli --verbose --output json -a ${ACCOUNT} getUserStatus ${ACCOUNT}
2024-07-23T17:06:42.000+0200 [main] DEBUG org.asamk.signal.util.IOUtils - XDG_RUNTIME_DIR not set, falling back to temp dir
2024-07-23T17:06:42.007+0200 [main] DEBUG org.asamk.signal.App - Starting signal-cli 0.13.4
2024-07-23T17:06:42.174+0200 [main] INFO  LibSignal - [libsignal]: rust/bridge/jni/src/logging.rs:161: Initializing libsignal version:0.47.0
2024-07-23T17:06:42.193+0200 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2024-07-23T17:06:42.740+0200 [main] INFO  com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.sqlite.jdbc4.JDBC4Connection@114cc15d
2024-07-23T17:06:42.741+0200 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2024-07-23T17:06:44.738+0200 [main] DEBUG o.a.s.manager.internal.JobExecutor - Running RefreshRecipientsJob job
2024-07-23T17:06:44.744+0200 [pool-5-thread-1] INFO  LibSignal - [libsignal]: rust/bridge/shared/src/net.rs:86: Initializing connection manager for Prod...
2024-07-23T17:06:44.853+0200 [main] WARN  LibSignal - [PhoneNumberFormatter]: Got local CC: AT

[ [ SegfaultHandler caught a segfault in thread 0x0000007f640031c0 ] ]
siginfo: si_signo: 11, si_code: 1, si_addr: 0x0000000000000000

General purpose register values:
  R0  0x0000000000000108 is an unknown value
  R1  0x0000000000000008 is an unknown value
  R2  0x0000007f64002938 is an unknown value
  R3  0x0000007f943ec1b8 is an unknown value
  R4  0x0000007f943ebe18 is an unknown value
  R5  0x0000007f64003198 is an unknown value
  R6  0x0000000000000000
  R7  0x0000007f64002990 is an unknown value
  R8  0x0000000000000001 is an unknown value
  R9  0x0000000000000000
  R10 0x00000000000001bb is an unknown value
  R11 0x0000000000000000
  R12 0x0000000000000000
  R13 0x0000000000000003 is an unknown value
  R14 0x0000000000000000
  R15 0x0000000000000000
  R16 0x0000000000000002 is an unknown value
  R17 0x0000000000000000
  R18 0x0000000000000000
  R19 0x0000007f943ebe60 is an unknown value
  R20 0x0000000000000002 is an unknown value
  R21 0x0000007f943ebd10 is an unknown value
  R22 0x0000007f64002930 is an unknown value
  R23 0x0000007f64002980 is an unknown value
  R24 0x0000007fa78c8390 is an unknown value
  R25 0x0000007f64002914 is an unknown value
  R26 0x0000007f64002914 is an unknown value
  R27 0x0000007fa78c839c is an unknown value
  R28 0x0000007f64002840 is an unknown value
  R29 0x0000007f64002830 is an unknown value
  R30 0x0000007fa78d9f84 is an unknown value
  SP  0x0000007f943ebc40 is an unknown value
  PC  0x0000007fa78da014 is an unknown value

Printing instructions (ip=0x0000007fa78da014):
  0x0000007fa78d9f14: 0x21 0x00 0x41 0xad 0xf3 0x03 0x00 0xaa 0xf5 0x43 0x03 0x91 0x23 0x08 0x43 0xad
  0x0000007fa78d9f24: 0xe1 0x03 0x01 0xad 0x20 0x04 0x42 0xad 0xe3 0x0b 0x03 0xad 0x23 0x08 0x45 0xad
  0x0000007fa78d9f34: 0xe0 0x07 0x02 0xad 0x20 0x04 0x44 0xad 0xe3 0x0b 0x05 0xad 0xe0 0x07 0x04 0xad
  0x0000007fa78d9f44: 0x28 0x60 0x40 0xf9 0x20 0x08 0x40 0xad 0xe8 0x63 0x00 0xf9 0x16 0x00 0x40 0xf9
  0x0000007fa78d9f54: 0xe0 0x0b 0x00 0xad 0xd7 0x0a 0x40 0xf9 0x02 0x00 0x00 0x14 0xdf 0x3f 0x03 0xd5
  0x0000007fa78d9f64: 0xd4 0x06 0x40 0xf9 0x9f 0x06 0x00 0xb1 0xa0 0xff 0xff 0x54 0xb4 0x0a 0xf8 0xb7
  0x0000007fa78d9f74: 0x81 0x06 0x00 0x91 0xc2 0x22 0x00 0x91 0xe0 0x03 0x14 0xaa 0xdc 0xbe 0x0a 0x94
  0x0000007fa78d9f84: 0x1f 0x00 0x14 0xeb 0xf4 0x03 0x00 0xaa 0xe1 0xfe 0xff 0x54 0xe0 0x87 0x44 0xad
  0x0000007fa78d9f94: 0xe9 0x42 0x00 0x91 0xf6 0x73 0x00 0xf9 0xff 0xff 0x1b 0xa9 0x00 0x21 0x80 0x52
  0x0000007fa78d9fa4: 0xff 0xe7 0x00 0xf9 0x01 0x01 0x80 0x52 0xa0 0x82 0x8a 0x3c 0xe2 0x2f 0xc0 0x3d
  0x0000007fa78d9fb4: 0xa1 0x82 0x8b 0x3c 0xe0 0x87 0x42 0xad 0xa2 0x82 0x8c 0x3c 0xa0 0x82 0x86 0x3c
  0x0000007fa78d9fc4: 0xe2 0x8f 0x43 0xad 0xa1 0x82 0x87 0x3c 0xa2 0x82 0x88 0x3c 0xe0 0x87 0x40 0xad
  0x0000007fa78d9fd4: 0xa3 0x82 0x89 0x3c 0xa0 0x82 0x82 0x3c 0xe2 0x93 0x41 0xad 0xa1 0x82 0x83 0x3c
  0x0000007fa78d9fe4: 0xa2 0x82 0x84 0x3c 0xe8 0x63 0x40 0xf9 0xa4 0x82 0x85 0x3c 0xe3 0x03 0xc0 0x3d
  0x0000007fa78d9ff4: 0xe8 0xa7 0x1a 0xa9 0x28 0x00 0x80 0x52 0x09 0x29 0x00 0xb0 0xa3 0x82 0x81 0x3c
  0x0000007fa78da004: 0x00 0x0d 0x08 0x4e 0x29 0x45 0x47 0xf9 0xe8 0xa3 0x03 0x79 0xe0 0x37 0x80 0x3d
> 0x0000007fa78da014: 0x3f 0x01 0x40 0x39 0x20 0xdf 0xf5 0x97 0x80 0x05 0x00 0xb4 0xe1 0x43 0x03 0x91
  0x0000007fa78da024: 0x02 0x21 0x80 0x52 0xf4 0x03 0x00 0xaa 0xd9 0xe8 0xf4 0x97 0x95 0x42 0x00 0x91
  0x0000007fa78da034: 0x61 0x22 0x00 0x91 0xe0 0x03 0x15 0xaa 0x7f 0x42 0x00 0x39 0x18 0xbf 0x0a 0x94
  0x0000007fa78da044: 0xe0 0x01 0x00 0xb4 0x68 0x02 0x40 0xf9 0x08 0x09 0x40 0xf9 0x08 0x41 0x00 0x91
  0x0000007fa78da054: 0x09 0x40 0x03 0x91 0x29 0xfd 0xdf 0xc8 0x1f 0x01 0x09 0xeb 0xa0 0xff 0xff 0x54
  0x0000007fa78da064: 0x08 0x70 0x40 0xf9 0x89 0x82 0x03 0x91 0x08 0x05 0x00 0x91 0x88 0x7a 0x00 0xf9
  0x0000007fa78da074: 0x20 0xfd 0x9f 0xc8 0x15 0x6c 0x00 0xf9 0x05 0x00 0x00 0x14 0x28 0x00 0x80 0x52
  0x0000007fa78da084: 0x89 0x82 0x03 0x91 0x88 0x7a 0x00 0xf9 0x3f 0xfd 0x9f 0xc8 0x68 0x02 0x40 0xf9
  0x0000007fa78da094: 0xe0 0x03 0x15 0xaa 0x9f 0x7e 0x00 0xf9 0x01 0xc1 0x00 0x91 0x00 0xbf 0x0a 0x94
  0x0000007fa78da0a4: 0x08 0xa0 0x03 0x91 0x15
  0x [ [ SegfaultHandler caught a segfault in thread fd 0x00x9f000 0x007f70002ec0c8 ] ]
0xff   siginfo: si_signo: 0x8311, si_code:  10x0, si_addr: 0x70 0x00910 0x00f4 000x04f0 00x0430 000x0a9

    0x0
00  00Error: printFatalError already in progress by another thread.
0 7fa78da0b4 :
   0xf6 0x57 0x42 0xa9 0xfe 0x5f 0x41 0xa9 0xfd 0x07 0x44 0xf8 0xc0 0x03 0x5f 0xd6
  0x0000007fa78da0c4: 0x71 0x3c 0xf5 0x97 0x04 0x00 0x00 0x14 0x00 0x01 0x80 0x52 0x01 0x21 0x80 0x52
  0x0000007fa78da0d4: 0x3a 0x6d 0xf5 0x97 0x20 0x00 0x20 0xd4 0xf3 0x03 0x00 0xaa 0xe0 0x43 0x03 0x91
  0x0000007fa78da0e4: 0x42 0x06 0x00 0x94 0x05 0x00 0x00 0x14 0x05 0x6e 0xf5 0x97 0xf3 0x03 0x00 0xaa
  0x0000007fa78da0f4: 0xe0 0x03 0x00 0x91 0xff 0x05 0x00 0x94 0xe0 0x03 0x13 0xaa 0xe8 0xe8 0xf4 0x97
  0x0000007fa78da104: 0xff 0x6d 0xf5 0x97 0xfd 0x7b 0xba 0xa9 0xfc 0x6f 0x01 0xa9 0xfa 0x67 0x02 0xa9

Top of stack (sp=0x0000007f943ebc40):
  0x0000007f943ebc20: 0x0000007f943ebe60 0x0000000000000001 0x0000007f64002830 0x0000007fa78d9f84
> 0x0000007f943ebc40: 0x0000000000000000 0x000000000bebc200 0x00c22d7a280001bb 0x0000000000000000
  0x0000007f943ebc60: 0x0000000300000000 0x0000000000000000 0x0000000000000001 0x0000007fa7900138
  0x0000007f943ebc80: 0x0000007f7400a170 0x0000007f943fc8c0 0x0000007f943ec280 0x000000000000000f
  0x0000007f943ebca0: 0x0000007f64002910 0x000000000000000f 0x0000007f7400a660 0x0000007f7400a170
  0x0000007f943ebcc0: 0x0000007f640026a0 0x0000000000000000 0x0000000000000000 0x0000000000000000
  0x0000007f943ebce0: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
  0x0000007f943ebd00: 0x0000000000000000 0x0000000000000000 0x0000000000000001 0x0000000000000001
  0x0000007f943ebd20: 0x0000007f64002930 0x0000000000000000 0x000000000bebc200 0x00c22d7a280001bb
  0x0000007f943ebd40: 0x0000000000000000 0x0000000300000000 0x0000000000000000 0x0000000000000001
  0x0000007f943ebd60: 0x0000007fa7900138 0x0000007f7400a170 0x0000007f943fc8c0 0x0000007f943ec280
  0x0000007f943ebd80: 0x000000000000000f 0x0000007f64002910 0x000000000000000f 0x0000007f7400a660
  0x0000007f943ebda0: 0x0000007f7400a170 0x0000007f640026a0 0x0000000000000000 0x0000000000000000
  0x0000007f943ebdc0: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000
  0x0000007f943ebde0: 0x0000000000000000 0x0000000000000000 0x0000007f64002990 0x0000000000000000
  0x0000007f943ebe00: 0x0000000000000000 0x0000000000000000 0x0000000000000001 0x0000007f64002910
  0x0000007f943ebe20: 0x0000007f64002830 0x0000007f7400a660 0x0000007fa78d0328 0x0000007f943ec1b9

The failing thread 0x0000007f640031c0 does not have a full set of VM thread locals as it is an unattached thread.

Java frame anchors for the failing thread 0x0000007f640031c0:
  No anchors

Stacktrace for the failing thread 0x0000007f640031c0 (A=AOT compiled, J=JIT compiled, D=deoptimized, i=inlined):
  SP 0x0000007f943ebc40 IP 0x0000007fa78da014  IP is not within Java code. Aborting stack trace printing.

  Starting the stack walk in a possible caller:
  A  SP 0x0000007f943ec398 IP 0x0000000000640029 size=240   com.fasterxml.jackson.databind.deser.std.MapDeserializer._deserializeUsingCreator(MapDeserializer.java)
  SP 0x0000007f943ec488 IP 0x0000007f64002578  IP is not within Java code. Aborting stack trace printing.

Threads:
  0x0000007f74000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "pool-5-thread-1" - 0x0000007f9533c8f8, stack(0x0000007f94b01000,0x0000007f95300000)
  0x0000007f80000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "OkHttp TaskRunner" - 0x0000007fa4000fe0, daemon, stack(0x0000007f95e01000,0x0000007f96600000)
  0x0000007f7c000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "OkHttp TaskRunner" - 0x0000007f96700a50, daemon, stack(0x0000007f95600000,0x0000007f95dff000)
  0x0000007f88000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Okio Watchdog" - 0x0000007fa4a6f480, daemon, stack(0x0000007f967ff000,0x0000007f96ffe000)
  0x0000007f84000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "OkHttp TaskRunner" - 0x0000007fa4100a88, daemon, stack(0x0000007f97000000,0x0000007f977ff000)
  0x0000007f8c000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "OkHttp TaskRunner" - 0x0000007fa4a67930, daemon, stack(0x0000007f97801000,0x0000007f98000000)
  0x0000007f90000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "OkHttp chat.signal.org" - 0x0000007fa4a64ae8, daemon, stack(0x0000007fa4201000,0x0000007fa4a00000)
  0x0000007f9c000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "RxCachedWorkerPoolEvictor-1" - 0x0000007fa5f01fa0, daemon, stack(0x0000007fa5701000,0x0000007fa5f00000)
  0x0000007f98000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "RxSchedulerPurge-1" - 0x0000007fa7362388, daemon, stack(0x0000007fa6101000,0x0000007fa6900000)
  0x0000007fa0000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "HikariPool-1 housekeeper" - 0x0000007fa734d748, daemon, stack(0x0000007fa69e9000,0x0000007fa71e8000)
  0x0000007fac000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "process reaper" - 0x0000007fb4686e08, daemon, stack(0x0000007fbec09000,0x0000007fbec36000)
  0x0000007fa8000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Signal Dispatcher" - 0x0000007fb649bbd0, daemon, stack(0x0000007fb5381000,0x0000007fb5b80000)
  0x0000007fb0000b80 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "Reference Handler" - 0x0000007fb7abc848, daemon, stack(0x0000007fb5c81000,0x0000007fb6480000)
  0x000000001919b8c0 STATUS_IN_NATIVE (ALLOW_SAFEPOINT) "main" - 0x0000007fb7abc780, stack(0x0000007ffdaf3000,0x0000007ffe2f2000)

No VMOperation in progress

The 30 most recent VM operation status changes:

VM mutexes:
  mutex "RealLog.backTracePrinterMutex" is unlocked.
  mutex "mainVMOperationControlWorkQueue" is unlocked.
  mutex "referencePendingList" is unlocked.
  mutex "thread" is unlocked.

General information:
  VM version: 21.0.2+13, linux/aarch64
  Current timestamp: 1721747205155
  VM uptime: 3.349s
  AOT compiled code: 0x0000000000407000 - 0x0000000002d5a41f
  CPU features used for AOT compiled code: FP, ASIMD

Command line: '--config' '/etc/signal-cli' '--verbose' '--output' 'json' '-a' '+43xxxxxxxx62' 'getUserStatus' '+43xxxxxxxx62'

Heap settings and statistics:
  Supports isolates: true
  Heap base: 0x0000007fb6580000
  Object reference size: 8
  Aligned chunk size: 524288
  Large array threshold: 131072
  Incremental collections: 0
  Complete collections: 0

Heap usage:
  Eden: 24.50M (0.00M in 0 aligned chunks, 0.00M in 0 unaligned chunks)
  Old: 0.00M (0.00M in 0 aligned chunks, 0.00M in 0 unaligned chunks)

Native image heap boundaries:
  ReadOnly Primitives: 0x0000007fb6600830 - 0x0000007fb6e6af08
  ReadOnly References: 0x0000007fb6e6af08 - 0x0000007fb73d0c28
  ReadOnly Relocatables: 0x0000007fb73d1000 - 0x0000007fb779c680
  Writable Primitives: 0x0000007fb779d000 - 0x0000007fb7924a80
  Writable References: 0x0000007fb7924a80 - 0x0000007fb8199168
  Writable Huge: 0x0000007fb8200038 - 0x0000007fb836f5b0
  ReadOnly Huge: 0x0000007fb8370038 - 0x0000007fbebcf8e0

Heap chunks: E=eden, S=survivor, O=old, F=free; A=aligned chunk, U=unaligned chunk; T=to space

Segfault detected, aborting process. Use '-XX:-InstallSegfaultHandler' to disable the segfault handler at run time and create a core dump instead. Rebuild with '-R:-InstallSegfaultHandler' to disable the handler permanently at build time.

Any idea what the problem could be or how to narrow it down?

I'm using the binary from: deb https://packaging.gitlab.io/signal-cli signalcli main

RolandFelnhofer commented 3 months ago

After updating to signal-cli binary version 0.13.5 (signal-cli-native_0.13.5+1_arm64.deb) no segfault so far detected anymore!