Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 591938 - >=www-client/chromium-53[gn] with system libevent causes various instabilities
Summary: >=www-client/chromium-53[gn] with system libevent causes various instabilities
Status: RESOLVED DUPLICATE of bug 593458
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-23 17:05 UTC by Nick
Modified: 2017-05-24 16:19 UTC (History)
17 users (show)

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


Attachments
using system libevent header (chromium-54.0.2837.0.ebuild.diff,452 bytes, patch)
2016-08-27 06:58 UTC, iGentoo
Details | Diff
bootstrap with system libevent and don't use base/third_party/libevent/event.h (chromium-system-libevent.patch,2.20 KB, patch)
2016-09-17 07:53 UTC, iGentoo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick 2016-08-23 17:05:50 UTC
To reproduce:

Emerge www-client/chromium with the following use flags

www-client/chromium-54.0.2832.2::gentoo  USE="cups (gn) gnome gnome-keyring hangouts (pic) proprietary-codecs pulseaudio system-ffmpeg -custom-cflags (-gtk3) -kerberos (-neon) (-selinux) -suid -tcmalloc {-test} -widevine" L10N="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv sw ta te th tr uk vi zh-CN zh-TW"

Then install the adblock plus extension, and pages will not load (with the message "Waiting for extension adblock plus").

Pages will also hang occasionally and refuse to close.

All of this also occurs in www-client/chromium-54.0.2824.0. None of this occurs in www-client/google-chrome-unstable-54.0.2832.2 or www-client/google-chrome-unstable-54.0.2824.0 or www-client/chromium-54.0.2810.2 with -gn and +tcmalloc (suid use flag not an option).

Portage 2.3.0 (python 2.7.12-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.9.3, glibc-2.23-r2, 4.6.3-gentoo x86_64)
=================================================================
System uname: Linux-4.6.3-gentoo-x86_64-Intel-R-_Core-TM-_i7-2675QM_CPU_@_2.20GHz-with-gentoo-2.2
KiB Mem:     8080824 total,   1502928 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 22 Aug 2016 00:45:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.4::gentoo, 3.5.2::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.21.3::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: webrsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

nick
    location: /usr/local/portage
    masters: gentoo

gamerlay
    location: /var/lib/layman/gamerlay
    masters: gentoo
    priority: 50

java
    location: /var/lib/layman/java
    masters: gentoo
    priority: 50

jorgicio
    location: /var/lib/layman/jorgicio
    masters: gentoo
    priority: 50

laurentb
    location: /var/lib/layman/laurentb
    masters: gentoo
    priority: 50

sabayon
    location: /var/lib/layman/sabayon
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://distfiles.gentoo.org/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mmx mmxext mng modules mp3 mp4 mpeg multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf php png policykit ppds pulseaudio qt3support qt4 readline sdl seccomp session spell sse sse2 ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7 python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fglrx intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Mike Gilbert gentoo-dev 2016-08-23 18:45:12 UTC
I don't think gn would have anything to do with this. It's possible tcmalloc and/or suid might have some effect on extensions.
Comment 2 Nick 2016-08-23 18:47:21 UTC
I mentioned gn mostly because it currently appears to force -tcmalloc

# TODO: bootstrapped gn binary hangs when using tcmalloc with portage's sandbox.
REQUIRED_USE="gn? ( gnome gnome-keyring !tcmalloc )"
Comment 3 Nick 2016-08-24 13:51:25 UTC
Testing with +suid did not change anything, are there plans to support +gn +tcmalloc without FEATURES=-sandbox soon?
Comment 4 iGentoo 2016-08-27 06:58:08 UTC
Created attachment 444220 [details, diff]
using system libevent header
Comment 5 Mike Gilbert gentoo-dev 2016-08-29 14:39:54 UTC
Comment on attachment 444220 [details, diff]
using system libevent header

What issue is this patch intended to address? Why is it attached to this bug report?
Comment 6 Oleh 2016-08-29 14:40:28 UTC
i getting "page hang" aswell.
www-client/chromium-54.0.2832.2 with +gn -tcmalloc
i don't use any adblock or any other extensions.
Comment 7 Miroslav Šulc gentoo-dev 2016-08-30 08:40:43 UTC
i have the same issue. happens for me mostly with facebook.com, roundcube website and jira website.
Comment 8 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2016-08-31 21:17:55 UTC
With https://gitweb.gentoo.org/repo/gentoo.git/commit/www-client/chromium?id=2721606ff5b384d36220d9f2702d5984a4cc11e1 it should be possible to use tcmalloc with GN.

If you'd like to help with debugging the -tcmalloc case, please follow https://chromium.googlesource.com/chromium/src/+/master/docs/linux_debugging.md and upload some symbolized stack traces of the hanging processes.
Comment 9 Miroslav Šulc gentoo-dev 2016-09-02 06:30:13 UTC
yesterday i compiled chromium with following use flags including +tcmalloc but the issues persist:

[ebuild   R   #] www-client/chromium-54.0.2840.6::gentoo  USE="cups (gn) gnome gnome-keyring hangouts (pic) proprietary-codecs pulseaudio suid tcmalloc -custom-cflags (-gtk3) -kerberos (-neon) (-selinux) -system-ffmpeg {-test} -widevine" L10N="cs -am -ar -bg -bn -ca -da -de -el -en-GB -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh-CN -zh-TW" 0 KiB
Comment 10 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2016-09-02 09:30:46 UTC
The issues may be caused by given version of the browser, not USE flags.

1. Could you try to obtain a stack trace of hung processes using instructions from https://chromium.googlesource.com/chromium/src/+/master/docs/linux_debugging.md ?

2. Can you repro the issues with google-chrome?
Comment 11 Mike Lothian 2016-09-10 12:55:35 UTC
I'm glad I'm not the only person seeing this, I've tried compiling chromium with both gcc and clang to no avail, it's an issue in both the 54 & 55 series. It doesn't seem to be an issue with the binary packages however

I'm currently compiled with:

www-client/chromium-55.0.2853.0::gentoo  USE="cups custom-cflags (gn) hangouts (pic) proprietary-codecs pulseaudio suid system-ffmpeg tcmalloc widevine -gnome -gnome-keyring (-gtk3) -kerberos (-neon) (-selinux) {-test}" L10N="en-GB -am -ar -bg -bn -ca -cs -da -de -el -es -es-419 -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -ms -nb -nl -pl -pt-BR -pt-PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh-CN -zh-TW"
Comment 12 Nick 2016-09-10 16:36:51 UTC
When I compile with -suid on 54.*.*.* and 55.*.*.* I get a segmentation fault when starting chromium.
Comment 13 C. Wijtmans 2016-09-11 09:15:41 UTC
Please mask chromium-54, it is highly unstable, the use flags dont matter.
Comment 14 Dominik Strehlke 2016-09-11 09:46:55 UTC
I have been experiencing the same issues (randomly but frequently hung tabs) with 53.*, when compiling with GN. A soon as I disabled the GN use flag and fell back to GYP, it worked. Now 54.0.2840.16 is compiling with GN only, I have the same problem again, just like you.

In all cases I was compiling with +tcmalloc and +suid and various combinations of gcc, clang / bfd, gold, lld / no LTO, normal LTO, thin LTO, but the results were always the same (also the vanilla combination of gcc, bfd, no LTO).

Interesting thing was, I already had it with 53.* when using GN.
Comment 15 Miroslav Šulc gentoo-dev 2016-09-11 10:53:56 UTC
the issue still persists in www-client/chromium-55.0.2853.0 aswell.
Comment 16 Miroslav Šulc gentoo-dev 2016-09-11 13:14:59 UTC
i have downgraded to www-client/chromium-53.0.2785.101 with USE="-gn" and everything works fine again.
Comment 17 Adam Stylinski 2016-09-11 19:28:14 UTC
I too am seeing this issue, in particular with extensions.  Trying to open up options dialogs for extensions leads to a hang on the page load, and enabling anything, adblock plus or otherwise causes many pages to just say "waiting on extension [so and so]".
Comment 18 Tanki 2016-09-12 08:13:11 UTC
Hi,
I also have this problem (plus a font size problem on tabs)
since gn is for ninjabuild files (https://chromium.googlesource.com/chromium/src/tools/gn/) could it be a problem with dev-utils/ninja ?
I'm willing to update ninja to 9999 to see how it goes

would any of you advise against it ?

Thanks for your time and answer
Comment 19 Dominik Strehlke 2016-09-12 10:16:29 UTC
(In reply to Tanki from comment #18)
> Hi,
> I also have this problem (plus a font size problem on tabs)
> since gn is for ninjabuild files
> (https://chromium.googlesource.com/chromium/src/tools/gn/) could it be a
> problem with dev-utils/ninja ?
> I'm willing to update ninja to 9999 to see how it goes
> 
> would any of you advise against it ?
> 
> Thanks for your time and answer

I doubt it has anything to do with ninja: The old build system also was using ninja. GN is just another way to generate the ninja build files, just as GYP which was used before. My current guess is that GN is generating ninja build files that differ from those generated by GYP in a way that's causing this behaviour, as it already occured in M53 builds always when using GN, never when using GYP.
Comment 20 Mike Lothian 2016-09-12 13:18:45 UTC
If anyone has time could they diff the build directory with and without the gn flag on the 53 build (which we know works with -gn) 

It might give a clue as to whats broken - I'll try playing around with the build tonight
Comment 21 Jason A. Donenfeld gentoo-dev 2016-09-12 16:21:32 UTC
+tcmalloc: unstable, -tcmalloc: unstable, +suid: unstable, -suid: unstable

Seems chromium-54 is just unstable. The use flags don't make a difference. Please mask.
Comment 22 Mike Gilbert gentoo-dev 2016-09-12 17:43:54 UTC
google-chrome 54 and 55 seem quite usable, and those are built using GN. I don't think there is anything inherently broken about it.

I suspect there is some issue with an unbundled system library, or a toolchain issue of some sort.
Comment 23 Tanki 2016-09-13 06:50:37 UTC
(In reply to Mike Gilbert from comment #22)
> google-chrome 54 and 55 seem quite usable, and those are built using GN. I
> don't think there is anything inherently broken about it.
> 
> I suspect there is some issue with an unbundled system library, or a
> toolchain issue of some sort.

I did an emerge -e chromium and it has not changed the problem I was facing
I also make sure everytime I upgrade my system I use the option --with-bdeps

Although everything compiles fine, chromium still takes frickin' ages to display a simple webpage, and display nothing while I use Ublock Origin (or any adblocker for that matter...)

and all this happens since the introduction of the mandatory gn use flag
Comment 24 Mike Gilbert gentoo-dev 2016-09-13 15:16:20 UTC
commit b69d5c8c5e30f9466cddc591703bf16584d5bf20
Author: Mike Gilbert <floppym@gentoo.org>
Date:   Tue Sep 13 11:13:27 2016 -0400

    profiles: mask chromium-54

 profiles/package.mask | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 25 Tanki 2016-09-14 07:44:09 UTC
Yeah forgot to add this behavior also happens with chromium-55*

is there a way to remove the gn flag apart from altering the ebuild ?
if so please advise
Comment 26 Mike Lothian 2016-09-14 07:56:27 UTC
The gn flag controls how the ninja build files are created, gn is the new way gyp is the old way. By the looks of things Google have stopped working on gyp, as Chromium no longer builds. I'm sure if you put some effort in you could fix it for the current build but going forward this will be more difficult to maintain. When the first release of 54 appeared in portage there were patches to make it build with gyp, I still had issues with the resulting binary. I don't think this is a build system issue.
Comment 27 Miroslav Šulc gentoo-dev 2016-09-15 13:56:18 UTC
today i merged www-client/chromium-55.0.2859.0 and so far it works pretty good, no freezes. i found only two issues:
1) i cannot load pages from websites like https://pb.one2one.cz/ which are running tomcat 8.5.5 behind with http2 support (not sure it is related or not). this issue is new since version 55 (not sure which build exactly). i did not find the cause or more detail info to this issue.
2) when using facebook.com, new messages appear in system notification window but facebook page does not display the message unless i reload the whole page, but this issue exists at least since version 53 (still using gyp) and so it is not related to this issue.
Comment 28 Mike Gilbert gentoo-dev 2016-09-15 14:26:50 UTC
(In reply to Miroslav Šulc from comment #27)

Thanks for the feedback.

chromium-54.0.2840.27 contains the same "fix" (bundled libevent) and is unmasked.
Comment 29 Mike Lothian 2016-09-15 14:32:26 UTC
I wonder if using libevent-2.1.6 fixes the issue with the system version
Comment 30 iGentoo 2016-09-17 07:53:26 UTC
Created attachment 446050 [details, diff]
bootstrap with system libevent and don't use base/third_party/libevent/event.h

build.log:
g++ .... -I../.. -Igen .... -Igen/shim_headers/libevent_shim -c ../../base/message_loop/message_pump_libevent.cc -o ....
g++ .... -I../.. -Igen .... -Igen/shim_headers/libevent_shim -c ../../third_party/webrtc/base/task_queue_libevent.cc -o ....

default_include_dirs (-I../..) is on the left of shim_headers_path (-Igen/shim_headers/libevent_shim)

g++ will use: ../../base/third_party/libevent/event.h
and ignore: gen/shim_headers/libevent_shim/base/third_party/libevent/event.h

So we should not preserve "base/third_party/libevent/event.h"
Comment 31 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2017-05-24 16:19:02 UTC

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