masayuki2009 commented on pull request #5590: URL: https://github.com/apache/incubator-nuttx/pull/5590#issuecomment-1049383613
@GUIDINGLI
I found a new issue with sabre-6quad:netknsh which is not merged to the
upstream.
Actually, if I run the `getprime` command, `DEBUGASSERT` happens when it
exits.
The call stack is
```
(gdb) where
#0 up_assert (filename=0x10856468 "semaphore/sem_wait.c", lineno=80) at
common/arm_assert.c:478
#1 0x1080d38c in _assert (filename=0x10856468 "semaphore/sem_wait.c",
linenum=80) at assert/lib_assert.c:36
#2 0x10804354 in nxsem_wait (sem=0x1085ab34 <g_putc_lock>) at
semaphore/sem_wait.c:80
#3 0x10800e30 in up_putc (ch=91) at chip/imx_serial.c:1135
#4 0x10849344 in syslog_default_putc (channel=0x1085ac20
<g_default_channel>, ch=91) at syslog/syslog_channel.c:177
#5 0x10848f70 in syslog_putc (ch=91) at syslog/syslog_putc.c:93
#6 0x10848e18 in syslogstream_putc (this=0x1086b9f4, ch=91) at
syslog/syslog_stream.c:157
#7 0x1080f780 in vsprintf_internal (stream=0x1086b9f4, arglist=0x0,
numargs=0, fmt=0x1085a101 "%5jd.%06ld] ", ap=...) at
stdio/lib_libvsprintf.c:236
#8 0x10810da8 in lib_vsprintf (stream=0x1086b9f4, fmt=0x1085a100
"[%5jd.%06ld] ", ap=...) at stdio/lib_libvsprintf.c:1373
#9 0x1084a590 in lib_sprintf (obj=0x1086b9f4, fmt=0x1085a100 "[%5jd.%06ld]
") at stdio/lib_libsprintf.c:45
#10 0x10848db8 in nx_vsyslog (priority=6, fmt=0x108577ac "%s: tcb=%p\n",
ap=0x1086ba24) at syslog/vsyslog.c:136
#11 0x10813500 in vsyslog (priority=6, fmt=0x108577ac "%s: tcb=%p\n",
ap=...) at syslog/lib_syslog.c:68
#12 0x10813538 in syslog (priority=6, fmt=0x108577ac "%s: tcb=%p\n") at
syslog/lib_syslog.c:100
#13 0x10819b40 in up_addrenv_kstackfree (tcb=0x10865c40) at
armv7-a/arm_addrenv_kstack.c:167
#14 0x108073e4 in nxsched_release_tcb (tcb=0x10865c40, ttype=1 '\001') at
sched/sched_releasetcb.c:159
#15 0x10846cfc in nxtask_terminate (pid=6, nonblocking=1 '\001') at
task/task_terminate.c:184
#16 0x108465fc in nxtask_exit () at task/task_exit.c:168
#17 0x10816cd8 in up_exit (status=0) at common/arm_exit.c:125
#18 0x10805ffc in _exit (status=0) at task/exit.c:56
#19 0x10842384 in nx_pthread_exit (exit_value=0x0) at
pthread/pthread_exit.c:112
#20 0x1080bec0 in STUB_nx_pthread_exit (nbr=107, parm1=0) at
stubs/STUB_nx_pthread_exit.c:11
#21 0x10801f4c in dispatch_syscall () at armv7-a/arm_syscall.c:86
```
And
```
(gdb) up
#1 0x1080d38c in _assert (filename=0x10856468 "semaphore/sem_wait.c",
linenum=80) at assert/lib_assert.c:36
36 up_assert(filename, linenum);
(gdb) up
#2 0x10804354 in nxsem_wait (sem=0x1085ab3c <g_putc_lock>) at
semaphore/sem_wait.c:80
80 DEBUGASSERT(!OSINIT_IDLELOOP() || !sched_idletask());
(gdb) p *rtcb
$1 = {flink = 0x0, blink = 0x0, group = 0x10862b10, pid = 0, sched_priority
= 0 '\000', init_priority = 0 '\000', start = 0x1080336c <nx_start>, entry =
{pthread = 0x1080336c <nx_start>, main = 0x1080336c <nx_start>}, task_state = 2
'\002', flags = 6, lockcount = 1, errcode = 0, timeslice = 0, waitdog = {next =
0x0, func = 0x0, lag = 0, arg = 0}, adj_stack_size = 2024, stack_alloc_ptr =
0x1086115c, stack_base_ptr = 0x10861174, waitsem = 0x0, sigprocmask = 0,
sigwaitmask = 0, sigpendactionq = {head = 0x0, tail = 0x0}, sigpostedq = {head
= 0x0, tail = 0x0}, sigunbinfo = {si_signo = 0 '\000', si_code = 0 '\000',
si_errno = 0 '\000', si_value = {sival_int = 0, sival_ptr = 0x0}}, msgwaitq =
0x0, mhead = 0x0, xcp = {sigdeliver = 0x0, saved_pc = 0, saved_cpsr = 0,
sigreturn = 0, regs = {0, 277200652, 277230636, 0, 0, 9682944, 0, 0, 0, 0, 0,
277223732, 277223352, 277223732, 276839228, 276923088, 2147483987, 0 <repeats
33 times>}, nsyscalls = 0 '\000', syscall = {{cpsr = 0, sysreturn = 0},
{cpsr = 0, sysreturn = 0}}, ustkptr = 0x0, kstack = 0x0, kstkptr = 0x0}, name
= "Idle Task", '\000' <repeats 22 times>}
```
It seems that syslog flushes the internal buffers from the Idle task.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
