Bug: [wayland] thunderbird crashes with "error marshalling arguments for set_surface"
Status: RESOLVED
Priority: --
Resolution: WORKSFORME
Created: 2023-03-03 10:22:04+00:00
Resolved: 2023-07-19 05:06:50+00:00

Steps to reproduce:

Tried thunderbird  as:
MOZ_ENABLE_WAYLAND=1 thunderbird


Actual results:

After clicking here and there (in menu and around), TB crashed.

> #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44
> #1  0x00007f7c92895503 in __pthread_kill_internal (signo=11, threadid=<optimized out>) at pthread_kill.c:78
> #2  0x00007f7c92842e16 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26
> #3  0x00007f7c8b9731fe in nsProfileLock::FatalSignalHandler(int, siginfo_t*, void*) () at /usr/src/debug/thunderbird-102.8.0/toolkit/profile/nsProfileLock.cpp:174
> #4  0x00007f7c92842ee0 in <signal handler called> () at /lib64/libc.so.6
> #5  MOZ_Crash () at /usr/src/debug/obj/dist/include/mozilla/Assertions.h:261
> #6  WlCrashHandler() () at /usr/src/debug/thunderbird-102.8.0/widget/gtk/nsWaylandDisplay.cpp:336
> #7  0x00007f7c910a087a in wl_log (fmt=fmt@entry=0x7f7c910a6da0 "error marshalling arguments for %s (signature %s): null value passed for arg %i\n")
>     at ../src/wayland-util.c:449
> #8  0x00007f7c910a4355 in wl_closure_marshal (message=0x7f7c923e41d0, args=0x7ffea81e7e60, opcode=<optimized out>, sender=0x7f7c5cdd7e70)
>     at ../src/connection.c:666

(gdb) l
661
662             return closure;
663
664     err_null:
665             wl_closure_destroy(closure);
666             wl_log("error marshalling arguments for %s (signature %s): "
667                    "null value passed for arg %i\n", message->name,
668                    message->signature, i);
669             errno = EINVAL;
670             return NULL;
(gdb) p *message
$19 = {name = 0x7f7c923b5cb2 "set_surface", signature = 0x7f7c923b8c86 "o", types = 0x7f7c923e9390}
(gdb) p i
$20 = 0
(gdb) p *sender->interface
$26 = {name = 0x7f7c923b5cc5 "xdg_activation_token_v1", version = 1, method_count = 5, methods = 0x7f7c923e41a0, event_count = 1, events = 0x7f7c923e4180}
(gdb) p *args
$28 = {i = 0, u = 0, f = 0, s = 0x0, o = 0x0, n = 0, a = 0x0, h = 0}

> #9  wl_proxy_marshal_array_flags
>     (proxy=proxy@entry=0x7f7c5cdd7e70, opcode=opcode@entry=2, interface=interface@entry=0x0, version=version@entry=1, flags=flags@entry=0, args=args@entry=0x7ffea81e7e60) at ../src/wayland-client.c:849
> #10 0x00007f7c910a4e05 in wl_proxy_marshal_flags (proxy=0x7f7c5cdd7e70, opcode=2, interface=0x0, version=1, flags=0) at ../src/wayland-client.c:791
> #11 0x00007f7c9238d83c in gdk_wayland_window_focus (window=<optimized out>, timestamp=<optimized out>)
>     at wayland/../../gdk/wayland/xdg-activation-v1-client-protocol.h:381

(gdb) p opcode
$10 = 2
> #12 0x00007f7c8aa691e3 in SetUserTimeAndStartupIDForActivatedWindow () at /usr/src/debug/thunderbird-102.8.0/widget/gtk/nsWindow.cpp:2770
> #13 nsWindow::NativeShow(bool) () at /usr/src/debug/thunderbird-102.8.0/widget/gtk/nsWindow.cpp:6214
> #14 0x00007f7c8a9f297d in nsView::DoResetWidgetBounds(bool, bool) () at /usr/src/debug/thunderbird-102.8.0/view/nsView.cpp:362
> #15 nsView::ResetWidgetBounds(bool, bool) () at /usr/src/debug/thunderbird-102.8.0/view/nsView.cpp:189
> #16 0x00007f7c8a9f2e45 in nsViewManager::ProcessPendingUpdatesForView(nsView*, bool) () at /usr/src/debug/thunderbird-102.8.0/view/nsViewManager.cpp:361
> #17 0x00007f7c8a9f32a1 in nsViewManager::ProcessPendingUpdates() () at /usr/src/debug/thunderbird-102.8.0/view/nsViewManager.cpp:948
> #18 nsViewManager::ProcessPendingUpdates() () at /usr/src/debug/thunderbird-102.8.0/view/nsViewManager.cpp:934
> #19 0x00007f7c8abf5665 in nsRefreshDriver::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsRefreshDriver::IsExtraTick) ()
>     at /usr/src/debug/thunderbird-102.8.0/layout/base/nsRefreshDriver.cpp:2700
> #20 0x00007f7c8abf71b6 in mozilla::RefreshDriverTimer::TickDriver(nsRefreshDriver*, mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp)
>     () at /usr/src/debug/thunderbird-102.8.0/layout/base/nsRefreshDriver.cpp:368
> #21 mozilla::RefreshDriverTimer::TickRefreshDrivers(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver> >&) () at /usr/src/debug/thunderbird-102.8.0/layout/base/nsRefreshDriver.cpp:346
> #22 mozilla::RefreshDriverTimer::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) ()
>     at /usr/src/debug/thunderbird-102.8.0/layout/base/nsRefreshDriver.cpp:362
> #23 0x00007f7c8abf754c in mozilla::VsyncRefreshDriverTimer::RunRefreshDrivers(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) ()
>     at /usr/src/debug/thunderbird-102.8.0/layout/base/nsRefreshDriver.cpp:884
> #24 mozilla::VsyncRefreshDriverTimer::TickRefreshDriver(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) ()
>     at /usr/src/debug/thunderbird-102.8.0/layout/base/nsRefreshDriver.cpp:797
> #25 0x00007f7c8abf819e in mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsyncTimerOnMainThread() ()
>     at /usr/src/debug/thunderbird-102.8.0/layout/base/nsRefreshDriver.cpp:587
> #26 mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::VsyncEvent const&)::{lambda()#1}::operator()() const ()
>     at /usr/src/debug/thunderbird-102.8.0/layout/base/nsRefreshDriver.cpp:559
> #27 mozilla::detail::RunnableFunction<mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::VsyncEvent const&)::{lambda()#1}>::Run()
>     () at /usr/src/debug/obj/dist/include/nsThreadUtils.h:531
> #28 0x00007f7c8867737e in mozilla::RunnableTask::Run() () at /usr/src/debug/thunderbird-102.8.0/xpcom/threads/TaskController.cpp:475
> #29 0x00007f7c886cbabc in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) ()
>     at /usr/src/debug/thunderbird-102.8.0/xpcom/threads/TaskController.cpp:788
> #30 0x00007f7c886cc06b in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) ()
>     at /usr/src/debug/thunderbird-102.8.0/xpcom/threads/TaskController.cpp:620
> #31 mozilla::TaskController::ProcessPendingMTTask(bool) () at /usr/src/debug/thunderbird-102.8.0/xpcom/threads/TaskController.cpp:398
> #32 0x00007f7c886cc4c2 in operator() () at /usr/src/debug/thunderbird-102.8.0/xpcom/threads/TaskController.cpp:124
> #33 Run() () at /usr/src/debug/thunderbird-102.8.0/xpcom/threads/nsThreadUtils.h:531
> #34 0x00007f7c886ccfa8 in nsThread::ProcessNextEvent(bool, bool*) () at /usr/src/debug/thunderbird-102.8.0/xpcom/threads/nsThread.cpp:1180
> #35 0x00007f7c886a4e0b in NS_ProcessNextEvent(nsIThread*, bool) () at /usr/src/debug/thunderbird-102.8.0/xpcom/threads/nsThreadUtils.cpp:465
> #36 0x00007f7c88c38b32 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) () at /usr/src/debug/thunderbird-102.8.0/ipc/glue/MessagePump.cpp:85
> #37 0x00007f7c88c041de in MessageLoop::RunInternal() () at /usr/src/debug/thunderbird-102.8.0/ipc/chromium/src/base/message_loop.cc:380
> #38 MessageLoop::RunHandler() () at /usr/src/debug/thunderbird-102.8.0/ipc/chromium/src/base/message_loop.cc:373
> #39 MessageLoop::Run() () at /usr/src/debug/thunderbird-102.8.0/ipc/chromium/src/base/message_loop.cc:355
> #40 0x00007f7c8b929e8e in nsBaseAppShell::Run() () at /usr/src/debug/thunderbird-102.8.0/widget/nsBaseAppShell.cpp:137
> #41 nsAppStartup::Run() () at /usr/src/debug/thunderbird-102.8.0/toolkit/components/startup/nsAppStartup.cpp:295
> #42 0x00007f7c8b9d7dc7 in XREMain::XRE_mainRun() () at /usr/src/debug/thunderbird-102.8.0/toolkit/xre/nsAppRunner.cpp:5745
> #43 0x00007f7c8b9e4a9a in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) () at /usr/src/debug/thunderbird-102.8.0/toolkit/xre/nsAppRunner.cpp:5939
> #44 XRE_main(int, char**, mozilla::BootstrapConfig const&) () at /usr/src/debug/thunderbird-102.8.0/toolkit/xre/nsAppRunner.cpp:5995
> #45 0x000055a27202f76d in do_main() () at /usr/src/debug/thunderbird-102.8.0/comm/mail/app/nsMailApp.cpp:228
> #46 0x000055a272027a9f in main() () at /usr/src/debug/thunderbird-102.8.0/comm/mail/app/nsMailApp.cpp:368


Expected results:

No  crash.