After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 788627 - Crash in gnome-shell blur_pixels(): failed to allocate 18446744072098939136 bytes
Crash in gnome-shell blur_pixels(): failed to allocate 18446744072098939136 b...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.26.x
Other Linux
: Normal major
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2017-10-07 05:24 UTC by Vic Luo
Modified: 2018-04-19 05:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backtrace (9.52 KB, text/x-log)
2017-10-07 05:24 UTC, Vic Luo
  Details
private: Avoid unnecessary conversions in shadow computation (914 bytes, patch)
2017-10-07 08:30 UTC, Florian Müllner
committed Details | Review
Stack trace (41.12 KB, text/plain)
2017-10-27 10:40 UTC, Michael Thayer
  Details
private: Avoid unnecessary conversions in shadow computation (914 bytes, patch)
2018-02-05 16:10 UTC, Marco Trevisan (Treviño)
committed Details | Review

Description Vic Luo 2017-10-07 05:24:34 UTC
Created attachment 361085 [details]
backtrace

Overview: Occasional crash in gnome-shell blur_pixels() when launching an old-version Qt application compiled against gnome-3.24: failed to allocate 18446744072098939136 bytes

Steps to Reproduce: Compile https://github.com/archlinuxcn/repo/tree/master/qsanguoshav2-git against gnome-3.24, then launch it in gnome-shell 3.26 environment. 


Actual Results: gnome-shell crashes

Expected Results: No crash

Build Date & Hardware: Arch Linux amd64, gnome-shell 3.26.1-1, glib2 2.54.1-1, 2017/10/07 UTC+8

Additional Builds and Platforms: Does not happen on gnome-shell 3.24


Additional Information: Recompiling application seems to have fixed this issue for me
Comment 1 Florian Müllner 2017-10-07 08:27:28 UTC
For some reason we are trying to create a gigantic texture for a blur of 33,554,432 pixels. It doesn't look like an issue with the icon we create a shadow for, as its dimensions of 16x16 pixels are completely sane.

Can you provide the CSS of the extension that adds/removes the "panel-effect-transparency" class?
Comment 2 Florian Müllner 2017-10-07 08:30:52 UTC
Created attachment 361087 [details] [review]
private: Avoid unnecessary conversions in shadow computation

The type was changed from double to float for no apparent reason
when moving code in commit 5060081db5f.

Note that this is simply something I stumbled upon now, it's not a fix for the crash.
Comment 3 Vic Luo 2017-10-07 15:10:00 UTC
(In reply to Florian Müllner from comment #1)
> For some reason we are trying to create a gigantic texture for a blur of
> 33,554,432 pixels. It doesn't look like an issue with the icon we create a
> shadow for, as its dimensions of 16x16 pixels are completely sane.
> 
> Can you provide the CSS of the extension that adds/removes the
> "panel-effect-transparency" class?

I reproduced this bug on my recompiled version of the application. "panel-effect-transparency" is actually a class used by Dynamic Panel Transparency extension at https://github.com/rockon999/dynamic-panel-transparency/blob/master/dynamic-panel-transparency%40rockon999.github.io/stylesheet.css
Comment 4 Vic Luo 2017-10-07 16:14:26 UTC
Reproduced this bug with UB sanitizer on both gnome-shell and glib2. No UB reported.
Comment 5 Florian Müllner 2017-10-07 17:41:48 UTC
Mmh, nothing suspicious there - are you using a custom theme maybe?
Comment 6 Vic Luo 2017-10-07 17:51:10 UTC
(In reply to Florian Müllner from comment #5)
> Mmh, nothing suspicious there - are you using a custom theme maybe?

I'm using adapta-gtk-theme(https://github.com/adapta-project/adapta-gtk-theme)
Comment 7 Florian Müllner 2017-10-07 17:59:52 UTC
Sorry, I meant for gnome-shell (via the user-themes extension or similar mechanisms)
Comment 8 Vic Luo 2017-10-08 03:40:09 UTC
(In reply to Florian Müllner from comment #7)
> Sorry, I meant for gnome-shell (via the user-themes extension or similar
> mechanisms)

Using Adapta shell theme in adapta-gtk-theme project(https://github.com/adapta-project/adapta-gtk-theme/tree/master/shell). 

Version: community/adapta-gtk-theme 3.91.0.150-1(out-of-date). Source: https://github.com/adapta-project/adapta-gtk-theme/tree/3.91.0.1
Comment 9 Florian Müllner 2017-10-08 08:03:32 UTC
This looks odd:
https://github.com/adapta-project/adapta-gtk-theme/blob/master/shell/sass/gnome-shell/3.26/_common.scss#L1128

What is the CSS that is generated from it? Also: Can you reproduce the crash if you turn off the user-themes extension?
Comment 10 Vic Luo 2017-10-08 12:18:16 UTC
(In reply to Florian Müllner from comment #9)
> This looks odd:
> https://github.com/adapta-project/adapta-gtk-theme/blob/master/shell/sass/
> gnome-shell/3.26/_common.scss#L1128
> 
> What is the CSS that is generated from it? Also: Can you reproduce the crash
> if you turn off the user-themes extension?

https://gist.github.com/htfy96/794248607c2cbe507d5257af54e54bf5#file-gnome-shell-css-L412
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22); 

However, this bug can be reproduced even when user theme extension is disabled, so it is possibly unrelated to user theme.

In addition, this bug could be reproduced on any application at random following these steps:
- Close all windows, notice that top bar becomes transparent
- Launch a maximized and huge application that loads very slowly. Before the window appears, click datetime on topbar very quickly, then at ~1/5 chance gnome-shell will crash with above log.
Comment 11 Vic Luo 2017-10-17 13:21:13 UTC
Crash happened on VirtualBox, nautilus, and qsanguoshav2-git in these days. All with the same message.
Comment 12 Marco Trevisan (Treviño) 2017-10-18 10:36:43 UTC
I'm pretty sure that the patch I've proposed for https://bugzilla.gnome.org/show_bug.cgi?id=788908 also cover this issue.
Comment 13 Michael Thayer 2017-10-27 10:38:26 UTC
I had this recently on Ubuntu 17.10.  I was able to catch and unpack the automated bug report, so I have a core for it locally.  I will upload the stack trace.  I can add any missing symbols which may be relevant and re-extract the stack trace, as well as look at locals, but of course the symbols will match less and less well as time goes by and the packages are updated.
Comment 14 Michael Thayer 2017-10-27 10:40:51 UTC
Created attachment 362395 [details]
Stack trace
Comment 15 Michael Thayer 2017-10-27 10:41:46 UTC
Triggered by opening and closing my laptop lid several times in quick succession, while trying to reproduce other bugs I had observed on my system.  My interpretation is that an event (presumably the closure in frame 12, thread 1) is created when the lid is opened and the display appears which points to memory objects which no longer exist by the time the event is processed.  Might be wrong, as I don't know the code.
Comment 16 Marco Trevisan (Treviño) 2017-12-15 21:51:31 UTC

*** This bug has been marked as a duplicate of bug 788908 ***
Comment 17 Jonas Ådahl 2018-01-31 06:56:11 UTC
Review of attachment 361087 [details] [review]:

This fly-by-fix should land I guess
Comment 18 Marco Trevisan (Treviño) 2018-02-05 16:10:08 UTC
The following fix has been pushed:
commit 2d79ab6, private: Avoid unnecessary conversions in shadow computation
Comment 19 Marco Trevisan (Treviño) 2018-02-05 16:10:18 UTC
Created attachment 367921 [details] [review]
private: Avoid unnecessary conversions in shadow computation

The type was changed from double to float for no apparent reason
when moving code in commit 5060081db5f.
Comment 20 Daniel van Vugt 2018-04-19 05:45:29 UTC
Also fixed in Ubuntu 18.04:
https://launchpad.net/bugs/1723378