Hey,
its me again, I noticed another problem, I'm not sure if the cause lies within libxbee, but I spent a couple of hours trying to solve it and I'm stuck now, so I thought I might as well ask.
When using connections with the noWaitForAck flag set (for example a broadcast connection, but also on individual connections) it occasionally happens that my application crashes with the above error message.
When I try to transmit larger/more packages the crasher occur sooner. (But still seemingly random)
According to my debugger the last function call is in line 114 of tx.c:
xsys_sem_post(&buf->sem);
after that a couple of futex internal calls happen.
The full call stack is:
#0 0x7ffff6b42418 __GI_raise(sig=sig@entry=6) (../sysdeps/unix/sysv/linux/raise.c:54)
#1 0x7ffff6b4401a __GI_abort() (abort.c:89)
#2 0x7ffff6b8472a __libc_message(do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff6c9baa9 "%s") (../sysdeps/posix/libc_fatal.c:175)
#3 0x7ffff6b8474e __GI___libc_fatal(message=message@entry=0x7ffff7789b40 "The futex facility returned an unexpected error code.") (../sysdeps/posix/libc_fatal.c:185)
#4 0x7ffff7786c8e futex_fatal_error() (../sysdeps/nptl/futex-internal.h:200)
#5 ?? futex_wake (private=<optimized out>, processes_to_wake=1, futex_word=<optimized out>) (../sysdeps/unix/sysv/linux/futex-internal.h:247)
#6 ?? __new_sem_post (sem=<optimized out>) (sem_post.c:57)
#7 0x7ffff79a0ceb xbee_tx(xbee=0x631180, restart=0x7ffff5901e7c, arg=0x6317f0) (tx.c:114)
#8 0x7ffff79a4fab threadFunc(thread=0x62f6d0) (thread.c:74)
#9 0x7ffff777e6fa start_thread(arg=0x7ffff5902700) (pthread_create.c:333)
#10 0x7ffff6c13b5d clone() (../sysdeps/unix/sysv/linux/x86_64/clone.S:109)
I don't really know how to proceed here, since it seems to be some kind of multithread issue. I would totally be ok if the package would just be lost, I just need it not to cause my program to crash.
Does anybody have an idea?
Best regards,
Jonas