Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] sim_vpnkit is breaking watchdog? #15582

Open
1 task done
casaroli opened this issue Jan 16, 2025 · 1 comment
Open
1 task done

[BUG] sim_vpnkit is breaking watchdog? #15582

casaroli opened this issue Jan 16, 2025 · 1 comment
Labels
Arch: simulator Issues related to the SIMulator Area: Kernel Kernel issues Area: Networking Effects networking subsystem Area: OS Components OS Components issues OS: Linux Issues related to Linux (building system, etc) Type: Bug Something isn't working

Comments

@casaroli
Copy link
Contributor

casaroli commented Jan 16, 2025

Hello,

I don't see anything wrong with the commit 61f0c97, however, it seems to have broken sim_vpnkit.

I come up with a minimal example, that we can reproduce even without running vpnkit.

When NuttX starts, it will try to reach vpnkit socket, and after some timeout it will proceed to nsh:

Description / Steps to reproduce the issue

Using NuttX master branch:

Build and run:

./tools/configure.sh -l sim:vpnkit
make
./nuttx
[... no output even after 10 seconds ...]

Running current master (118f827) gives no output, and running on the debugger we can see the wd has expired:

Breakpoint 1, _assert (filename=0x400789f8 <host_gettime+36> "H\213D$\020Hi\300", linenum=32767, 
    msg=0x7ffff7d8853d <__GI___clock_gettime+29> "\205\300u\0371\300]\303\017\037", regs=0x7fffffffd9c0) at misc/assert.c:826
826	{
(gdb) bt
#0  _assert (filename=0x400789f8 <host_gettime+36> "H\213D$\020Hi\300", linenum=32767, 
    msg=0x7ffff7d8853d <__GI___clock_gettime+29> "\205\300u\0371\300]\303\017\037", regs=0x7fffffffd9c0) at misc/assert.c:826
#1  0x000000004000c60b in __assert (filename=0x4007e7ff "wqueue/kwork_queue.c", linenum=71, msg=0x0) at assert/lib_assert.c:38
#2  0x0000000040044bb2 in work_timer_expiry (arg=1074361008) at wqueue/kwork_queue.c:71
#3  0x0000000040044ae6 in wd_expiration (ticks=4) at wdog/wd_start.c:159
#4  wd_timer (ticks=4) at wdog/wd_start.c:468
#5  0x0000000040042bec in nxsched_process_timer () at sched/sched_processtimer.c:197
#6  0x000000004000b940 in oneshot_callback (lower=0x7ffff3c00398, arg=0x0) at timers/arch_alarm.c:131
#7  0x00000000400139bc in sim_process_tick (entry=0x7ffff3c003a0) at sim/sim_oneshot.c:254
#8  0x00000000400138a6 in sim_timer_update_internal () at sim/sim_oneshot.c:200
#9  0x0000000040013d6a in sim_timer_update () at sim/sim_oneshot.c:530
#10 0x0000000040012a97 in up_idle () at sim/sim_idle.c:86
#11 0x0000000040001a6b in nx_start () at init/nx_start.c:782
#12 0x00000000400014df in main (argc=1, argv=0x7fffffffdd48, envp=0x7fffffffdd58) at sim/sim_head.c:187

Expected result:

If we revert that commit, it works:

git revert --no-commit 61f0c97193e3adbb1eee07bb854799d35843f12e
make
./nuttx
[... after about 10 seconds ...]

NuttShell (NSH) NuttX-12.8.0
nsh> 

I don't know how 61f0c97 could affect sim_netdriver.c, kthreads or kernel workqueues.

Can anyone please give us a clue?

Thank you!

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Ubuntu-24

NuttX Version

master

Issue Architecture

[Arch: simulator]

Issue Area

[Area: OS Components], [Area: Networking], [Area: Kernel]

Verification

  • I have verified before submitting the report.
@casaroli casaroli added the Type: Bug Something isn't working label Jan 16, 2025
@github-actions github-actions bot added Arch: simulator Issues related to the SIMulator Area: Kernel Kernel issues Area: Networking Effects networking subsystem Area: OS Components OS Components issues OS: Linux Issues related to Linux (building system, etc) labels Jan 16, 2025
@acassis
Copy link
Contributor

acassis commented Jan 16, 2025

@hujun260 please take a look ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: simulator Issues related to the SIMulator Area: Kernel Kernel issues Area: Networking Effects networking subsystem Area: OS Components OS Components issues OS: Linux Issues related to Linux (building system, etc) Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants