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/10/15 12:59:09 UTC
[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request, #7318: sched/env: Skip the envirnment variable duplication of kernel thread
xiaoxiang781216 opened a new pull request, #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318
## Summary
kernel thread shouldn't copy environment from parent task
## Impact
kernel thread
## Testing
Pass sim:ostest
--
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] pkarashchenko commented on a diff in pull request #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#discussion_r996445093
##########
sched/init/nx_bringup.c:
##########
@@ -224,19 +224,34 @@ static inline void nx_workqueues(void)
static inline void nx_start_application(void)
{
-#ifdef CONFIG_INIT_ARGS
+#ifndef CONFIG_INIT_NONE
FAR char *const argv[] =
Review Comment:
```suggestion
FAR char * const argv[] =
```
##########
sched/init/nx_bringup.c:
##########
@@ -224,19 +224,34 @@ static inline void nx_workqueues(void)
static inline void nx_start_application(void)
{
-#ifdef CONFIG_INIT_ARGS
+#ifndef CONFIG_INIT_NONE
FAR char *const argv[] =
{
+# ifdef CONFIG_INIT_ARGS
CONFIG_INIT_ARGS,
+# endif
+ NULL,
+ };
+
+ FAR char *const envp[] =
Review Comment:
```suggestion
FAR char * const envp[] =
```
--
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 commented on pull request #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1280611326
> > @xiaoxiang781216
> > I'll update the README.txt for rv-virt.
>
> Please follow the instructions in the following PR. #7333
@masayuki2009 thanks, I can repro the issue with your instruction.
--
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 commented on pull request #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1279782806
@masayuki2009 thanks for testing this patch. The problem should be fixed with the update. Could you verify again?
--
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 #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1280409034
>@masayuki2009 I try rv-virt:knsh64 with the last mainline:
Oh, really?
`rv-virt:knsh64` works with the latest master.
```
+ /home/ishikawa/opensource/QEMU/qemu-7.1/build/qemu-system-riscv64 -semihosting -nographic -cpu rv64 -smp 8 -M virt,aclint=on -bios none -kernel ./nuttx
ABC
NuttShell (NSH) NuttX-10.4.0
nsh> uname -a
NuttX 10.4.0 dca5a3483f Oct 17 2022 16:25:42 risc-v rv-virt
nsh> ps
PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK USED FILLED COMMAND
0 0 0 FIFO Kthread N-- Ready 00000000 003024 001480 48.9% Idle Task
1 1 100 RR Task --- Running 00000000 001952 001768 90.5%! /system/bin/init
nsh> free
total used free largest nused nfree
Kmem: 2068976 8688 2060288 2060224 30 2
Page: 4194304 602112 3592192 3592192
nsh> hello
Hello, World!!
nsh> getprime
Set thread priority to 10
Set thread policy to SCHED_RR
Start thread #0
thread #0 started, looking for primes < 10000, doing 10 run(s)
thread #0 finished, found 1230 primes, last one was 9973
Done
getprime took 291 msec
```
--
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 #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1279950194
@xiaoxiang781216
>Hmm, I noticed that 'hello' application not found with spresense:wifi_smp
The issue does not happen now but 'spresense:posix_spawn' has a problem that does not show 'the stdin redirection test'
With this PR
```
Initial memory usage: 5312
Registering romdisk at /dev/ram0
Memory Usage after romdisk_register:
Before: 5312 After: 5392 Change: 80
Mounting ROMFS filesystem at target=/mnt/romfs with source=/dev/ram0
Memory Usage after mount:
Before: 5392 After: 5760 Change: 368
****************************************************************************
* Executing hello
****************************************************************************
Memory Usage after file_action/attr init:
Before: 5760 After: 5760 Change: 0
Memory Usage before posix_spawn:
Before: 5760 After: 5760 Change: 0
Getting ready to say "Hello, world"
Hello, world!
It has been said.
argc = 4
argv = 0x0x2d017ea8
argv[0] = (0x0x2d017ebc) "hello"
argv[1] = (0x0x2d017ec2) "Argument 1"
argv[2] = (0x0x2d017ecd) "Argument 2"
argv[3] = (0x0x2d017ed8) "Argument 3"
argv[4] = 0x0
Goodbye, world!
Memory Usage after posix_spawn:
Before: 5760 After: 7984 Change: 2224
Memory Usage after file_action/attr destruction:
Before: 7984 After: 7984 Change: 0
****************************************************************************
* Executing redirect
****************************************************************************
Memory Usage after file_action/attr init:
Before: 7984 After: 7984 Change: 0
Memory Usage after adding file_actions:
Before: 7984 After: 5856 Change: -2128
Memory Usage before posix_spawn:
Before: 5856 After: 5856 Change: 0
ERROR: posix_spawn failed: 2
Memory Usage after posix_spawn:
Before: 5856 After: 7056 Change: 1200
Memory Usage after file_action/attr destruction:
Before: 7056 After: 6960 Change: -96
Memory Usage End-of-Test:
Before: 6960 After: 6960 Change: 0
```
The latest master
```
Initial memory usage: 5312
Registering romdisk at /dev/ram0
Memory Usage after romdisk_register:
Before: 5312 After: 5392 Change: 80
Mounting ROMFS filesystem at target=/mnt/romfs with source=/dev/ram0
Memory Usage after mount:
Before: 5392 After: 5760 Change: 368
****************************************************************************
* Executing hello
****************************************************************************
Memory Usage after file_action/attr init:
Before: 5760 After: 5760 Change: 0
Memory Usage before posix_spawn:
Before: 5760 After: 5760 Change: 0
Getting ready to say "Hello, world"
Hello, world!
It has been said.
argc = 4
argv = 0x0x2d017ea8
argv[0] = (0x0x2d017ebc) "hello"
argv[1] = (0x0x2d017ec2) "Argument 1"
argv[2] = (0x0x2d017ecd) "Argument 2"
argv[3] = (0x0x2d017ed8) "Argument 3"
argv[4] = 0x0
Goodbye, world!
Memory Usage after posix_spawn:
Before: 5760 After: 7984 Change: 2224
Memory Usage after file_action/attr destruction:
Before: 7984 After: 7984 Change: 0
****************************************************************************
* Executing redirect
****************************************************************************
Memory Usage after file_action/attr init:
Before: 7984 After: 7984 Change: 0
Memory Usage after adding file_actions:
Before: 7984 After: 5856 Change: -2128
Memory Usage before posix_spawn:
Before: 5856 After: 5856 Change: 0
Entering the stdin redirection test
Now is the time for all good men to come to the aid of their party.
Exit-ing the stdin redirection test
Memory Usage after posix_spawn:
Before: 5856 After: 9280 Change: 3424
Memory Usage after file_action/attr destruction:
Before: 9280 After: 9184 Change: -96
Memory Usage End-of-Test:
Before: 9184 After: 9184 Change: 0
```
--
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 merged pull request #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
masayuki2009 merged PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318
--
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 #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1279759096
@xiaoxiang781216
Hmm, I noticed that 'hello' application not found with spresense:wifi_smp
```
NuttShell (NSH) NuttX-3.6.1
nsh>
nsh> uname -a
NuttX 3.6.1 379717002a Oct 15 2022 23:36:28 arm spresense
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 001000 000452 45.2% CPU0 IDLE
1 1 1 0 FIFO Kthread N-- Running 00000000 001000 000228 22.8% CPU1 IDLE
2 2 --- 224 RR Kthread --- Waiting Semaphore 00000000 001992 000660 33.1% hpwork 0x2d0584e4
3 3 --- 60 RR Kthread --- Waiting Semaphore 00000000 001992 000300 15.0% lpwork 0x2d0584fc
5 5 --- 200 RR Task --- Waiting MQ empty 00000000 000976 000472 48.3% cxd56_pm_task
6 6 0 100 RR Task --- Running 00000000 003024 001388 45.8% spresense_main
nsh> ls -l /mnt/sd0/bin
/mnt/sd0/bin:
-rw-rw-rw- 3728 hello
nsh> hello
nsh: hello: command not found
nsh>
```
I can see `CONFIG_PATH_INITIAL` is set correctly.
```
$ grep PATH_INITIAL .config
CONFIG_PATH_INITIAL="/mnt/sd0/bin"
```
--
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 #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1279760160
>Hmm, I noticed that 'hello' application not found with spresense:wifi_smp
Of course, the latest upstream works without errors.
--
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 #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1280503809
>Here is my step:
@xiaoxiang781216
I'll update the README.txt for rv-virt.
--
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 #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1280425895
>Oh, really? rv-virt:knsh64 works with the latest master.
@xiaoxiang781216
However, if I merged the 5 commits in this PR to the latest master manually, the same assert happened.
```
+ /home/ishikawa/opensource/QEMU/qemu-7.1/build/qemu-system-riscv64 -semihosting -nographic -cpu rv64 -smp 8 -M virt,aclint=on -bios none -kernel ./nuttx
ABC[ 0.029000] up_assert: Assertion failed at file:init/nx_bringup.c line: 312 task: Idle Task
[ 0.031000] riscv_registerdump: EPC: 0000000080005f0e
[ 0.033000] riscv_registerdump: A0: 0000000000000000 A1: 0000000080201540 A2: 0000000010000000 A3: 00000000800154c2
[ 0.035000] riscv_registerdump: A4: 0000000000000001 A5: 0000000000000000 A6: 000000000000006c A7: 0000000000000068
[ 0.037000] riscv_registerdump: T0: 0000000000000030 T1: 0000000000000009 T2: 0000000000000020 T3: 000000000000002a
[ 0.038000] riscv_registerdump: T4: 000000000000002e T5: 00000000000001ff T6: 000000000000002d
[ 0.041000] riscv_registerdump: S0: 0000000080201540 S1: 0000000080200a68 S2: 0000000080201698 S3: 0000000080206b10
[ 0.043000] riscv_registerdump: S4: 0000000000000000 S5: 0000000000000000 S6: 0000000000000000 S7: 0000000000000000
[ 0.044000] riscv_registerdump: S8: 0000000000000000 S9: 0000000000000000 S10: 0000000000000000 S11: 0000000000000000
[ 0.045000] riscv_registerdump: SP: 0000000080206b00 FP: 0000000080201540 TP: 0000000000000000 RA: 0000000080005f0e
[ 0.046000] riscv_dump_stack: IRQ Stack:
[ 0.046000] riscv_dump_stack: sp: 80206b10
[ 0.047000] riscv_dump_stack: base: 80200200
[ 0.048000] riscv_dump_stack: size: 00000800
[ 0.049000] riscv_dump_stack: ERROR: IRQ Stack pointer is not within the stack
[ 0.051000] riscv_dump_stack: User Stack:
[ 0.052000] riscv_dump_stack: sp: 80206b10
[ 0.053000] riscv_dump_stack: base: 80206030
[ 0.053000] riscv_dump_stack: size: 00000bd0
[ 0.054000] riscv_stackdump: 0000000080206b00: 80201540 00000000 80005a7a 00000000 00000138 00000000 800148f8 00000000
[ 0.057000] riscv_stackdump: 0000000080206b20: 00000000 00000000 80200a58 00000000 802016ac 00000000 802016b0 00000000
[ 0.059000] riscv_stackdump: 0000000080206b40: 00000005 00000000 80003f94 00000000 00000005 00000000 800015d2 00000000
[ 0.062000] riscv_stackdump: 0000000080206b60: 802016ac 00000000 00000000 00000000 00016400 00000000 800148b8 00000000
[ 0.064000] riscv_stackdump: 0000000080206b80: 800148c0 00000000 00000000 00000000 00000005 00000000 8000151e 00000000
[ 0.067000] riscv_stackdump: 0000000080206ba0: 80400000 00000000 00400000 00000000 00000000 00000000 00000000 00000000
[ 0.069000] riscv_stackdump: 0000000080206bc0: 00000000 00000000 00000000 00000000 00000000 00000000 80000640 00000000
[ 0.071000] riscv_stackdump: 0000000080206be0: 00000000 00000000 800006ea 00000000 00000000 00000000 8000004c 00000000
[ 0.074000] riscv_dump_stack: Kernel Stack:
[ 0.074000] riscv_dump_stack: sp: 80206b10
[ 0.075000] riscv_dump_stack: base: 00000000
[ 0.076000] riscv_dump_stack: size: 00000c00
[ 0.076000] riscv_dump_stack: ERROR: Kernel Stack pointer is not within the stack
[ 0.077000] riscv_showtasks: PID PRI STACK USED FILLED COMMAND
[ 0.079000] riscv_showtasks: ---- ---- 2048 2040 99.6%! irq
[ 0.080000] riscv_dump_task: 0 0 3024 1376 45.5% 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: 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 #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1280516211
>@xiaoxiang781216
>I'll update the README.txt for rv-virt.
Please follow the instructions in the following PR.
https://github.com/apache/incubator-nuttx/pull/7333
--
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 #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1280111662
@xiaoxiang781216
`rv-virt:knsh64` fails when booting.
NOTE: I tried to change ` CONFIG_ARCH_INTERRUPTSTACK` from 2048 to 4096 but the issue still happens.
```
+ /home/ishikawa/opensource/QEMU/qemu-7.1/build/qemu-system-riscv64 -semihosting -nographic -cpu rv64 -smp 8 -M virt,aclint=on -bios none -kernel ./nuttx
ABC[ 0.028000] up_assert: Assertion failed at file:init/nx_bringup.c line: 312 task: Idle Task
[ 0.031000] riscv_registerdump: EPC: 0000000080005ed2
[ 0.032000] riscv_registerdump: A0: 0000000000000000 A1: 0000000080201530 A2: 0000000010000000 A3: 0000000080015502
[ 0.035000] riscv_registerdump: A4: 0000000000000001 A5: 0000000000000000 A6: 000000000000006c A7: 0000000000000068
[ 0.037000] riscv_registerdump: T0: 0000000000000030 T1: 0000000000000009 T2: 0000000000000020 T3: 000000000000002a
[ 0.038000] riscv_registerdump: T4: 000000000000002e T5: 00000000000001ff T6: 000000000000002d
[ 0.040000] riscv_registerdump: S0: 0000000080201530 S1: 0000000080200a58 S2: 00000000802016a0 S3: 0000000080206b10
[ 0.042000] riscv_registerdump: S4: 0000000000000000 S5: 0000000000000000 S6: 0000000000000000 S7: 0000000000000000
[ 0.043000] riscv_registerdump: S8: 0000000000000000 S9: 0000000000000000 S10: 0000000000000000 S11: 0000000000000000
[ 0.044000] riscv_registerdump: SP: 0000000080206b00 FP: 0000000080201530 TP: 0000000000000000 RA: 0000000080005ed2
[ 0.045000] riscv_dump_stack: IRQ Stack:
[ 0.046000] riscv_dump_stack: sp: 80206b10
[ 0.046000] riscv_dump_stack: base: 802001f0
[ 0.047000] riscv_dump_stack: size: 00000800
[ 0.048000] riscv_dump_stack: ERROR: IRQ Stack pointer is not within the stack
[ 0.050000] riscv_dump_stack: User Stack:
[ 0.051000] riscv_dump_stack: sp: 80206b10
[ 0.052000] riscv_dump_stack: base: 80206030
[ 0.053000] riscv_dump_stack: size: 00000bd0
[ 0.054000] riscv_stackdump: 0000000080206b00: 80201530 00000000 80005a3e 00000000 00000138 00000000 80014930 00000000
[ 0.056000] riscv_stackdump: 0000000080206b20: 80207f08 00000000 80200a48 00000000 802016b4 00000000 802016b8 00000000
[ 0.058000] riscv_stackdump: 0000000080206b40: 00000005 00000000 80003f6a 00000000 00000005 00000000 800015d2 00000000
[ 0.059000] riscv_stackdump: 0000000080206b60: 802016b4 00000000 00000000 00000000 00016400 00000000 800148f0 00000000
[ 0.060000] riscv_stackdump: 0000000080206b80: 800148f8 00000000 00000000 00000000 00000005 00000000 8000151e 00000000
[ 0.063000] riscv_stackdump: 0000000080206ba0: 80400000 00000000 00400000 00000000 00000000 00000000 00000000 00000000
[ 0.065000] riscv_stackdump: 0000000080206bc0: 00000000 00000000 00000000 00000000 00000000 00000000 80000640 00000000
[ 0.067000] riscv_stackdump: 0000000080206be0: 00000000 00000000 800006ea 00000000 00000000 00000000 8000004c 00000000
[ 0.069000] riscv_dump_stack: Kernel Stack:
[ 0.069000] riscv_dump_stack: sp: 80206b10
[ 0.071000] riscv_dump_stack: base: 00000000
[ 0.072000] riscv_dump_stack: size: 00000c00
[ 0.072000] riscv_dump_stack: ERROR: Kernel Stack pointer is not within the stack
[ 0.074000] riscv_showtasks: PID PRI STACK USED FILLED COMMAND
[ 0.076000] riscv_showtasks: ---- ---- 2048 2040 99.6%! irq
[ 0.077000] riscv_dump_task: 0 0 3024 1376 45.5% 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: 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 #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1280429503
@xiaoxiang781216
`saber-6quad:knsh` has the same issue with this PR.
```
+ /home/ishikawa/opensource/QEMU/qemu-7.1/build/qemu-system-arm -semihosting -M sabrelite -m 1024 -smp 4 -kernel ./nuttx -nographic
ABDGHIJKNOPQ
[ 0.030000] up_assert: Assertion failed at file:init/nx_bringup.c line: 312 task: Idle Task
[ 0.030000] up_assert: Assertion failed at file:armv7-a/arm_syscall.c line: 488 task: Idle Task
[ 0.030000] arm_registerdump: R0: 00000000 R1: 10815490 R2: 02020000 R3: 00000000
[ 0.030000] arm_registerdump: R4: 10815490 R5: 10814d00 R6: 10814cf0 FP: 10815db0
[ 0.030000] arm_registerdump: R8: 10815db0 SB: 00000000 SL: 00000000 R11: 00000000
[ 0.030000] arm_registerdump: IP: 00000003 SP: 10815d9c LR: 10804411 PC: 108044b8
[ 0.030000] arm_registerdump: CPSR: 6000017f
[ 0.030000] arm_dump_stack: IRQ Stack:
[ 0.030000] arm_dump_stack: sp: 108142c0
[ 0.030000] arm_dump_stack: base: 10813af0
[ 0.030000] arm_dump_stack: size: 00000800
[ 0.030000] arm_stackdump: 108142c0: 10815c54 10814cf0 fffffff8 10815db0 10815db0 10802e79 00000000 10800bd7
[ 0.030000] arm_dump_stack: User Stack:
[ 0.030000] arm_dump_stack: sp: 10815d9c
[ 0.030000] arm_dump_stack: base: 1081562c
[ 0.030000] arm_dump_stack: size: 000007e8
[ 0.030000] arm_stackdump: 10815d80: 10815db0 00000000 00000000 00000000 00000003 108044b8 6000017f 10804411
[ 0.030000] arm_stackdump: 10815da0: 00000138 10814d9c 17fffff8 10809f7d 00000000 10815de4 10815ddc 10814cf8
[ 0.030000] arm_stackdump: 10815dc0: 00000000 10802e79 00000000 10801467 00000000 10815ddc 00000000 10016400
[ 0.030000] arm_stackdump: 10815de0: 00000000 10811988 1081198e 00000000 00000005 10814dcc 10814dc8 108013eb
[ 0.030000] arm_dump_stack: Kernel Stack:
[ 0.030000] arm_dump_stack: sp: 10815d9c
[ 0.030000] arm_dump_stack: base: 00000000
[ 0.030000] arm_dump_stack: size: 00000c00
[ 0.030000] arm_dump_stack: ERROR: Kernel Stack pointer is not within the stack
[ 0.030000] arm_showtasks: PID PRI STACK USED FILLED COMMAND
[ 0.030000] arm_showtasks: ---- ---- 2048 420 20.5% irq
[ 0.030000] arm_dump_task: 0 0 2024 832 41.1% 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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1281088276
@masayuki2009 the problem is fixed by:
https://github.com/apache/incubator-nuttx/pull/7318/commits/859d58406cedef1c875f25966e5086aab711f9e6
binfmt_copyargv return NULL in case *argv == NULL, so the caller can't distinguish this case from the out of memory, and then report -ENOMEM improperly. This issue can be fixed by changing the prototype of binfmt_copyargv to return the error code instead.
--
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 commented on pull request #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1280465542
Is my version too low?
```
version
QEMU emulator version 7.0.50 (v7.0.0-1512-gca127b3fc2)
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
```
Here is my step:
```
./tools/configure.sh rv-virt:knsh64
make -j8
qemu-system-riscv64 -semihosting -M virt,aclint=on -cpu rv64 -smp 8 -bios none -kernel nuttx -nographic
```
Do I need prepare the disk or network for elf binary?
--
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 commented on pull request #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1280360728
@masayuki2009 I try rv-virt:knsh64 with the last mainline:
```
commit 0dfd1f004defb2278bf99e305859a4cbb07675b0
Author: Alan Carvalho de Assis <ac...@gmail.com>
Date: Sun Oct 16 15:59:46 2022 -0300
esp32-devkitc: Add board support to Rotary Encoder
Reviewed-by: Petro Karashchenko <pe...@gmail.com>
```
The similar crash happen:
```
qemu-system-riscv64 -semihosting -M virt,aclint=on -cpu rv64 -smp 8 -bios none -kernel nuttx -nographic
ABC[ 0.005000] up_assert: Assertion failed at file:init/nx_bringup.c line: 297 task: Idle Task
[ 0.011000] riscv_registerdump: EPC: 0000000080006bbe
[ 0.015000] riscv_registerdump: A0: 0000000000000000 A1: 0000000080201530 A2: 0000000010000000 A3: 00000000800155ea
[ 0.025000] riscv_registerdump: A4: 0000000000000001 A5: 0000000000000000 A6: 000000000000006c A7: 0000000000000068
[ 0.033000] riscv_registerdump: T0: 0000000000000030 T1: 0000000000000009 T2: 0000000000000020 T3: 000000000000002a
[ 0.042000] riscv_registerdump: T4: 000000000000002e T5: 00000000000001ff T6: 000000000000002d
[ 0.050000] riscv_registerdump: S0: 0000000080201530 S1: 0000000080200a58 S2: 00000000802016a0 S3: 0000000080206b30
[ 0.063000] riscv_registerdump: S4: 0000000000000000 S5: 0000000000000000 S6: 0000000000000000 S7: 0000000000000000
[ 0.076000] riscv_registerdump: S8: 0000000000000000 S9: 0000000000000000 S10: 0000000000000000 S11: 0000000000000000
[ 0.084000] riscv_registerdump: SP: 0000000080206b20 FP: 0000000080201530 TP: 0000000000000000 RA: 0000000080006bbe
[ 0.098000] riscv_dump_stack: IRQ Stack:
[ 0.104000] riscv_dump_stack: sp: 80206b30
[ 0.107000] riscv_dump_stack: base: 802001f0
[ 0.112000] riscv_dump_stack: size: 00000800
[ 0.118000] riscv_dump_stack: ERROR: IRQ Stack pointer is not within the stack
[ 0.126000] riscv_dump_stack: User Stack:
[ 0.128000] riscv_dump_stack: sp: 80206b30
[ 0.132000] riscv_dump_stack: base: 80206030
[ 0.136000] riscv_dump_stack: size: 00000bd0
[ 0.139000] riscv_stackdump: 0000000080206b20: 80201530 00000000 8000672a 00000000 00000129 00000000 80014930 00000000
[ 0.151000] riscv_stackdump: 0000000080206b40: 00000000 00000000 80200a48 00000000 802016b4 00000000 802016b8 00000000
[ 0.160000] riscv_stackdump: 0000000080206b60: 00000005 00000000 80004294 00000000 00000005 00000000 800015ec 00000000
[ 0.165000] riscv_stackdump: 0000000080206b80: 80200a58 00000000 80016400 00000000 00000005 00000000 8000151e 00000000
[ 0.171000] riscv_stackdump: 0000000080206ba0: 80400000 00000000 00400000 00000000 00000000 00000000 00000000 00000000
[ 0.185000] riscv_stackdump: 0000000080206bc0: 00000000 00000000 00000000 00000000 00000000 00000000 80000640 00000000
[ 0.194000] riscv_stackdump: 0000000080206be0: 00000000 00000000 800006ea 00000000 00000000 00000000 8000004c 00000000
[ 0.204000] riscv_dump_stack: Kernel Stack:
[ 0.208000] riscv_dump_stack: sp: 80206b30
[ 0.210000] riscv_dump_stack: base: 00000000
[ 0.214000] riscv_dump_stack: size: 00000c00
[ 0.218000] riscv_dump_stack: ERROR: Kernel Stack pointer is not within the stack
[ 0.225000] riscv_showtasks: PID PRI STACK USED FILLED COMMAND
[ 0.232000] riscv_showtasks: ---- ---- 2048 2040 99.6%! irq
[ 0.238000] riscv_dump_task: 0 0 3024 1200 39.6% Idle Task
```
Do I need specially setup or rv-virt:knsh64 broken before this patchset?
--
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 commented on pull request #7318: sched/env: Skip the envirnment variable duplication of kernel thread
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #7318:
URL: https://github.com/apache/incubator-nuttx/pull/7318#issuecomment-1279971664
@masayuki2009 please try again, I verify the update with sim:posix_spawn without problem.
--
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