Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 352185 - >=media-video/mkvtoolnix-3 fails to build - gcc segfaults
Summary: >=media-video/mkvtoolnix-3 fails to build - gcc segfaults
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-19 22:59 UTC by Fabian Henze
Modified: 2011-01-21 17:51 UTC (History)
1 user (show)

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


Attachments
build log of media-video/mkvtoolnix-4.4.0 (build.log,7.73 KB, text/plain)
2011-01-19 23:01 UTC, Fabian Henze
Details
gcc backtrace (gcc-backtrace,6.14 KB, text/plain)
2011-01-19 23:03 UTC, Fabian Henze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Henze 2011-01-19 22:59:20 UTC
Hi,
I am having troubles building any mkvtoolnix version newer than 2.9.9 on a box of mine. Please contact me if you need any information that I can provide.

Reproducible: Always




Portage 2.1.9.25 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.2-r3, 2.6.32.25-grsec x86_64)
=================================================================
System uname: Linux-2.6.32.25-grsec-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8500_@_3.16GHz-with-gentoo-1.12.14
Timestamp of tree: Tue, 18 Jan 2011 09:20:01 +0000
app-shells/bash:     4.1_p7
dev-lang/python:     2.6.6-r1, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.14-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer -g -ggdb -O1"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer -g -ggdb -O1"
Comment 1 Fabian Henze 2011-01-19 23:01:14 UTC
Created attachment 260303 [details]
build log of media-video/mkvtoolnix-4.4.0
Comment 2 Fabian Henze 2011-01-19 23:03:45 UTC
Created attachment 260305 [details]
gcc backtrace

This is the gcc backtrace when the segfault happens. Done using:
cd /var/tmp/portage/media-video/mkvtoolnix-4.4.0/work/mkvtoolnix-4.4.0 && rake
and then attaching gdb to the running cc1plus
Comment 3 Dror Levin (RETIRED) gentoo-dev 2011-01-20 22:46:10 UTC
As you're using a grsec kernel I assume that is the reason, so assigning to hardened. Please reassign if I'm wrong.

Reporter: Is this a hardened system? Can you try with a non-grsec kernel and see if that helps?
Comment 4 Francisco Blas Izquierdo Riera (RETIRED) gentoo-dev 2011-01-20 23:05:09 UTC
Correct me if wrong but, do you have any precompiled headers (.pch) files on your system?

They won't work with ASLR enabled kernels :(
Comment 5 Fabian Henze 2011-01-21 06:26:59 UTC
(In reply to comment #4)
> Correct me if wrong but, do you have any precompiled headers (.pch) files on
> your system?
> 
> They won't work with ASLR enabled kernels :(
> 

find / -name *.pch 
gives me nothing, so I guess the answer is no.
Comment 6 Fabian Henze 2011-01-21 06:33:09 UTC
(In reply to comment #3)
> As you're using a grsec kernel I assume that is the reason, so assigning to
> hardened. Please reassign if I'm wrong.
> 
> Reporter: Is this a hardened system? Can you try with a non-grsec kernel and
> see if that helps?

No, I am just using a grsec enabled kernel with a few sysctl switches turned on. I can attach my kernel config if that helps? I am not using the RBAC system though.
Comment 7 Fabian Henze 2011-01-21 06:45:13 UTC
(In reply to comment #6)
> No, I am just using a grsec enabled kernel with a few sysctl switches turned
> on. I can attach my kernel config if that helps? I am not using the RBAC system
> though.
Forgot to mention: The userland is not hardened (see my emerge --info).
Comment 8 Fabian Henze 2011-01-21 08:31:14 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Correct me if wrong but, do you have any precompiled headers (.pch) files on
> > your system?
> > 
> > They won't work with ASLR enabled kernels :(
> > 
> 
> find / -name *.pch 
> gives me nothing, so I guess the answer is no.

Okay, my answer was stupid^^
I investigated what precompiled headers actually are and found that mkvtoolnix is indeed using them. Compilation works when adding --disable-precompiled-headers to econf.
Is this an upstream/buildsystem bug, a ebuild bug or is my setup just too weird?^^
Comment 9 Francisco Blas Izquierdo Riera (RETIRED) gentoo-dev 2011-01-21 11:14:55 UTC
(In reply to comment #8)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > Correct me if wrong but, do you have any precompiled headers (.pch) files on
> > > your system?
> > > 
> > > They won't work with ASLR enabled kernels :(
> > > 
> > 
> > find / -name *.pch 
> > gives me nothing, so I guess the answer is no.
> 
> Okay, my answer was stupid^^
> I investigated what precompiled headers actually are and found that mkvtoolnix
> is indeed using them. Compilation works when adding
> --disable-precompiled-headers to econf.
> Is this an upstream/buildsystem bug, a ebuild bug or is my setup just too
> weird?^^
> 
It is due to the way gcc make precompiled headers as they are position dependent as a result on a PaX enabled kernel they won't work.

To the media-video team, can you add to the package a pch use flag which when disabled passes --disable-precompiled-headers to econf? This flag is masked on hardened profiles because of this kind of known issues.
Comment 10 Magnus Granberg gentoo-dev 2011-01-21 17:09:17 UTC
See bug 301299 for more info.
Comment 11 Dror Levin (RETIRED) gentoo-dev 2011-01-21 17:51:37 UTC
Added pch USE flag, thanks a lot for finding the cause of this so quickly.
Closing as FIXED, feel free to reopen if you feel this wasn't resolved.