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

sim:nxwm Test failure #2093

Closed
btashton opened this issue Oct 24, 2020 · 7 comments · Fixed by #2185
Closed

sim:nxwm Test failure #2093

btashton opened this issue Oct 24, 2020 · 7 comments · Fixed by #2185
Assignees
Labels
blocker Release Blocker Type: Bug Something isn't working

Comments

@btashton
Copy link
Contributor

For the sim:nxwm target the simulation crashes

❯ ./nuttx 
nxwm_main: Initialize the NSH library
ERROR: Failed to register oneshot at /dev/oneshot: -17
createTaskbar: Create CTaskbar instance
createTaskbar: Connect CTaskbar instance to the NX server
createTaskbar: Initialize CTaskbar instance
Segmentation fault (core dumped)
@btashton btashton added Type: Bug Something isn't working blocker Release Blocker releases/10.0.0 labels Oct 24, 2020
@xiaoxiang781216
Copy link
Contributor

May relate to my timer reconstruction, let's take a look.

@xiaoxiang781216 xiaoxiang781216 self-assigned this Oct 25, 2020
@sebastianene07
Copy link

sebastianene07 commented Oct 31, 2020

It doesn't seem to be from the timer, that error from the boot log can be suppressed by disabling CONFIG_NSH_ARCHINIT. In this case the up_oneshot registration is not called twice from the boardctl logic.

I investigated this a little bit, here are some logs:

Program received signal SIGSEGV, Segmentation fault.
                                                    0x00005555555920b5 in nxmu_sendwindow (wnd=0x0, msg=0x7ffff3ccfdb0, msglen=16) at nxmu/nxmu_sendwindow.c:87
87	  if (!NXBE_ISBLOCKED(wnd))
(gdb) bt
#0  0x00005555555920b5 in nxmu_sendwindow (wnd=0x0, msg=0x7ffff3ccfdb0, msglen=16) at nxmu/nxmu_sendwindow.c:87
#1  0x000055555559248d in nx_getposition (hwnd=0x0) at nxmu/nx_getposition.c:94
#2  0x000055555556fe13 in NXWidgets::CWidgetControl::waitGeoData (this=0x7ffff3cd5038) at src/cwidgetcontrol.cxx:950
#3  0x00005555555a8ec8 in NXWidgets::CWidgetControl::getWindowSize (this=0x7ffff3cd5038, size=0x7ffff3ccfe6c)
    at /home/seb/repos/incubator-nuttx-apps/include/graphics/nxwidgets/cwidgetcontrol.hxx:730
#4  0x000055555556d367 in NXWidgets::CNxWindow::getSize (this=0x7ffff3cd51b0, pSize=0x7ffff3ccfe6c) at src/cnxwindow.cxx:165
#5  0x0000555555564a3a in NxWM::CTaskbar::createBackgroundImage (this=0x7ffff3cd01f0) at src/ctaskbar.cxx:1001
#6  0x0000555555563dad in NxWM::CTaskbar::initWindowManager (this=0x7ffff3cd01f0) at src/ctaskbar.cxx:224
#7  0x000055555556359a in createTaskbar () at src/nxwm_main.cxx:181
#8  0x000055555556395c in nxwm_main (argc=1, argv=0x7ffff3ccff60) at src/nxwm_main.cxx:524
#9  0x000055555556110a in nxtask_startup (entrypt=0x5555555638fd <nxwm_main(int, char**)>, argc=1, argv=0x7ffff3ccff60)
    at sched/task_startup.c:165
#10 0x000055555555d34f in nxtask_start () at task/task_start.c:144
#11 0x0000000000000000 in ?? ()
(gdb) f 0
#0  0x00005555555920b5 in nxmu_sendwindow (wnd=0x0, msg=0x7ffff3ccfdb0, msglen=16) at nxmu/nxmu_sendwindow.c:87
87	  if (!NXBE_ISBLOCKED(wnd))
(gdb) p wnd
$1 = (struct nxbe_window_s *) 0x0

Also, the up_oneshot driver registration seems to be called twice from boarctl logic (this is the reason why is failing)

from:

#0  oneshot_register (devname=0x0, lower=0x5555555b3a07) at timers/oneshot.c:345
#1  0x00005555555a698e in sim_bringup () at sim_bringup.c:225
#2  0x00005555555a68e1 in board_app_initialize (arg=0) at sim_appinit.c:80
#3  0x000055555559bb4a in boardctl (cmd=65281, arg=0) at boardctl.c:326
#4  0x000055555557410d in nsh_initialize () at nsh_init.c:103
#5  0x0000555555567cd2 in NxWM::nshlibInitialize () at src/cnxterm.cxx:682
#6  0x0000555555563935 in nxwm_main (argc=1, argv=0x7ffff3ccff60) at src/nxwm_main.cxx:515

and from :

#0  oneshot_register (devname=0x0, lower=0x5555555b3a07) at timers/oneshot.c:345
#1  0x00005555555a698e in sim_bringup () at sim_bringup.c:225
#2  0x00005555555a68e1 in board_app_initialize (arg=0) at sim_appinit.c:80
#3  0x000055555559bb4a in boardctl (cmd=65281, arg=0) at boardctl.c:326
#4  0x000055555556391f in nxwm_main (argc=1, argv=0x7ffff3ccff60) at src/nxwm_main.cxx:508

@sebastianene07
Copy link

sebastianene07 commented Oct 31, 2020

I have a fix for this but I cannot link it to the ticket because it's in a separate repo:
apache/nuttx-apps#456

@xiaoxiang781216
Copy link
Contributor

@sebastianene07 thanks to find the fix.

@btashton
Copy link
Contributor Author

btashton commented Nov 1, 2020

This is not fully resolved until apache/nuttx-apps#456
Is merged correct?

@sebastianene07
Copy link

This is not fully resolved until apache/incubator-nuttx-apps#456
Is merged correct?

I confirm

@btashton
Copy link
Contributor Author

btashton commented Nov 2, 2020

App side backport that will close this issue out apache/nuttx-apps#458

@sebastianene07 thanks for taking care of this one.

@btashton btashton closed this as completed Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Release Blocker Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants