weston-ivi-shell-user-interface segfaults with qemu, yocto, virgl, aarch64 and ivi shell
Weston version is 9.0.0.
I try to run weston with virgl on yocto on qemu, x86 host, aarch64 guest. I use hmi controller in weston ini. It works under normal desktop shell, but if I switch to ivi shell then weston-ivi-shell-user-interface ( and some other weston test apps) start crashing with segfault. This is the callstack:
(gdb) bt full
#0 0x0000007ff7fae214 in wl_proxy_marshal (proxy=0x0, opcode=opcode@entry=0) at ../wayland-1.19.0/src/wayland-client.c:793
args = {{i = 1431813888, u = 1431813888, f = 1431813888, s = 0x555557bf00 "/usr/share/weston/panel.png", o = 0x555557bf00, n = 1431813888, a = 0x555557bf00, h = 1431813888}, {i = 1002, u = 1002, f = 1002, s = 0x3ea <error: Cannot access memory at address 0x3ea>, o = 0x3ea, n = 1002, a = 0x3ea, h = 1002}, {i = 1431841984, u = 1431841984, f = 1431841984, s = 0x5555582cc0 "", o = 0x5555582cc0, n = 1431841984, a = 0x5555582cc0, h = 1431841984}, {i = 2001, u = 2001, f = 2001, s = 0x7d1 <error: Cannot access memory at address 0x7d1>, o = 0x7d1, n = 2001, a = 0x7d1, h = 2001}, {i = 1431670784, u = 1431670784, f = 1431670784, s = 0x5555559000 <file_create_dated+512> "\373sG\251@\003", o = 0x5555559000 <file_create_dated+512>, n = 1431670784, a = 0x5555559000 <file_create_dated+512>, h = 1431670784}, {i = -1520, u = 4294965776, f = -1520, s = 0x7ffffffa10 "P\372\377\377\177", o = 0x7ffffffa10, n = 4294965776, a = 0x7ffffffa10, h = -1520}, {i = 1431813888, u = 1431813888, f = 1431813888, s = 0x555557bf00 "/usr/share/weston/panel.png", o = 0x555557bf00, n = 1431813888, a = 0x555557bf00, h = 1431813888}, {i = -2272, u = 4294965024, f = -2272, s = 0x7ffffff720 "", o = 0x7ffffff720, n = 4294965024, a = 0x7ffffff720, h = -2272}, {i = -1381663488, u = 2913303808, f = -1381663488, s = 0xd33c55d8ada57d00 <error: Cannot access memory at address 0xd33c55d8ada57d00>, o = 0xd33c55d8ada57d00, n = 2913303808, a = 0xd33c55d8ada57d00, h = -1381663488}, {i = 0, u = 0, f = 0, s = 0x0, o = 0x0, n = 0, a = 0x0, h = 0}, {i = 0, u = 0, f = 0, s = 0x0, o = 0x0, n = 0, a = 0x0, h = 0}, {i = 0, u = 0, f = 0, s = 0x4052000000000000 <error: Cannot access memory at address 0x4052000000000000>, o = 0x4052000000000000, n = 0, a = 0x4052000000000000, h = 0}, {i = 0, u = 0, f = 0, s = 0x0, o = 0x0, n = 0, a = 0x0, h = 0}, {i = 0, u = 0, f = 0, s = 0xc00cc00000000000 <error: Cannot access memory at address 0xc00cc00000000000>, o = 0xc00cc00000000000, n = 0, a = 0xc00cc00000000000, h = 0}, {i = -1072955392, u = 3222011904, f = -1072955392, s = 0xc00cc00cc00c0000 <error: Cannot access memory at address 0xc00cc00cc00c0000>, o = 0xc00cc00cc00c0000, n = 3222011904, a = 0xc00cc00cc00c0000, h = -1072955392}, {i = 0, u = 0, f = 0, s = 0x0, o = 0x0, n = 0, a = 0x0, h = 0}, {i = 0, u = 0, f = 0, s = 0x0, o = 0x0, n = 0, a = 0x0, h = 0}, {i = 805515267, u = 805515267, f = 805515267, s = 0x3003300330033003 <error: Cannot access memory at address 0x3003300330033003>, o = 0x3003300330033003, n = 805515267, a = 0x3003300330033003, h = 805515267}, {i = 805515267, u = 805515267, f = 805515267, s = 0x3003300330033003 <error: Cannot access memory at address 0x3003300330033003>, o = 0x3003300330033003, n = 805515267, a = 0x3003300330033003, h = 805515267}, {i = -267390961, u = 4027576335, f = -267390961, s = 0xf00ff00ff00ff00f <error: Cannot access memory at address 0xf00ff00ff00ff00f>, o = 0xf00ff00ff00ff00f, n = 4027576335, a = 0xf00ff00ff00ff00f, h = -267390961}}
ap = {__stack = 0x7ffffff800, __gr_top = 0x7ffffff800, __vr_top = 0x7ffffff7d0, __gr_offs = -48, __vr_offs = -128}
#1 0x0000005555555114 in ivi_hmi_controller_UI_ready (ivi_hmi_controller=<optimized out>) at protocol/ivi-hmi-controller-client-protocol.h:165
No locals.
#2 UI_ready (controller=<optimized out>) at ../weston-9.0.0/clients/ivi-shell-user-interface.c:983
No locals.
#3 main (argc=<optimized out>, argv=<optimized out>) at ../weston-9.0.0/clients/ivi-shell-user-interface.c:1323
wlCtxCommon = {wlDisplay = 0x555557c020, wlRegistry = 0x555557d080, wlCompositor = 0x555557cb70, wlShm = 0x555557cc20, formats = 262147, wlSeat = 0x555557cc80, wlPointer = 0x0, wlTouch = 0x0, iviApplication = 0x555557cce0, hmiCtrl = 0x0, hmi_setting = 0x555557aba0, list_wlContextStruct = {prev = 0x555557ce30, next = 0x7ffffffa00}, enterSurface = 0x0, is_home_on = 0, cursor_theme = 0x0, cursors = 0x0, pointer_surface = 0x0, current_cursor = CURSOR_BOTTOM_LEFT, enter_serial = 0}
wlCtx_BackGround = 0x555557ce00
wlCtx_Panel = 0x555557ce50
wlCtx_Button_1 = {cmm = 0x7ffffffa50, wlSurface = 0x555557b140, wlBuffer = 0x555557b200, ctx_image = 0x555557afb0, data = 0x7ff6760000, id_surface = 1003, link = {prev = 0x7ffffff940, next = 0x555557ce80}}
wlCtx_Button_2 = {cmm = 0x7ffffffa50, wlSurface = 0x5555581fe0, wlBuffer = 0x55555820a0, ctx_image = 0x5555581e50, data = 0x7ff6757000, id_surface = 1004, link = {prev = 0x7ffffff980, next = 0x7ffffff900}}
wlCtx_Button_3 = {cmm = 0x7ffffffa50, wlSurface = 0x5555582400, wlBuffer = 0x55555824c0, ctx_image = 0x5555582270, data = 0x7ff674e000, id_surface = 1005, link = {prev = 0x7ffffff9c0, next = 0x7ffffff940}}
wlCtx_Button_4 = {cmm = 0x7ffffffa50, wlSurface = 0x5555582930, wlBuffer = 0x5555582c00, ctx_image = 0x55555827a0, data = 0x7ff6745000, id_surface = 1006, link = {prev = 0x7ffffffa40, next = 0x7ffffff980}}
wlCtx_HomeButton = {cmm = 0x7ffffffa50, wlSurface = 0x55555aa550, wlBuffer = 0x55555aa610, ctx_image = 0x55555aa3c0, data = 0x7ff673c000, id_surface = 1007, link = {prev = 0x7ffffffaa8, next = 0x7ffffffa40}}
wlCtx_WorkSpaceBackGround = {cmm = 0x7ffffffa50, wlSurface = 0x55555819f0, wlBuffer = 0x5555582ed0, ctx_image = 0x5555582cc0, data = 0x7ff7ff8000, id_surface = 2001, link = {prev = 0x7ffffffa00, next = 0x7ffffff9c0}}
launcher_wlCtxList = {prev = 0x7ffffff8c0, next = 0x7ffffff8c0}
ret = 0
hmi_setting = 0x555557aba0
pWlCtxSt = 0x0
i = <optimized out>
(gdb)
It looks like the hmi controller never registers itself so the resulting proxy is nullptr.
This is the weston.ini I use:
[core]
shell=ivi-shell.so
backend=fbdev-backend.so
#[output]
#name=DP1
#mode=1920x1080
[ivi-shell]
ivi-module=/usr/lib/weston/hmi-controller.so
ivi-shell-user-interface=/usr/libexec/weston-ivi-shell-user-interface
cursor-theme=default
cursor-size=32
base-layer-id=1000
workspace-background-layer-id=2000
workspace-layer-id=3000
application-layer-id=4000
background-image=/usr/share/weston/background.png
background-id=1001
panel-image=/usr/share/weston/panel.png
panel-id=1002
surface-id-offset=10
tiling-image=/usr/share/weston/tiling.png
tiling-id=1003
sidebyside-image=/usr/share/weston/sidebyside.png
sidebyside-id=1004
fullscreen-image=/usr/share/weston/fullscreen.png
fullscreen-id=1005
random-image=/usr/share/weston/random.png
random-id=1006
home-image=/usr/share/weston/home.png
home-id=1007
workspace-background-color=0x99000000
workspace-background-id=2001
[keyboard]
keymap_layout=de
Any ideas?
Regards
Edited by Edgar Neubauer