You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/05/31 08:11:12 UTC
[GitHub] [incubator-nuttx] Ouss4 opened a new pull request, #6349: arch/xtensa: Remove the assembly signal trampoline.
Ouss4 opened a new pull request, #6349:
URL: https://github.com/apache/incubator-nuttx/pull/6349
## Summary
1. Remove the assembly signal trampoline, we can get directly to `xtensa_sig_deliver` if the PS register is set correctly.
2. Remove old code that was preventing jumping back to the signal trampoline.
## Impact
Xtensa chips
## Testing
ESP32, ESP32-S2, ESP32-S3
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #6349: arch/xtensa: Remove the assembly signal trampoline.
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #6349:
URL: https://github.com/apache/incubator-nuttx/pull/6349#issuecomment-1142710774
@Ouss4
>I'm running ostest now, but can't hit the issue.
Hmm, can you attach the nuttx.bin for esp32-devkitc:smp? to this PR?
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] Ouss4 commented on pull request #6349: arch/xtensa: Remove the assembly signal trampoline.
Posted by GitBox <gi...@apache.org>.
Ouss4 commented on PR #6349:
URL: https://github.com/apache/incubator-nuttx/pull/6349#issuecomment-1143239483
@masayuki2009
I am able to reproduce the issue. It looks like an exception is vectoring to the Kernel vector which just calls `break`. For that to happen the `UM` field of `PS` must be wrong. I am trying to find how that can happen. Please give me a moment.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #6349: arch/xtensa: Remove the assembly signal trampoline.
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #6349:
URL: https://github.com/apache/incubator-nuttx/pull/6349#issuecomment-1142102475
@Ouss4
I noticed that the ostest crashes with esp32-devkitc:smp (real board not QEMU).
```
nsh> uname -a
NuttX 10.3.0-RC2 c7823f7914 May 31 2022 21:53:18 xtensa esp32-devkitc
nsh> mount
/proc type procfs
nsh> ps
PID GROUP CPU PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
0 0 0 0 FIFO Kthread N-- Assigned 00000000 003040 000560 18.4% CPU0 IDLE
1 1 1 0 FIFO Kthread N-- Running 00000000 003040 000432 14.2% CPU1 IDLE
2 2 0 100 RR Task --- Running 00000000 003024 001576 52.1% nsh_main
nsh> free
total used free largest nused nfree
Umem: 314784 11472 303312 177968 39 4
...
nsh> ostest
stdio_test: write fd=1
stdio_test: Standard I/O Check: printf
stdio_test: write fd=2
stdio_test: Standard I/O Check: fprintf to stderr
ostest_main: putenv(Variable1=BadValue3)
ostest_main: setenv(Variable1, GoodValue1, TRUE)
ostest_main: setenv(Variable2, BadValue1, FALSE)
ostest_main: setenv(Variable2, GoodValue2, TRUE)
ostest_main: setenv(Variable3, Variable3, FALSE)
ostest_main: setenv(Variable3, Variable3, FALSE)
show_variable: Variable=Variable1 has value=GoodValue1
show_variable: Variable=Variable2 has value=GoodValue2
show_variable: Variable=Variable3 has value=GoodValue3
ostest_main: Started user_main at PID=24
...
sem_waiter: Taking mutex
sem_waiter: Starting wait for condition
sem_waiter: Setting non-cancelable
cancel_test: Canceling thread
[CPU0] xtensa_panic: Unhandled Exception 1 task: pt-0x400e15a4
[CPU0] xtensa_dumpstate: CPU0:
[CPU0] xtensa_registerdump: PC: 40080300 PS: 00000010
[CPU0] xtensa_registerdump: A0: 800dc821 A1: 3ffec9f0 A2: 00000000 A3: 00000000
[CPU0] xtensa_registerdump: A4: 3ffe3a80 A5: 3ffb01b2 A6: 00060c22 A7: 00000000
[CPU0] xtensa_registerdump: A8: 80081c10 A9: 3ffec9d0 A10: 00000000 A11: 00000001
[CPU0] xtensa_registerdump: A12: 3ffb01b4 A13: 3ffb01b8 A14: 00060322 A15: 00000001
[CPU0] xtensa_registerdump: SAR: 00000020 CAUSE: 00000000 VADDR: 00000000
[CPU0] xtensa_registerdump: LBEG: 800dc82f LEND: 3ffec9a0 LCNT: 00000000
[CPU0] xtensa_dumpstate: sp: 3ffb0c6c
[CPU0] xtensa_dumpstate: IRQ stack:
[CPU0] xtensa_dumpstate: base: 3ffb04ec
[CPU0] xtensa_dumpstate: size: 00000800
[CPU0] xtensa_dumpstate: used: 000002c4
[CPU0] xtensa_stackdump: 3ffb0c60: 3ffb0cac 00000000 3f4001bf 00000001 3ffb0ccc 00000001 3ffec918 00001ff0
[CPU0] xtensa_stackdump: 3ffb0c80: 3ffb0c8c 00000008 3ffb3018 3ffb14ec 3ffe3a80 3ffb04ec 3ffeab10 40080945
[CPU0] xtensa_stackdump: 3ffb0ca0: 3ffb0ccc 00000001 3ffec918 3f400222 00000001 3ffe3b00 00000000 00040023
[CPU0] xtensa_stackdump: 3ffb0cc0: 3ffb0cec 00000001 3ffec980 80081c10 3ffec9d0 00000000 00000001 deadbeef
[CPU0] xtensa_dumpstate: sp: 3ffec9f0
[CPU0] xtensa_dumpstate: User stack:
[CPU0] xtensa_dumpstate: base: 3ffeab10
[CPU0] xtensa_dumpstate: size: 00001ff0
[CPU0] xtensa_dumpstate: used: 00000258
[CPU0] xtensa_stackdump: 3ffec9e0: 00000000 3ffeca10 00002153 ffffdead 3ffafd04 00000001 00000000 00000000
[CPU0] xtensa_stackdump: 3ffeca00: 800e5eed 3ffeca40 ffffffff 00060820 ffffffff 00000000 00060a22 00000000
[CPU0] xtensa_stackdump: 3ffeca20: 3ffeaaf0 00000000 00060622 00000000 800e59c0 3ffeca60 00001021 00000000
[CPU0] xtensa_stackdump: 3ffeca40: 00060820 3f404568 00000000 00000001 800e161b 3ffeca80 00000000 00000000
[CPU0] xtensa_stackdump: 3ffeca60: 3ffe3a80 3ffafde7 00000000 00000069 800ddda0 3ffecaa0 00000000 3ffb2334
[CPU0] xtensa_stackdump: 3ffeca80: 0000000c 0000001e 3ffb2330 0000002a 800e434d 3ffecac0 400e15a4 00000000
[CPU0] xtensa_stackdump: 3ffecaa0: 00000000 00000000 00000002 00000000 00000000 3ffecae0 3ffe3a80 00000000
[CPU0] xtensa_stackdump: 3ffecac0: 3ffb14f0 3ffec8e0 00000000 00000002 00000000 3ffecb00 00000000 00000000
[CPU0] xtensa_stackdump: 3ffecae0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[CPU0] xtensa_showtasks: PID PRI CPU USED STACK FILLED COMMAND
[CPU0] xtensa_showtasks: ---- ---- ---- 772 2048 37.6% irq
[CPU0] xtensa_dump_task: 0 0 0 560 3040 18.4% CPU0 IDLE
[CPU0] xtensa_dump_task: 1 0 1 432 3040 14.2% CPU1 IDLE
[CPU0] xtensa_dump_task: 2 100 0 1576 3024 52.1% nsh_main
[CPU0] xtensa_dump_task: 23 100 0 1144 2016 56.7% ostest
[CPU0] xtensa_dump_task: 24 100 0 1160 8112 14.2% ostest
[CPU0] xtensa_dump_task: 42 100 0 600 8176 7.3% pt-0x400e15a4
```
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] Ouss4 commented on pull request #6349: arch/xtensa: Remove the assembly signal trampoline.
Posted by GitBox <gi...@apache.org>.
Ouss4 commented on PR #6349:
URL: https://github.com/apache/incubator-nuttx/pull/6349#issuecomment-1142137007
@masayuki2009
> [CPU0] xtensa_panic: Unhandled Exception 1 task: pt-0x400e15a4
That's curious. Unhandled Exception number 1 is a debug exception, this is out of the scope of NuttX. I'm not sure how this can happen during `ostest`.
I'm running ostest now, but can't hit the issue. A backtrace would help to know when that happens but we would need to add something similar to: https://github.com/apache/incubator-nuttx/blob/master/arch/xtensa/src/common/xtensa_user_handler.S#L192-L202 to link the pre-exception frame.
Unrelated to this, but some defconfigs may need to change their stack sizes since now we have the FPU as part of the stack, I did see some stack corruptions during testing.
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #6349: arch/xtensa: Remove the assembly signal trampoline.
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #6349:
URL: https://github.com/apache/incubator-nuttx/pull/6349
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org