Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 567538 - games-rpg/manaplus: segmentation fault
Summary: games-rpg/manaplus: segmentation fault
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
Depends on:
Reported: 2015-12-04 10:57 UTC by Scall
Modified: 2016-04-01 23:36 UTC (History)
1 user (show)

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

backtrace.log (backtrace.log,2.61 KB, text/plain)
2015-12-04 10:59 UTC, Scall
emerge --info (emerge-info,14.95 KB, text/plain)
2015-12-04 11:00 UTC, Scall
manaplus-9999.ebuild (manaplus-9999.ebuild,3.37 KB, text/plain)
2016-02-19 08:45 UTC, Lars Wendler (Polynomial-C)

Note You need to log in before you can comment on or make changes to this bug.
Description Scall 2015-12-04 10:57:40 UTC
I always get a segmentation fault with "games-rpg/manaplus-" on Gentoo Hardened, as soon as I try to start it (if I build it without SDL2, it works correctly, though). Backtrace attached.

Reproducible: Always
Comment 1 Scall 2015-12-04 10:59:49 UTC
Created attachment 418556 [details]
Comment 2 Scall 2015-12-04 11:00:35 UTC
Created attachment 418558 [details]
emerge --info
Comment 3 Mr. Bones. (RETIRED) gentoo-dev 2015-12-30 17:36:13 UTC
Same with manaplus- and manaplus-
Comment 4 Lars Wendler (Polynomial-C) gentoo-dev 2016-02-18 10:54:34 UTC
I get the same segfault on my non-hardened system with manaplus- and the latest git head. Compiling manaplus against sdl-1 fixes this problem.
Upstream knows about this problem but got no reports from other than Gentoo users. Upstream wasn't able to reproduce this problem in his Gentoo chroot.
If anybody can provide some valgrind logs that might help upstream.

# emerge --info manaplus
Portage 2.2.27 (python 3.5.1-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.9.3-asneeded, glibc-2.21-r2, 4.1.18 x86_64)
                         System Settings
System uname: Linux-4.1.18-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_2389-with-gentoo-2.2
KiB Mem:    24752640 total,   9137360 free
KiB Swap:    2097148 total,   2097148 free
Timestamp of repository gentoo: Thu, 18 Feb 2016 07:00:02 +0000
Timestamp of repository poly-c: Thu, 18 Feb 2016 05:05:02 +0000
sh dash
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r2::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo, 3.5.1-r2::gentoo
dev-util/cmake:           3.5.0_rc2::poly-c
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.20.5::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.9.6-r4::gentoo, 1.10.3-r2::gentoo, 1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.8.5::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r2::gentoo

    location: /var/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000

    location: /var/lib/layman/kde-sunset
    masters: gentoo
    priority: 0

    location: /var/lib/layman/palemoon
    masters: gentoo
    priority: 1

    location: /usr/local/portage
    masters: gentoo
    priority: 2

Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=native -mtune=native -O2 -pipe"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-3.0"
CONFIG_PROTECT_MASK="/etc/X11/Sessions /etc/X11/app-defaults /etc/X11/xinit /etc/adobe /etc/bonobo-activation /etc/ca-certificates /etc/ca-certificates.conf /etc/dbus-1 /etc/dconf /etc/env.d /etc/fonts /etc/fonts/fonts.conf /etc/foomatic /etc/games /etc/gconf /etc/gentoo-release /etc/gimp /etc/gnome-vfs-2.0 /etc/gre.d /etc/gtk-2.0 /etc/hp /etc/hsqldb /etc/htdig /etc/init.d /etc/iproute2 /etc/java-config-2 /etc/lftp /etc/logrotate.d /etc/ntop /etc/opt /etc/pango /etc/profile.d /etc/qt4 /etc/revdep-rebuild /etc/sandbox.d /etc/sasl2 /etc/sensors.d /etc/sgml /etc/sound /etc/ssl /etc/ssmtp /etc/t1lib /etc/terminfo /etc/vbox /etc/xdg /etc/xinetd.d /etc/xml"
CXXFLAGS="-march=native -mtune=native -O2 -pipe"
EMERGE_DEFAULT_OPTS="--alphabetical --with-bdeps=y --misspell-suggestions=n --autounmask=n --quiet-build=n --verbose-slot-rebuilds=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
INSTALL_MASK="/etc/systemd /lib/systemd /lib32/systemd /lib64/systemd /usr/lib/systemd /usr/lib32/systemd /usr/lib64/systemd /etc/init.d/"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common -Wl,--as-needed"
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"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 c++0x cairo caps cdda cdr cli consolekit cracklib crypt css cups cxx dbus declarative dri dts dvd dvdr emboss encode exif faac ffmpeg firefox flac gdbm gif glamor gles2 gmp gnutls gtk iconv icu idn imagemagick inotify jpeg jpeg2k kde kipi lame lcms libcanberra libnotify lzma mac mad matroska midi mmap mmx mmxext mng modules mp3 mp4 mpeg mpfr multilib ncurses nls nptl nsplugin ogg opengl openmp opus pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qt3support qt4 quicktime readline rtmp schroedinger sdl seccomp session slang speex spell sse sse2 ssl startup-notification svg theora threads tiff truetype twolame udev udisks unicode upower usb vaapi vcd vdpau vorbis vpx wxwidgets x264 x265 xattr xcb xcomposite xinerama xml xscreensaver xv xvid xvmc zlib zsh-completion" ABI_X86="64" ALSA_CARDS="emu10k1 hda-intel usb-audio" APACHE2_MODULES="access_compat alias auth_basic auth_digest authn_anon authn_core authn_default authn_file authz_core authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dir env file_cache filter headers http2 include info log_config mime mime_magic rewrite socache_shmcb status unique_id unixd userdir vhost_alias" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" CURL_SSL="gnutls" ELIBC="glibc" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev joystick" KERNEL="linux" LIBREOFFICE_EXTENSIONS="pdfimport presenter-console presenter-minimizer" LINGUAS="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4 python3_5" QEMU_USER_TARGETS="arm" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="amdgpu r600 radeon radeonsi"
USE_PYTHON="2.7 3.4 3.5"

                        Package Settings

games-rpg/manaplus-9999::poly-c was built with the following:
USE="-mumble nls opengl sdl2 -test" ABI_X86="64"
Comment 5 Lars Wendler (Polynomial-C) gentoo-dev 2016-02-18 15:05:40 UTC
This error was fixed in which now needs to make its way into a release.
Comment 6 Mr. Bones. (RETIRED) gentoo-dev 2016-02-18 17:58:30 UTC
nice.  thanks for tracking it down.
Comment 7 Scall 2016-02-18 23:27:58 UTC
I confirm, I emerged ManaPlus from git and that fixed the issue on my Gentoo Hardened box.
Comment 8 Lars Wendler (Polynomial-C) gentoo-dev 2016-02-19 08:45:04 UTC
Created attachment 425874 [details]

This is the ebuild I used for debugging.
Any chance this can be added to portage and perhaps being used for further releases?
I added a couple of USE flags:

sdl2: controls wether the package gets built against sdl-1.2 or sdl-2. Upstream supports both constellations so this should be okay. The USE flag is enabled by default.

mumble: The package does not directly link against mumble but rather dlopens it if it has been found during configure run. As it's a somewhat automagic dependency when you don't explicitly en-/disable it via configure I thought it might be useful to have it as USE flag.

pugixml: This one was suggested by upstream. manaplus can use either libxml2 or pugixml. As we have both xml implementations in portage let's give users a choice here.

test: manaplus build ebnvironment provides a (currently small) unittest. Let's make use of it with FEATURES="test".
Comment 9 Mr. Bones. (RETIRED) gentoo-dev 2016-02-22 06:10:14 UTC
I added a slightly modified manaplus-9999.ebuild.  I'm not sure if we're going to get even one more release of libsdl so I'm trying not to add any more deps on that unless feature-parity hasn't yet been achieved with libsdl2 (see vice for example).  If a package is at the state where libsdl2 >= libsdl then I'm not exposing the libsdl choice to the users.  Love all the rest though and it seems like pugixml beats libxml2 in a lot of benchmarks.