SoundCloud 'Discover' feature freezes my entire system #245

Closed
CrazyLemon opened this Issue Jul 29, 2016 · 12 comments

Comments

Projects
None yet
3 participants

CrazyLemon commented Jul 29, 2016

A workaround for this issue has landed n the master & 3.0.x git branches. Thanks for your bug report.

At first, this fix will be available with the next rebuilt of packages of the Nuvola Player 3.1 Rolling Releases. Later, the fix will be also included in the next bug-fix release of the Nuvola Player 3.0 Stable Releases. To get informed when Nuvola Player 3.0.4 Stable Release is released, follow Nuvola Player on Facebook, Google+ or Twitter or subscribe to the Nuvola Player Newsletter: weekly or monthly.

Update: This issue has been fixed in the Nuvola Player 3.0.4 Stable Releases (September 17th, 2016).


Original report:

So since introduction of 'Discover' feature in soundcloud and well in nuvola player as part of it it has been freezing my system entirly.
By freeze i mean no keyboard response, no mouse response (sometimes, sometimes there is).
As soon as i clicked on 'Discover' everything froze.
This has been happening on Ubuntu 16.04. I can't give you the exact nuvolaplayer version because it has been updated since then.

Since the update i was first 'warned' that i should use newer webkit version. Hurray i said to myself. No more freezes. I added the repo and updated the webkit version.
But freezes kept occuring. This time i could partially use Discover feature, but it was slow and graphics were (sometimes) weird.

It froze right now as i tried to run it from the terminal in hope i could get you some debugging info but nothing useful came out. Current info

nuvolaplayer3 --version
Nuvola Player 3 3.0.3
Revision 8e3fd13
WebKitGTK 2.12.2
libsoup 2.52.2
This is all output i could get when nuvolaplayer is running 'properly'

nuvolaplayer3
Runner: [WARNING GLib-GObject] g_object_set_property: construct property "local-storage-directory" for object 'WebKitWebContext' can't be set after construction
Worker: [DEBUG Nuvola] WebExtension.vala:220: Page 1 created for (null)
Worker: [DEBUG Nuvola] WebExtension.vala:291: Document loaded about:loading
Worker: [DEBUG Nuvola] WebExtension.vala:130: Window object cleared for 'https://soundcloud.com/stream'
Worker: [DEBUG Nuvola] WebExtension.vala:140: Init frame: https://soundcloud.com/stream, 0x55a0bc08d210, 0x55a0bb92eba0, 0x7fee48363140
Runner: [CRITICAL Json] json_node_get_parent: assertion 'JSON_NODE_IS_VALID (node)' failed
Runner: [CRITICAL Json] Application will not function properly.
Runner: [CRITICAL GLib] g_ptr_array_remove_index: assertion 'index_ < rarray->len' failed
Runner: [CRITICAL GLib] Application will not function properly.
Runner: [CRITICAL Json] json_node_get_parent: assertion 'JSON_NODE_IS_VALID (node)' failed
Runner: [CRITICAL Json] Application will not function properly.
Runner: [CRITICAL GLib] g_ptr_array_remove_index: assertion 'index_ < rarray->len' failed
Runner: [CRITICAL GLib] Application will not function properly.
Runner: https://a-v2.sndcdn.com/assets/app-90ef4-c7a52dc.js:34:7488: CONSOLE INFO You like to look under the hood? Why not help us build the engine? http://soundcloud.com/jobs
Worker: [DEBUG Nuvola] WebExtension.vala:291: Document loaded https://soundcloud.com/stream
Runner: https://www.googleadservices.com/pagead/conversion.js:20:210: CONSOLE ERROR Blocked a frame with origin "https://5485101.fls.doubleclick.net" from accessing a frame with origin "https://soundcloud.com". Protocols, domains, and ports must match.
Runner: https://www.googleadservices.com/pagead/conversion.js:20:258: CONSOLE ERROR Blocked a frame with origin "https://5485101.fls.doubleclick.net" from accessing a frame with origin "https://soundcloud.com". Protocols, domains, and ports must match.
Runner: https://www.googleadservices.com/pagead/conversion.js:20:210: CONSOLE ERROR Blocked a frame with origin "https://5485101.fls.doubleclick.net" from accessing a frame with origin "https://soundcloud.com". Protocols, domains, and ports must match.
https://www.googleadservices.com/pagead/conversion.js:20:258: CONSOLE ERROR Blocked a frame with origin "https://5485101.fls.doubleclick.net" from accessing a frame with origin "https://soundcloud.com". Protocols, domains, and ports must match.
Runner: [WARNING Nuvola] AppRunnerController.vala:705: Communication failed: Failed to read message size.
Runner: [WARNING Nuvola] AppRunnerController.vala:705: Communication failed: Failed to read from socket. Napaka med prejemanjem podatkov: Connection reset by peer
Runner: [WARNING Nuvola] AppRunnerController.vala:725: Communication failed: Failed to connect to socket '/tmp/libdiorite.nuvolaplayer3.soundcloud.webworker(crazylemon)'. Connection refused
Runner: [WARNING Nuvola] AppRunnerController.vala:705: Communication failed: Failed to connect to socket '/tmp/libdiorite.nuvolaplayer3.soundcloud.webworker(ccrazylemon)'. Connection refused
Runner: [WARNING Nuvola] AppRunnerController.vala:705: Communication failed: Failed to connect to socket '/tmp/libdiorite.nuvolaplayer3.soundcloud.webworker(crazylemon)'. Connection refused
Runner: [WARNING Nuvola] AppRunnerController.vala:725: Communication failed: Failed to connect to socket '/tmp/libdiorite.nuvolaplayer3.soundcloud.webworker(crazylemon)'. Connection refused
Runner: [WARNING Nuvola] AppRunnerController.vala:705: Communication failed: Failed to connect to socket '/tmp/libdiorite.nuvolaplayer3.soundcloud.webworker(crazylemon)'. Connection refused
Runner: [WARNING Nuvola] AppRunnerController.vala:705: Communication failed: Failed to connect to socket '/tmp/libdiorite.nuvolaplayer3.soundcloud.webworker(crazylemon)'. Connection refused
Runner: [WARNING Nuvola] AppRunnerController.vala:725: Communication failed: Failed to connect to socket '/tmp/libdiorite.nuvolaplayer3.soundcloud.webworker(crazylemon)'. Connection refused
Worker: [DEBUG Nuvola] WebExtension.vala:220: Page 1 created for (null)
Worker: [CRITICAL Nuvola] nuvola_js_executor_call_function: assertion 'self != NULL' failed
Worker: [CRITICAL Nuvola] Application will not function properly.
Worker: [DEBUG Nuvola] WebExtension.vala:130: Window object cleared for 'https://soundcloud.com/stream'
Worker: [DEBUG Nuvola] WebExtension.vala:140: Init frame: https://soundcloud.com/stream, 0x561decb0b500, 0x561decb31920, 0x7fbd29bdf140
Worker: [CRITICAL GLib] g_hash_table_insert_internal: assertion 'hash_table != NULL' failed
Worker: [CRITICAL GLib] Application will not function properly.
Worker: [CRITICAL Nuvola] nuvola_js_api_inject: assertion 'self != NULL' failed
Worker: [CRITICAL Nuvola] Application will not function properly.
Worker: [CRITICAL Nuvola] nuvola_js_api_integrate: assertion 'self != NULL' failed
Worker: [CRITICAL Nuvola] Application will not function properly.
Worker: [CRITICAL Nuvola] nuvola_js_executor_call_function: assertion 'self != NULL' failed
Worker: [CRITICAL Nuvola] Application will not function properly.
Worker: [CRITICAL Nuvola] nuvola_js_executor_call_function: assertion 'self != NULL' failed
Worker: [CRITICAL Nuvola] Application will not function properly.

Owner

fenryxo commented Aug 7, 2016

Hello @CrazyLemon. Thanks for taking the time to report this issue. Which graphic card and driver do you use?

CrazyLemon commented Aug 7, 2016

*-display
description: VGA compatible controller
product: BeaverCreek [Radeon HD 6530D]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 1
bus info: pci@0000:00:01.0
version: 00
width: 32 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list rom
configuration: driver=radeon latency=0

In short I'm using an APU so the integrated card is Radeon HD 6530D and the driver is the open source one - radeon.

One offtopic note... i keep getting white screen on the normal 'Stream' too. Debugging says something about unable to connect to a socket.. should i open a new issue or is this the same sympthome?

Owner

fenryxo commented Aug 7, 2016

unable to connect to a socket

That means that the web worker process crashed and it is not possible to communicate with it.

should i open a new issue or is this the same sympthome?

It's the same.

Is the freeze/crash of Soundcloud web page reproducible in WebKitGTK MiniBrowser?.

CrazyLemon commented Aug 7, 2016

img_20160807_163748

So a bit of explanation of the image. I took the image because the system froze..again.
First few bits and pieces are from Stream browsing around.
First message is
"radeon: Not enough memory for command submission"
the second and third are
"Error sending IPC message: Conn" - presumably Connection reset by peer and
"Error sending IPC message: Broken pipe"
after that ^T i started using Discover and got weird graphic issues with that horizontal scroll hence the radeon message (same message as the first one).
And then my system froze. SSH was still responsive, mouse was responsive untill i killed minibrowser.
Webkitprocess was 'defunct'ed.
p.s. when this thing happens reboot doesn't help. The only thing that helps is hard reset.

Owner

fenryxo commented Aug 8, 2016

Well, the issue goes pretty deep. Since the issue is reproducible in the WebKitGTK MiniBrowser, I believe there is a bug in WebKitGTK (or deeper in the graphics stack) and not in Nuvola Player. Could you report the issue upstream to the WebKit bug tracker and post link here?

clopez commented Aug 11, 2016

Can you try this?

  1. Close all nuvolaplayer3 instances.
  2. Open a terminal and type:
    export WEBKIT_DISABLE_COMPOSITING_MODE=1
    nuvolaplayer3

Questions:

  1. Is the issue still reproducible after exporting that environment variable?
  2. Can you post the output of the following command from a terminal?:
    # install package mesa-utils
    glxinfo

CrazyLemon commented Aug 11, 2016

@clopez thanks for taking a look at this
Answers:

  1. It is not. No freeze at all.
  2. Sure -> https://paste.ubuntu.com/23047340/
  3. The only suspicious thing is maybe this line in dmesg

[ 1278.071809] traps: WebKitWebProces[4953] general protection ip:7fbb09361414 sp:7ffffc412b10 error:0 in libjavascriptcoregtk-4.0.so.18.3.10[7fbb08b99000+d46000]
[ 1667.724908] traps: WebKitWebProces[8470] general protection ip:7f3eb2d44414 sp:7ffc354f97b0 error:0 in libjavascriptcoregtk-4.0.so.18.3.10[7f3eb257c000+d46000]

@fenryxo
I still think there's something wrong with the soundcloud part of nuvolaplayer3.
Lots of criticals and warnings.
Criticals like

Worker: [CRITICAL Nuvola] nuvola_js_executor_call_function: assertion 'self != NULL' failed
Worker: [CRITICAL Nuvola] Application will not function properly.

in thousands of lines.

A few

Worker: [CRITICAL GLib] g_hash_table_insert_internal: assertion 'hash_table != NULL' failed
Worker: [CRITICAL GLib] Application will not function properly.

and

Runner: [WARNING Nuvola] AppRunnerController.vala:705: Communication failed: Failed to connect to socket '/tmp/libdiorite.nuvolaplayer3.soundcloud.webworker(user)'. Connection refused

When ^ happens the results is usually white screen on the player untill i hit refresh. After refresh i get those criticals. Which keep repeating after X seconds, mouse movements, mouse clicks and so on.

clopez commented Aug 12, 2016

I think this may be the WebKitGTK+ bug https://bugs.webkit.org/show_bug.cgi?id=126122

To confirm that, can you install the epiphany browser (GNOME Web), and try loading this test page (warning, it may crash your computer).

https://people.igalia.com/clopez/wkbug/126122/rnyc/

If it crashes or you see a huge amount of memory usage by the WebKitWebProcess process, then its the same issue.

The workaround for now is to disable accelerated/compositing mode by exporting that environment variable.

On the next stable release (2.14) of WebKitGTK+ we are switching to a new threaded compositor that is believed to be free of this bug. The current unstable release (2.13.4) is already using this new threaded compositor by default, just in case you want to test it.

CrazyLemon commented Aug 12, 2016

Yup that link definitely crashed my pc.. and this time no ssh!

My suggestion is that you edit your comment and delete that link so people won't go crashing their computers :)
Do you guys provide a PPA for your releases so i can test it?

@fenryxo should i/you/we close this one?

clopez commented Aug 12, 2016

We don't provide PPAs, sorry. Only source tarballs.

That said, probably the best workaround now for you is to wrap nuvolaplayer3 with a shell script that does an export WEBKIT_DISABLE_COMPOSITING_MODE=1 and then calls the real nuvolaplayer3.

Another idea, is that maybe nuvolaplayer3 itself can do this via a setenv() syscall when the webkitgtk version is < 2.13.4. Check https://webkitgtk.org/reference/webkit2gtk/stable/webkit2gtk-4.0-WebKitVersion.html

fenryxo added a commit that referenced this issue Aug 14, 2016

Disable compositing mode in WebKitGTK < 2.13.4
Some websites may crash system with it:
https://bugs.webkit.org/show_bug.cgi?id=126122

Note that WEBKIT_FORCE_COMPOSITING_MODE is honoured since WebKitGTK
2.10.5: https://trac.webkit.org/wiki/EnvironmentVariables

Issue: tiliado/nuvolaruntime#245

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>

fenryxo added a commit that referenced this issue Aug 14, 2016

Disable compositing mode in WebKitGTK < 2.13.4
Some websites may crash system with it:
https://bugs.webkit.org/show_bug.cgi?id=126122

Note that WEBKIT_FORCE_COMPOSITING_MODE is honoured since WebKitGTK
2.10.5: https://trac.webkit.org/wiki/EnvironmentVariables

Issue: tiliado/nuvolaruntime#245

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
Owner

fenryxo commented Aug 14, 2016

A workaround for this issue has landed n the master & 3.0.x git branches. Thanks for your bug report.

At first, this fix will be available with the next rebuilt of packages of the Nuvola Player 3.1 Rolling Releases. Later, the fix will be also included in the next bug-fix release of the Nuvola Player 3.0 Stable Releases. To get informed when Nuvola Player 3.0.4 Stable Release is released, follow Nuvola Player on Facebook, Google+ or Twitter or subscribe to the Nuvola Player Newsletter: weekly or monthly.


Jiri Janousek, Nuvola Player developer • My work on Nuvola Player and user support are funded by Nuvola Patrons. ❤ Make a donation to keep the project going. Thank you. https://tiliado.eu/nuvolaplayer/funding/

@fenryxo fenryxo added this to the 3.0.4 milestone Aug 14, 2016

fenryxo added a commit that referenced this issue Sep 18, 2016

Release 3.0.4 - September 17th, 2016
This is a bug fix release addressing following issues:

  * A crash under Wayland session was fixed (GDK_BACKEND set to x11).
    Issue: tiliado/nuvolaruntime#181
  * The accelerated compositing mode is disabled with WebKitGTK < 2.13.4
    due to a WebKitGTK+ bug that may crash systems with certain graphic
    cards.
    Upstream: https://bugs.webkit.org/show_bug.cgi?id=126122
    Issue: tiliado/nuvolaruntime#245
  * A non-functional local-storage-directory setting was removed as it
    produced a console warning.
  * The design of the Welcome screen was improved.
  * It is possible to disable media keys in the Preferences dialog.
    Issue: tiliado/nuvolaruntime#237

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
Owner

fenryxo commented Sep 18, 2016

Update: This issue has been fixed in the Nuvola Player 3.0.4 Stable Releases (September 17th, 2016).

@fenryxo fenryxo closed this Sep 18, 2016

@wafflebot wafflebot bot removed the in progress label Sep 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment