damus-io / nostrdb

The unfairly fast embedded nostr database backed by lmdb
Other
87 stars 15 forks source link

arm64: bench-many-ingest fails #13

Open IngwiePhoenix opened 11 months ago

IngwiePhoenix commented 11 months ago

This is the full output I get from GDB:

root@FriendlyWrt /u/o/nostrdb (master)# ./bench-ingest-many
fish: Job 1, './bench-ingest-many' terminated by signal SIGSEGV (Address boundary error)
root@FriendlyWrt /u/o/nostrdb (master) [SIGSEGV]# gdb ./bench-ingest-many
GNU gdb (GDB) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-openwrt-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./bench-ingest-many...
(gdb) r
Starting program: /usb/opt/nostrdb/bench-ingest-many
[New LWP 31045]
[New LWP 31046]
[New LWP 31047]

Thread 2 "bench-ingest-ma" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 31045]
prot_queue_pop_all (q=0xfffff7ffff68, q@entry=0xfffffffff1c0, dest=dest@entry=0xffff785c7a00, max_items=4096) at /usb/opt/nostrdb/protected_queue.h:186
186             pthread_mutex_lock(&q->mutex);
(gdb) bt
#0  prot_queue_pop_all (q=0xfffff7ffff68, q@entry=0xfffffffff1c0, dest=dest@entry=0xffff785c7a00, max_items=4096) at /usb/opt/nostrdb/protected_queue.h:186
#1  0x0000000000404778 in ndb_writer_thread (data=0xfffff7ffff48) at nostrdb.c:569
#2  0x0000fffff7f9f124 in ?? () from /lib/ld-musl-aarch64.so.1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) q

I built with "make", then "make bench-ingest-many" to build the binary, from a fully fresh and just-pulled (git rev-parse HEAD: 1b389a869f8836af4cf80f5fe4c884817dfe47c3) repo.

I am on OpenWrt, ARM64 (RK3588).

Is there something I can do to further dig into this?

Thanks!

jb55 commented 11 months ago

On Fri, Aug 18, 2023 at 07:33:20AM -0700, Ingwie Phoenix wrote:

This is the full output I get from GDB: I built with "make", then "make bench-ingest-many" to build the binary, from a fully fresh and just-pulled (git rev-parse HEAD: 1b389a869f8836af4cf80f5fe4c884817dfe47c3) repo.

I am on OpenWrt, ARM64 (RK3588).

Is there something I can do to further dig into this?

not sure, this codebase is very new and uses lots of untested components. I haven't run into this one.