Bug 461755 - KWin hard freeze when opening a Brave browser Tor window from the command line
Summary: KWin hard freeze when opening a Brave browser Tor window from the command line
Status: RESOLVED DUPLICATE of bug 442846
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.26.0
Platform: openSUSE Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-13 06:44 UTC by phrxmd
Modified: 2022-11-16 09:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace with KWin in frozen state after brave-browser --tor hangs (44.20 KB, text/plain)
2022-11-15 09:21 UTC, phrxmd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description phrxmd 2022-11-13 06:44:22 UTC
SUMMARY
KWin freezes when starting up Brave browser from the command line with the `--tor` option. The mouse pointer locks up. Can be resolved only with a hard reboot. 
Opening a private window with Tor from within Brave works normally.

This is with Brave 1.44.112-1 in the KWin Wayland session

STEPS TO REPRODUCE
1. Start Brave from the command line with `brave-browser --tor`.

Unfortunately there is no --verbose output before the lockup.

OBSERVED RESULT
KWin locks up completely.

EXPECTED RESULT
The window should open normally, or it should fail gracefully.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20221015
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 6.0.1-1-default (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: LENOVO
Product Name: 20LDCTO1WW
System Version: ThinkPad X1 Yoga 3rd

ADDITIONAL INFORMATION
Comment 1 Zamundaaa 2022-11-13 17:15:52 UTC
Can't reproduce. Can you ssh in from another system and check where KWin hangs?
Comment 2 Nate Graham 2022-11-14 21:43:52 UTC
.
Comment 3 phrxmd 2022-11-15 09:21:46 UTC
Created attachment 153760 [details]
Backtrace with KWin in frozen state after brave-browser --tor hangs

Here is a backtrace. I'm unsure whether I got it by the correct procedure - I connect via ssh, attach GDB to the kwin_wayland process by issuing `sudo gdb -pid $(pidof kwin_wayland)`, then I set the logging file and `set logging enabled on` and `continue`. When KWin freezes, there is no signal issued, so I stop KWin manually by issuing SIGINT from GDB with Ctrl+C, then I get the backtrace with `bt full`.

I noticed that KWin seems to be doing something (just not reacting to mouse events), so I've done the Ctrl+C - `bt full` - `continue` cycle a few times in the backtrace.

Also when I detach GDB again, I can kill the brave processes from SSH which frees up KWin again, after which I get a bunch of output in the console where I started Brave:

> brave-browser --tor
Nov 15 10:04:15.063 [notice] Tor 0.4.7.10 running on Linux with Libevent 2.1.12-stable, OpenSSL 1.1.1s, Zlib 1.2.13, Liblzma N/A, Libzstd N/A and Glibc 2.35 as libc.
Nov 15 10:04:15.063 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
Nov 15 10:04:15.063 [notice] Read configuration file "/home/reichmuth/.config/BraveSoftware/Brave-Browser/biahpgbdmdkfgndcmfiipgcebobojjkp/1.0.29/tor-torrc".
Nov 15 10:04:15.063 [notice] Read configuration file "/home/reichmuth/.config/BraveSoftware/Brave-Browser/biahpgbdmdkfgndcmfiipgcebobojjkp/1.0.29/tor-torrc".
Nov 15 10:04:15.066 [notice] Opening Socks listener on 127.0.0.1:0
Nov 15 10:04:15.066 [notice] Socks listener listening on port 36655.
Nov 15 10:04:15.066 [notice] Opened Socks listener connection (ready) on 127.0.0.1:36655
Nov 15 10:04:15.066 [notice] Opening Control listener on 127.0.0.1:0
Nov 15 10:04:15.066 [notice] Control listener listening on port 41319.
Nov 15 10:04:15.066 [notice] Opened Control listener connection (ready) on 127.0.0.1:41319
Nov 15 10:04:15.000 [notice] Bootstrapped 0% (starting): Starting
[3630:3630:1115/100415.305621:ERROR:CONSOLE(1)] "This document requires 'TrustedScript' assignment.", source: chrome://newtab/private_new_tab.bundle.js (1)
Nov 15 10:04:15.000 [notice] Starting with guard context "default"
[3630:3630:1115/100415.781030:ERROR:CONSOLE(1)] "This document requires 'TrustedScript' assignment.", source: chrome://newtab/private_new_tab.bundle.js (1)
Nov 15 10:04:16.000 [notice] Bootstrapped 5% (conn): Connecting to a relay
Nov 15 10:04:16.000 [notice] Bootstrapped 10% (conn_done): Connected to a relay
Nov 15 10:04:17.000 [notice] New control connection opened from 127.0.0.1.
Nov 15 10:04:36.000 [notice] Bootstrapped 14% (handshake): Handshaking with a relay
Nov 15 10:04:36.000 [notice] Bootstrapped 15% (handshake_done): Handshake with a relay done
Nov 15 10:04:36.000 [notice] Bootstrapped 75% (enough_dirinfo): Loaded enough directory info to build circuits
Nov 15 10:04:36.000 [notice] Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits
Nov 15 10:04:36.000 [notice] Bootstrapped 95% (circuit_create): Establishing a Tor circuit
Nov 15 10:04:37.000 [notice] Bootstrapped 100% (done): Done
[3630:3630:1115/100444.657464:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=512
[3846:3846:1115/100444.814583:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[3846:3846:1115/100444.816511:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[3846:3846:1115/100444.897497:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
[3630:3630:1115/100529.845188:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=512
[3889:3889:1115/100530.029862:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[3889:3889:1115/100530.030710:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[1115/100600.065734:ERROR:process_memory_linux.cc(49)] pread64: Input/output error (5)
[3630:3630:1115/100600.075494:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=512
[3728:8:1115/100600.145970:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[3728:8:1115/100600.146316:ERROR:command_buffer_proxy_impl.cc(128)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[1]    3624 terminated  brave-browser --tor
Comment 4 Zamundaaa 2022-11-15 14:16:43 UTC
That looks like KWin is stuck in some loop processing xcb events.
Comment 5 Vlad Zahorodnii 2022-11-16 09:45:49 UTC

*** This bug has been marked as a duplicate of bug 442846 ***