Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439244 - www-client/firefox-16.0.1 - .../work/mozilla-release/memory/jemalloc/src/src/jemalloc.c:1736:1: error: corrupted profile info: edge from 0 to 2 exceeds maximal count
Summary: www-client/firefox-16.0.1 - .../work/mozilla-release/memory/jemalloc/src/src/...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: Normal normal with 2 votes (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
: 442144 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-22 09:48 UTC by Wei-Chun Chung
Modified: 2017-01-14 20:07 UTC (History)
10 users (show)

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


Attachments
build.log.tar.bz2 (build.log.tar.bz2,343.66 KB, application/x-bzip)
2012-10-22 09:52 UTC, Wei-Chun Chung
Details
pgo build patch (pgo-build-fail.patch,343 bytes, patch)
2012-10-23 19:22 UTC, Andreas Thalhammer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wei-Chun Chung 2012-10-22 09:48:03 UTC
Firefox built failed with flag pgo enabled.

Reproducible: Always

Steps to Reproduce:
1. Compile with pgo useflag
2.
3.
Actual Results:  
Compile failed.

Expected Results:  
Successful built.

# emerge --info
Portage 2.1.11.9 (default/linux/x86/10.0/desktop/gnome, gcc-4.5.4, glibc-2.15-r3, 3.3.8-gentoo i686)
=================================================================
System uname: Linux-3.3.8-gentoo-i686-Intel-R-_Core-TM-2_Quad_CPU_Q8300_@_2.50GHz-with-gentoo-2.1
Timestamp of tree: Mon, 22 Oct 2012 09:30:01 +0000
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdda cdr cjk cli colord consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv ipv6 java jpeg lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg mudflap nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pppd pulseaudio qt3support qt4 readline samba sdl session socialweb spell sse sse2 sse3 ssl ssse3 startup-notification svg tcpd tiff truetype udev udisks unicode upower usb v4l vorbis wxwidgets x264 x86 xcb xml xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 ubx" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Wei-Chun Chung 2012-10-22 09:52:56 UTC
Created attachment 327142 [details]
build.log.tar.bz2

The last lines of the file:


/var/tmp/portage/www-client/firefox-16.0.1/work/mozilla-release/memory/jemalloc/src/src/jemalloc.c: In function 'tcache_event':
/var/tmp/portage/www-client/firefox-16.0.1/work/mozilla-release/memory/jemalloc/src/src/jemalloc.c:1736:1: error: corrupted profile info: edge from 0 to 2 exceeds maximal count
/var/tmp/portage/www-client/firefox-16.0.1/work/mozilla-release/memory/jemalloc/src/src/jemalloc.c: In function 'arena_dalloc':
/var/tmp/portage/www-client/firefox-16.0.1/work/mozilla-release/memory/jemalloc/src/src/jemalloc.c:1736:1: note: correcting inconsistent profile data
make[5]: *** [jemalloc.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory `/var/tmp/portage/www-client/firefox-16.0.1/work/mozilla-release/obj-i686-pc-linux-gnu/memory/jemalloc'
make[4]: *** [libs_tier_base] Error 2
make[4]: Leaving directory `/var/tmp/portage/www-client/firefox-16.0.1/work/mozilla-release/obj-i686-pc-linux-gnu'
make[3]: *** [tier_base] Error 2
make[3]: Leaving directory `/var/tmp/portage/www-client/firefox-16.0.1/work/mozilla-release/obj-i686-pc-linux-gnu'
make[2]: *** [default] Error 2
make[2]: Leaving directory `/var/tmp/portage/www-client/firefox-16.0.1/work/mozilla-release/obj-i686-pc-linux-gnu'
make[1]: *** [realbuild] Error 2
make[1]: Leaving directory `/var/tmp/portage/www-client/firefox-16.0.1/work/mozilla-release'
make: *** [profiledbuild] Error 2
emake failed
 * ERROR: www-client/firefox-16.0.1 failed (compile phase):
 *   virtualmake: the emake failed.
 * 
 * Call stack:
 *     ebuild.sh, line   85:  Called src_compile
 *   environment, line 6844:  Called Xemake '-f' 'client.mk' 'profiledbuild'
 *   environment, line  673:  Called virtualmake '-f' 'client.mk' 'profiledbuild'
 *   environment, line 7605:  Called die
 * The specific snippet of code:
 *       [[ ${retval} -ne 0 ]] && die "${FUNCNAME}: the ${VIRTUALX_COMMAND} failed.";
 * 
 * If you need support, post the output of `emerge --info '=www-client/firefox-16.0.1'`,
 * the complete build log and the output of `emerge -pqv '=www-client/firefox-16.0.1'`.
 * The complete build log is located at '/var/tmp/portage/www-client/firefox-16.0.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-client/firefox-16.0.1/temp/environment'.
 * Working directory: '/var/tmp/portage/www-client/firefox-16.0.1/work/mozilla-release'
 * S: '/var/tmp/portage/www-client/firefox-16.0.1/work/mozilla-release'
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-10-22 11:30:33 UTC
Comment on attachment 327142 [details]
build.log.tar.bz2

There is no need to store a single file in a tar archive and then compress it - simply compressing a single file will do.
Comment 3 Thomas Bettler 2012-10-22 13:14:25 UTC
same error here
Comment 4 Jory A. Pratt gentoo-dev 2012-10-22 14:16:23 UTC
Compile with -pgo, I am gonna be masking the useflag by weeks end due to all the failures.
Comment 5 Coacher 2012-10-22 16:16:53 UTC
Same error here on amd64.
Comment 6 Viktor Yu. Kovalskii 2012-10-23 07:55:38 UTC
I can reproduce this bug only with gcc-4.5.4 on amd64 not with gcc-4.6.3 on amd64.
Comment 7 Andreas Thalhammer 2012-10-23 19:08:26 UTC
Also confirmed here on AMD64. Had no problems with firefox-15.0.1 (previous version).

The build works for me when removing the pgo useflag:
# USE="-pgo" emerge -1v =www-client/firefox-16.0.1

I've googled and apparently there were previous build errors like this:
https://bugzilla.mozilla.org/show_bug.cgi?id=418866
(This also gave me the idea to try disable PGO.)

Hope this helps, as a temporary work-around.
Comment 8 Andreas Thalhammer 2012-10-23 19:22:30 UTC
Created attachment 327250 [details, diff]
pgo build patch

If it works with gcc-4.6, pgo should only be masked for gcc-4.5 and lower.

How about that?
Comment 9 Wei-Chun Chung 2012-10-24 01:53:10 UTC
I don't think mask firefox-16 of gcc version less than 4.6 is a good idea because current stable (for most user) is 4.5.4.
Comment 10 Andreas Thalhammer 2012-10-24 03:44:32 UTC
(In reply to comment #9)
> I don't think mask firefox-16 of gcc version less than 4.6 is a good idea
> because current stable (for most user) is 4.5.4.

Only with the pgo useflag set it would be masked, so users would have to remove this useflag (if set), hence the build would succeed.

FYI, I emerged gcc-4.6.3 for the purpose of building firefox-16 with USE="pgo" and it was successful. The rest of the system is build with gcc-4.5.4 and I also returned to 4.5.4 after the successful merge.
Comment 11 Andreas Thalhammer 2012-10-28 16:43:50 UTC
There is the same issue with 16.0.2. Compiling with USE="pgo" succeeds only with gcc-4.6 (tested with sys-devel/gcc-4.6.3, cmdline: emerge firefox).

Compiling with gcc-4.5 works without the pgo useflag (tested with sys-devel/gcc-4.5.4, cmdline: USE="-pgo" ebuild firefox-16.0.2.ebuild compile).
Comment 12 Dell'Aica Valentino 2012-10-28 19:19:56 UTC
Confirmed on x86 with gcc-4.5.4 and +pgo flag.
No problem without pgo
Comment 13 Viktor Yu. Kovalskii 2012-11-01 18:04:59 UTC
I found that upstream maintainers know about this problem but they don't have any solution:

https://bugzilla.mozilla.org/show_bug.cgi?id=419470

Can we use system jemalloc instead of mozilla's copy?
Comment 14 Jeroen Roovers (RETIRED) gentoo-dev 2012-11-07 02:13:33 UTC
*** Bug 442144 has been marked as a duplicate of this bug. ***
Comment 15 Matthew Marlowe (RETIRED) gentoo-dev 2012-11-26 15:52:38 UTC
Seeing problem for firefox 17 too.
Comment 16 Jory A. Pratt gentoo-dev 2012-11-26 16:38:03 UTC
I have added 17.0-r2 to the mozilla overlay please test it and report back.
Comment 17 Hervé Guillemet 2012-11-26 18:23:19 UTC
Same error with r2 than originally reported
Comment 18 Wei-Chun Chung 2012-11-27 09:05:05 UTC
The 17.0-r2 still failed to compile with pgo and gcc-4.5, maybe the pgo flag should only be enabled with gcc-4.6 or higher.
Comment 19 Andreas Thalhammer 2012-12-21 06:10:44 UTC
On my system, pgo is now masked. I just can’t figure out how (in which file) it is masked.
Comment 20 Viktor Yu. Kovalskii 2012-12-21 06:38:57 UTC
(In reply to comment #19)
> On my system, pgo is now masked. I just can’t figure out how (in which file)
> it is masked.

You can unmask pgo just adding 
-pgo at /etc/portage/profile/use.mask file

cat /etc/portage/profile/use.mask
-pgo
Comment 21 Wei-Chun Chung 2013-01-10 05:56:27 UTC
After upgrading to gcc-4.6.3 on x86 stable, the compiling of firefox-16/17 with pgo works normally.
Comment 22 Coacher 2013-01-10 15:12:42 UTC
firefox-18.0[+pgo] compiled and working fine on amd64 with GCC 4.6.3.

One weird issue though with firefox-18 - it is missing my locale settings: whole interface is in English. Not sure if this is the issue of pgo USE flag or firefox-18 itself. Be warned.
Comment 23 Emanuel Dávila 2013-01-10 15:21:34 UTC
(In reply to comment #22)
> firefox-18.0[+pgo] compiled and working fine on amd64 with GCC 4.6.3.
> 
> One weird issue though with firefox-18 - it is missing my locale settings:
> whole interface is in English. Not sure if this is the issue of pgo USE flag
> or firefox-18 itself. Be warned.

I have this issue too. What I did to fix this was disable and enable again the language and restart firefox.
Comment 24 Coacher 2013-01-10 15:41:23 UTC
(In reply to comment #23)
> What I did to fix this was disable and enable again
> the language and restart firefox.

Many thanks, it helped me too!
Comment 25 Andreas Sturmlechner gentoo-dev 2013-01-13 13:39:05 UTC
Now that gcc-4.6.3 is stable, I guess pgo can be unmasked again?
Comment 26 Jory A. Pratt gentoo-dev 2013-01-13 20:00:42 UTC
(In reply to comment #25)
> Now that gcc-4.6.3 is stable, I guess pgo can be unmasked again?

Just cause one issue is addressed by a compiler update does not warrant unmasking pgo useflag again. There are many bugs that need to be addressed and we the mozilla team need to be able to maintain it on a much larger scale of users.
Comment 27 Andreas Sturmlechner gentoo-dev 2013-01-13 20:32:58 UTC
Sorry, I got the impression that all of this bug was solved by the gcc-4.6.3 upgrade. Anyway, firefox-17.0.2 also built fine with gcc-4.7.2 here.
Comment 28 Andreas Thalhammer 2013-01-13 21:43:08 UTC
(In reply to comment #27)
> Sorry, I got the impression that all of this bug was solved by the gcc-4.6.3
> upgrade.

I compiled firefox-18.0 using gcc-4.6.3 on my AMD64 box with USE="pgo" and it does work, like with previous versions of firefox and pgo.

It also runs without any errors. The only issue is the language thing as described in comment #22 by Coacher, but I seriously doubt that this is related to pgo.
Comment 29 Jory A. Pratt gentoo-dev 2013-12-16 15:19:37 UTC
As stated in use.mask pgo is unsupported.