Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 705682 - dev-libs/libsass-3.6.3 : Uses huge amounts of memory when building arc-theme and others
Summary: dev-libs/libsass-3.6.3 : Uses huge amounts of memory when building arc-theme ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrew Ammerlaan
URL: https://github.com/sass/libsass/issue...
Whiteboard:
Keywords: PullRequest
: 706082 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-01-17 17:34 UTC by Toralf Förster
Modified: 2021-05-21 14:05 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,17.36 KB, text/plain)
2020-01-17 17:34 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,232.73 KB, text/plain)
2020-01-17 17:34 UTC, Toralf Förster
Details
environment (environment,64.03 KB, text/plain)
2020-01-17 17:34 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,14.07 KB, application/x-bzip)
2020-01-17 17:34 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,2.88 KB, application/x-bzip)
2020-01-17 17:34 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,18.86 KB, application/x-bzip)
2020-01-17 17:34 UTC, Toralf Förster
Details
x11-themes:arc-theme-20190917:20200117-082202.log (x11-themes:arc-theme-20190917:20200117-082202.log,11.34 KB, text/plain)
2020-01-17 17:34 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-01-17 17:34:16 UTC
make[3]: *** [Makefile:552: gtk.css] Killed
make[3]: Leaving directory '/var/tmp/portage/x11-themes/arc-theme-20190917/work/arc-theme-20190917/common/gtk-3.0/3.20'
make[2]: *** [Makefile:429: all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/x11-themes/arc-theme-20190917/work/arc-theme-20190917/common/gtk-3.0'
make[1]: *** [Makefile:436: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/x11-themes/arc-theme-20190917/work/arc-theme-20190917/common'

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome_systemd-libressl-20200112-011640

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *

clang:
clang version 9.0.1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/9/bin
llvm:
9.0.1
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)

Available Rust versions:
  [1]   rust-1.40.0 *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.14.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Fri, 17 Jan 2020 07:46:08 +0000

emerge -qpvO x11-themes/arc-theme
[ebuild  N    ] x11-themes/arc-theme-20190917  USE="gtk2 gtk3 pre-rendered -cinnamon -gnome-shell -mate -xfce"
Comment 1 Toralf Förster gentoo-dev 2020-01-17 17:34:19 UTC
Created attachment 603608 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-01-17 17:34:22 UTC
Created attachment 603610 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-01-17 17:34:25 UTC
Created attachment 603612 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-01-17 17:34:28 UTC
Created attachment 603614 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-01-17 17:34:30 UTC
Created attachment 603616 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-01-17 17:34:34 UTC
Created attachment 603618 [details]
temp.tbz2
Comment 7 Toralf Förster gentoo-dev 2020-01-17 17:34:37 UTC
Created attachment 603620 [details]
x11-themes:arc-theme-20190917:20200117-082202.log
Comment 8 Toralf Förster gentoo-dev 2020-01-17 21:41:34 UTC
FWIW this failure is due to :

kern.log:Jan 17 09:31:32 mr-fox kernel: [213830.875102] sassc invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0

...
ern.log:Jan 17 09:31:32 mr-fox kernel: [213830.875206] Tasks state (memory values in pages):
kern.log:Jan 17 09:31:32 mr-fox kernel: [213830.875207] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
...
kern.log:Jan 17 09:31:32 mr-fox kernel: [213830.875243] [  31184]   250 31184  4079954  2073264 32604160  1986596             0 sassc
kern.log:Jan 17 09:31:32 mr-fox kernel: [213830.875244] oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),oom_memcg=/tinderbox-17.1_desktop_gnome_systemd-libressl-20200112-011640,task_memcg=/tinderbox-17.1_desktop_gnome_systemd-libressl-20200112-011640,task=sassc,pid=31184,uid=250
kern.log:Jan 17 09:31:32 mr-fox kernel: [213830.875251] Memory cgroup out of memory: Killed process 31184 (sassc) total-vm:16319816kB, anon-rss:8293056kB, file-rss:0kB, shmem-rss:0kB, UID:250 pgtables:31840kB oom_score_adj:0
kern.log:Jan 17 09:31:34 mr-fox kernel: [213832.056148] oom_reaper: reaped process 31184 (sassc), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Comment 9 Toralf Förster gentoo-dev 2020-01-17 21:42:38 UTC
and here's the CGROUP:

https://github.com/toralf/tinderbox/blob/master/bin/chr.sh#L54
Comment 10 James Le Cuirot gentoo-dev 2020-01-25 18:55:52 UTC
*** Bug 706082 has been marked as a duplicate of this bug. ***
Comment 11 James Le Cuirot gentoo-dev 2020-01-25 18:59:26 UTC
This is an upstream issue but there hasn't been any resolution yet. My suggestion would be to mask libsass 3.6.3 for the time being.
Comment 12 Andrew Ammerlaan gentoo-dev 2020-01-26 16:11:57 UTC
(In reply to James Le Cuirot from comment #11)
> This is an upstream issue but there hasn't been any resolution yet. My
> suggestion would be to mask libsass 3.6.3 for the time being.

I've just now made a PR to mask version 3.6.3. 

I'll keep any eye out for any new releases or patches that might fix this issue.
Comment 13 Larry the Git Cow gentoo-dev 2020-01-26 17:06:56 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab8aec36ca6d971ff1df405621ffd58572c0fdb0

commit ab8aec36ca6d971ff1df405621ffd58572c0fdb0
Author:     Andrew Ammerlaan <andrewammerlaan@riseup.net>
AuthorDate: 2020-01-26 16:01:11 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2020-01-26 17:05:53 +0000

    package.mask: mask dev-libs/libsass-3.6.3
    
    Uses huge amounts of memory
    Version 3.6.1 is the latest working version
    
    Bug: https://bugs.gentoo.org/705682
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
    Closes: https://github.com/gentoo/gentoo/pull/14461
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 profiles/package.mask | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 14 Larry the Git Cow gentoo-dev 2020-05-02 11:55:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=544628ea7b127d79c8fb1b0197ff61f228e1a587

commit 544628ea7b127d79c8fb1b0197ff61f228e1a587
Author:     Andrew Ammerlaan <andrewammerlaan@riseup.net>
AuthorDate: 2020-05-01 15:50:48 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2020-05-02 11:55:02 +0000

    dev-libs/libsass: cleanup old
    
    Closes: https://bugs.gentoo.org/705682
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 dev-libs/libsass/Manifest             |  1 -
 dev-libs/libsass/libsass-3.6.3.ebuild | 54 -----------------------------------
 2 files changed, 55 deletions(-)
Comment 15 Kobboi 2021-02-03 22:54:19 UTC
I was suffering from this before too. Now getting (with libsass/sassc-3.6.1)

[38/443] /usr/bin/sassc /var/tmp/portage/x11-themes/arc-theme-20210127/work/arc-theme-20210127/common/gnome-shell/3.38/sass/gnome-shell.scss common/gnome-shell/gnome-shell.css
FAILED: common/gnome-shell/gnome-shell.css 
/usr/bin/sassc /var/tmp/portage/x11-themes/arc-theme-20210127/work/arc-theme-20210127/common/gnome-shell/3.38/sass/gnome-shell.scss common/gnome-shell/gnome-shell.css
free(): invalid pointer
Comment 16 James Le Cuirot gentoo-dev 2021-02-03 23:05:00 UTC
Sorry but it works fine for me with sassc 3.6.0 and 3.6.1.
Comment 17 Kobboi 2021-02-03 23:10:20 UTC
Although this is probably going to require a new bug:

# coredumpctl  debug
           PID: 2716044 (sassc)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 6 (ABRT)
     Timestamp: Thu 2021-02-04 00:08:30 CET (2s ago)
  Command Line: /usr/bin/sassc /var/tmp/portage/x11-themes/arc-theme-20210127/work/arc-theme-20210127/common/gnome-shell/3.38/sass/gnome-shell-dark.scss common/gnome-shell/gnome-shell-dark.css
    Executable: /usr/bin/sassc
 Control Group: /user.slice/user-1000.slice/session-32.scope
          Unit: session-32.scope
         Slice: user-1000.slice
       Session: 32
     Owner UID: 1000 (christophe)
       Boot ID: 9f622a48943c48d399c4350b5277e287
    Machine ID: fcbc3e89032d2642d14b05e05b2a52f9
      Hostname: samsonov
       Storage: /var/lib/systemd/coredump/core.sassc.0.9f622a48943c48d399c4350b5277e287.2716044.1612393710000000.zst
       Message: Process 2716044 (sassc) of user 0 dumped core.

GNU gdb (Gentoo 10.1 vanilla) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/sassc...
Reading symbols from /usr/lib/debug//usr/bin/sassc.debug...
[New LWP 2716044]
Core was generated by `/usr/bin/sassc /var/tmp/portage/x11-themes/arc-theme-20210127/work/arc-theme-20'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
49	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x00007f9d62693536 in __GI_abort () at abort.c:79
#2  0x00007f9d626eb538 in __libc_message (action=action@entry=do_abort, 
    fmt=fmt@entry=0x7f9d627f457e "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#3  0x00007f9d626f2f3a in malloc_printerr (str=str@entry=0x7f9d627f2731 "free(): invalid pointer")
    at malloc.c:5389
#4  0x00007f9d626f4174 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0)
    at malloc.c:4201
#5  0x00007f9d629541b0 in __gnu_cxx::new_allocator<char>::deallocate (__t=<optimized out>, 
    __p=0x7fffa0826a00 "", this=0x7fffa08269f0)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/g++-v11/ext/new_allocator.h:126
#6  std::allocator_traits<std::allocator<char> >::deallocate (__n=<optimized out>, 
    __p=0x7fffa0826a00 "", __a=...)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/g++-v11/bits/alloc_traits.h:492
#7  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_destroy (
    __size=<optimized out>, this=0x7fffa08269f0)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/g++-v11/bits/basic_string.h:237
#8  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose (
    this=0x7fffa08269f0)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/g++-v11/bits/basic_string.h:232
#9  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string (
    this=0x7fffa08269f0, __in_chrg=<optimized out>)
    at /usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/g++-v11/bits/basic_string.h:658
#10 Sass::Importer::~Importer (this=0x7fffa08269b0, __in_chrg=<optimized out>) at file.hpp:70
#11 Sass::File_Context::parse (this=0x560db9ce2560) at context.cpp:604
#12 0x00007f9d62a60281 in Sass::sass_parse_block (compiler=0x560db9ce2c20) at sass_context.cpp:237
#13 sass_compiler_parse (compiler=0x560db9ce2c20) at sass_context.cpp:486
#14 sass_compiler_parse (compiler=0x560db9ce2c20) at sass_context.cpp:476
#15 0x00007f9d62a60869 in sass_compile_context (c_ctx=0x560db9ce2360, cpp_ctx=<optimized out>)
    at sass_context.cpp:374
#16 0x0000560db91c9cf6 in compile_file (options=options@entry=0x560db9ce22e0, 
    input_path=0x7fffa08286c5 "/var/tmp/portage/x11-themes/arc-theme-20210127/work/arc-theme-20210127/common/gnome-shell/3.38/sass/gnome-shell-dark.scss", 
    outfile=outfile@entry=0x7fffa082873f "common/gnome-shell/gnome-shell-dark.css") at sassc.c:158
#17 0x0000560db91c97ab in main (argc=<optimized out>, argv=0x7fffa0826d78) at sassc.c:370
Comment 18 Kobboi 2021-02-03 23:10:39 UTC
(In reply to James Le Cuirot from comment #16)
> Sorry but it works fine for me with sassc 3.6.0 and 3.6.1.

It does too on my home PC, it does not on my work PC.
Comment 19 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-05-21 07:57:58 UTC
The bug is hardly fixed, given the package is still masked.

I've bumped it to 3.6.5 and fixed the Python package to stop bundling the library and actually run tests.  However, I leave it to you to figure out if libsass is still affected.
Comment 20 Larry the Git Cow gentoo-dev 2021-05-21 14:02:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8ad3c1522d2e329abba38c711519792a69d3327

commit d8ad3c1522d2e329abba38c711519792a69d3327
Author:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
AuthorDate: 2021-05-21 14:02:23 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
CommitDate: 2021-05-21 14:02:23 +0000

    dev-libs/libsass: drop 3.6.4
    
    Closes: https://bugs.gentoo.org/705682
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>

 dev-libs/libsass/Manifest             |  1 -
 dev-libs/libsass/libsass-3.6.4.ebuild | 53 -----------------------------------
 2 files changed, 54 deletions(-)
Comment 21 Andrew Ammerlaan gentoo-dev 2021-05-21 14:05:28 UTC
(In reply to Michał Górny from comment #19)
> The bug is hardly fixed, given the package is still masked.
> 
> I've bumped it to 3.6.5 and fixed the Python package to stop bundling the
> library and actually run tests.  However, I leave it to you to figure out if
> libsass is still affected.

Thanks, just tested 3.6.5 and can confirm that the memory issues is fixed in this release. <3.6.3 is effected by a security issue handled in Bug 742491 so lets stabilize 3.6.5 relatively fast so we can get 3.6.1 out of the tree.