Bug: Firefox becomes unresponsive on wayland-sway, main process at 100% CPU
Status: RESOLVED
Priority: --
Resolution: DUPLICATE
Created: 2021-07-21 17:13:24+00:00
Resolved: 2021-07-21 21:41:01+00:00

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0

Steps to reproduce:

* Firefox Nightly installed on sway (wayland)
* Followed instructions to get using wayland renderer, so have some environment variables set and some about:config changes
* Updated to latest firefox nightly
* Firefox hangs after unspecified interactions.


Actual results:

Firefox hangs, looks like it is in `nsRetrievalContextWayland::GetClipboardData(char const*, int, unsigned int*)`

firefox_nightly» sudo gdb -batch -ex bt -p 36395
...
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
__libc_read (nbytes=1024, buf=0x7f50b9021000, fd=131) at ../sysdeps/unix/sysv/linux/read.c:26
26	../sysdeps/unix/sysv/linux/read.c: No such file or directory.
#0  __libc_read (nbytes=1024, buf=0x7f50b9021000, fd=131) at ../sysdeps/unix/sysv/linux/read.c:26
#1  __libc_read (fd=131, buf=0x7f50b9021000, nbytes=1024) at ../sysdeps/unix/sysv/linux/read.c:24
#2  0x00007f55c8dbe126 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f55c8d640b7 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f55c8d65573 in g_io_channel_read_to_end () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f55c17224d2 in DataOffer::GetDataInternal(char const*, unsigned int*) () at /opt/firefox_nightly/libxul.so
#6  0x00007f55c1723a4b in nsRetrievalContextWayland::GetClipboardData(char const*, int, unsigned int*) () at /opt/firefox_nightly/libxul.so
#7  0x00007f55c1723cbe in nsRetrievalContextWayland::GetClipboardText(int) () at /opt/firefox_nightly/libxul.so
#8  0x00007f55c171f9d1 in nsClipboard::GetData(nsITransferable*, int) () at /opt/firefox_nightly/libxul.so
#9  0x00007f55c1504c8c in mozilla::dom::ContentParent::RecvGetClipboard(nsTArray<nsTString<char> >&&, int const&, mozilla::dom::IPCDataTransfer*) () at /opt/firefox_nightly/libxul.so
#10 0x00007f55bff8edfb in mozilla::dom::PContentParent::OnMessageReceived(IPC::Message const&, IPC::Message*&) () at /opt/firefox_nightly/libxul.so
#11 0x00007f55c36074f0 in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) () at /opt/firefox_nightly/libxul.so
#12 0x00007f55c35b4048 in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) () at /opt/firefox_nightly/libxul.so
#13 0x00007f55c35bbe93 in nsThread::ProcessNextEvent(bool, bool*) () at /opt/firefox_nightly/libxul.so
#14 0x00007f55c36092b1 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) () at /opt/firefox_nightly/libxul.so
#15 0x00007f55c40f3fdf in MessageLoop::Run() () at /opt/firefox_nightly/libxul.so
#16 0x00007f55c47d5319 in nsBaseAppShell::Run() () at /opt/firefox_nightly/libxul.so
#17 0x00007f55c2380205 in nsAppStartup::Run() () at /opt/firefox_nightly/libxul.so
#18 0x00007f55c23f9ca2 in XREMain::XRE_mainRun() () at /opt/firefox_nightly/libxul.so
#19 0x00007f55c23fa765 in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) () at /opt/firefox_nightly/libxul.so
#20 0x00007f55c23faac6 in XRE_main(int, char**, mozilla::BootstrapConfig const&) () at /opt/firefox_nightly/libxul.so
#21 0x00005648fc0139c8 in main ()
[Inferior 1 (process 36395) detached]