Can folks confirm this bug?
- Load up the most recent build on a BP6
- connect to the terminal
- run the help command
?
My devices are locking up when sending data to the queue. Worse, the state of the queue makes it seem like this should not be an infinite loop…
queue.c @ line 70: if (((q->wptr + 1) & (q->element_count - 1)) != q->rptr) { /* add data and exit function */ }
Dumping the queue data structure, wptr == rptr
… so this should be entering the if
block. However, it does not.
GDB dump...
(gdb) bt
#0 queue_add_internal (block=true, data=0x20081e27 "6\034\037\b \335#", q=0x2003d4b8 <tx_fifo>) at /src/bp5/src/queue.c:70
#1 queue2_add_blocking (q=0x2003d4b8 <tx_fifo>, data=0x20081e27 "6\034\037\b \335#") at /src/bp5/src/queue.c:162
#2 0x1000168e in _putchar (character=<optimized out>) at /src/bp5/src/printf-4.0.0/printf.c:126
#3 _out_char (buffer=<optimized out>, idx=<optimized out>, maxlen=<optimized out>, character=<optimized out>) at /src/bp5/src/printf-4.0.0/printf.c:162
#4 _out_char (character=<optimized out>, buffer=<optimized out>, idx=<optimized out>, maxlen=<optimized out>) at /src/bp5/src/printf-4.0.0/printf.c:158
#5 0x100023dc in _vsnprintf (out=<optimized out>, out@entry=0x10001679 <_out_char>, buffer=0x20081ec8 "", buffer@entry=0x20081ea8 "A", maxlen=maxlen@entry=4294967295,
format=0x1005f866 "s%s\r\n", format@entry=0x1005f9dc "\033[38;2;191;165;48m", va=..., va@entry=...) at /src/bp5/src/printf-4.0.0/printf.c:819
#6 0x1000285c in printf_ (format=0x1005f85c "%s%s%s\t%s%s%s\r\n") at /src/bp5/src/printf-4.0.0/printf.c:876
#7 0x10022fe8 in ui_help_options (help=help@entry=0x10093a94 <global_commands>, count=count@entry=65) at /src/bp5/src/ui/ui_help.c:35
#8 0x10007a18 in help_global () at /src/bp5/src/commands/global/h_help.c:175
#9 help_handler (res=<optimized out>) at /src/bp5/src/commands/global/h_help.c:204
#10 0x10021258 in ui_process_commands () at /src/bp5/src/ui/ui_process.c:146
#11 0x10000f52 in core0_infinite_loop () at /src/bp5/src/pirate.c:600
#12 main () at /src/bp5/src/pirate.c:676
(gdb) print -pretty on -- *q
$3 = {
core = {
spin_lock = 0x0
},
data = 0x20028800 <tx_buf> "89mo\033[0m\t\033[38;2;191;165;48mChoose how numbers are displayed\033[0m\r\n\033[38;2;150;203;89ml/L\033[0m\t\033[38;2;191;165;48mBitorder (msb/LSB)\033[0m\r\n\033[38;2;150;203;89mcls\033[0m\t\033[38;2;191;165;48mClear and reset the ter"...,
wptr = 915,
rptr = 915,
element_count = 1024
}