Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 586754 - app-misc/g15macro-1.0.3-r1 segfaults with dev-libs/libg15render-1.2-r2[truetype] and >=sys-libs/glibc-2.23
Summary: app-misc/g15macro-1.0.3-r1 segfaults with dev-libs/libg15render-1.2-r2[truety...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Deadline: 2020-10-09
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: glibc-2.23
  Show dependency tree
 
Reported: 2016-06-22 20:30 UTC by Chiitoo
Modified: 2020-09-09 12:37 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chiitoo gentoo-dev 2016-06-22 20:30:25 UTC
Since the upgrade to 'sys-libs/glibc-2.23', executing 'g15macro' goes like so:

---

$ g15macro
restoring codes
The application (or it's libraries) caught a Segmentation Fault. Backtrace follows:

---

At this point, the process seems to be doing nothing (no backtrace actually follows).

Additionally, the LCD-clock of a Logitech G15 keyboard will be frozen in time until 'g15macro' is terminated.

A quick run through gdb:

---

Reading symbols from g15macro...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/g15macro 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
restoring codes

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6f3fb10 in ?? () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff6f3fb10 in ?? () from /lib64/libc.so.6
#1  0x00007ffff6f41074 in malloc () from /lib64/libc.so.6
#2  0x00007ffff670cbed in ft_mem_qalloc () from /usr/lib64/libfreetype.so.6
#3  0x00007ffff670cc48 in ft_mem_alloc () from /usr/lib64/libfreetype.so.6
#4  0x00007ffff6711f4e in FT_Add_Module () from /usr/lib64/libfreetype.so.6
#5  0x00007ffff67073ac in FT_Add_Default_Modules () from /usr/lib64/libfreetype.so.6
#6  0x00007ffff67073f3 in FT_Init_FreeType () from /usr/lib64/libfreetype.so.6
#7  0x00007ffff79cf45f in g15r_initCanvas () from /usr/lib64/libg15render.so.1
#8  0x0000000000402279 in ?? ()
#9  0x00007ffff6ee7750 in __libc_start_main () from /lib64/libc.so.6
#10 0x0000000000402749 in ?? ()

---

Running through 'strace', there are some 'mmap' and 'munmap' missing compared to a working run, while the one leading to a segmentation fault has an additional 'recvfrom [...] -1 EAGAIN'.

Building 'dev-libs/libg15render' (and 'app-misc/g15composer' as a dependency) with USE="-truetype" seems to work around the issue.

---

Portage 2.2.28 (python 2.7.11-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.23-r2, 4.5.5-ck-CommodoreL x86_64)
=================================================================
System uname: Linux-4.5.5-ck-CommodoreL-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.2
KiB Mem:    16409888 total,   3140264 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Wed, 22 Jun 2016 09:00:01 +0000
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.2.5 [enabled]
app-shells/bash:          4.3_p42-r2::gentoo
dev-lang/perl:            5.24.0-r1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.5.1-r3::gentoo
dev-util/ccache:          3.2.5::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.3.0::gentoo, 5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.6::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

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

testi_overlay
    location: /usr/local/portage
    masters: gentoo
    priority: 0

kde-lean
    location: /var/lib/layman/kde-lean
    sync-type: laymansync
    sync-uri: git://weaver.gentooexperimental.org/kde-lean
    masters: gentoo
    priority: 50

qt
    location: /var/lib/layman/qt
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/qt.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=amdfam10 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/mnt/store_02/portage_stuff/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n --tree --verbose --unordered-display --autounmask=n --verbose-conflicts"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/etc/systemd /lib/systemd /lib32/systemd /lib64/systemd /usr/lib/systemd /usr/lib32/systemd /usr/lib64/systemd"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/mnt/store_02/portage_stuff/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="3dnow 3dnowext X aac acpi alsa amd64 anthy berkdb bzip2 cjk cli cracklib crypt cxx dirac dri dvd encode faac ffmpeg flac fortran gdbm gif gpm gstreamer iconv infinality jpeg jpeg2k lame lm_sensors midi mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl offensive ogg openal opencl opengl openmp pcre png qt3support qt4 readline rtmp seccomp session sse sse2 sse3 ssl tcpd truetype uim unicode v4l vorbis x264 xattr xml xvid zlib" ABI_X86="32 64" 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="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" 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="evdev" KERNEL="linux" LCD_DEVICES="g15" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB en_US en fi ja" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Alex Xu (Hello71) 2016-06-26 15:50:08 UTC
you did this much debugging work, maybe you could also assign the bug. :/
Comment 2 Chiitoo gentoo-dev 2016-06-26 20:55:29 UTC
(In reply to Alex Xu (Hello71) from comment #1)
> you did this much debugging work, maybe you could also assign the bug. :/

Apologies!

I think I still had “leave bug-assigning to the bug-wranglers” in the back of my mind, though I'm not sure where it came from in the first place.

Thank you!
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2017-10-25 19:16:08 UTC
Is this segfault still happening with recent glibc?
Comment 4 Chiitoo gentoo-dev 2017-10-25 21:17:49 UTC
Talk about a bug I forgot about...

I had to switch to a different keyboard, but the G15 I still have 
works enough to test this out, and indeed, the segfault is still
there, though it actually gives a backtrace now without GDB.

Using 'sys-libs/glibc-2.25-r8'.

---

$ gdb g15macro
GNU gdb (Gentoo 8.0.1 vanilla) 8.0.1

[snip]

Reading symbols from g15macro...(no debugging symbols found)...done.
(gdb) r
Starting program: /usr/bin/g15macro 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
restoring codes
*** Error in `/usr/bin/g15macro': 
free(): invalid next size (fast): 0x0000000000621860 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x77d7c)[0x7ffff6f32d7c]
/lib64/libc.so.6(+0x7f9bb)[0x7ffff6f3a9bb]
/lib64/libc.so.6(+0x80ed1)[0x7ffff6f3bed1]
/usr/lib64/libxcb.so.1(+0xd7c4)[0x7ffff64be7c4]
/usr/lib64/libxcb.so.1(+0xdfe7)[0x7ffff64befe7]
/usr/lib64/libxcb.so.1(xcb_wait_for_reply64+0x3e)[0x7ffff64bf143]
/usr/lib64/libX11.so.6(_XReply+0xf8)[0x7ffff76d38f8]
/usr/lib64/libX11.so.6(XQueryExtension+0x96)[0x7ffff76c9966]
/usr/lib64/libXtst.so.6(+0x30a2)[0x7ffff748d0a2]
/usr/lib64/libXtst.so.6(XTestQueryExtension+0x34)[0x7ffff748d265]
/usr/bin/g15macro[0x4022c7]
/lib64/libc.so.6(__libc_start_main+0xea)[0x7ffff6edb44a]
/usr/bin/g15macro[0x402749]
======= Memory map: ========

[snip]

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51      ../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:51
#1  0x00007ffff6ef1ae0 in __GI_abort () at abort.c:89
#2  0x00007ffff6f32d81 in __libc_message (do_abort=do_abort@entry=2,
    fmt=fmt@entry=0x7ffff7037a58 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff6f3a9bb in malloc_printerr (action=<optimized out>,
    str=0x7ffff7037e00 "free(): invalid next size (fast)",
    ptr=<optimized out>, ar_ptr=<optimized out>) at malloc.c:5077
#4  0x00007ffff6f3bed1 in _int_free (av=0x7ffff7265b00 <main_arena>,
    p=<optimized out>, have_lock=<optimized out>) at malloc.c:3873
#5  0x00007ffff64be7c4 in poll_for_reply (c=c@entry=0x614410,
    request=request@entry=31, reply=reply@entry=0x7fffffffcb08,
    error=error@entry=0x7fffffffcbe0) at
    /var/tmp/portage/x11-libs/libxcb-1.12-r2/work/libxcb-1.12/src/xcb_in.c:457
#6  0x00007ffff64befe7 in wait_for_reply (c=c@entry=0x614410,
    request=request@entry=31, e=e@entry=0x7fffffffcbe0) at
    /var/tmp/portage/x11-libs/libxcb-1.12-r2/work/libxcb-1.12/src/xcb_in.c:515
#7  0x00007ffff64bf143 in xcb_wait_for_reply64 (c=0x614410, request=31,
    e=0x7fffffffcbe0) at
    /var/tmp/portage/x11-libs/libxcb-1.12-r2/work/libxcb-1.12/src/xcb_in.c:560
#8  0x00007ffff76d38f8 in _XReply () from /usr/lib64/libX11.so.6
#9  0x00007ffff76c9966 in XQueryExtension () from /usr/lib64/libX11.so.6
#10 0x00007ffff748d0a2 in get_xinput_base (dpy=0x613010) at
    /var/tmp/portage/x11-libs/libXtst-1.2.3/work/libXtst-1.2.3/src/XTest.c:79
#11 find_display (dpy=dpy@entry=0x613010) at
    /var/tmp/portage/x11-libs/libXtst-1.2.3/work/libXtst-1.2.3/src/XTest.c:83
#12 0x00007ffff748d265 in XTestQueryExtension (dpy=0x613010,
    event_base_return=0x7fffffffcd6c, error_base_return=0x7fffffffcd6c,
    major_return=0x7fffffffcd64, minor_return=0x7fffffffcd68) at
    /var/tmp/portage/x11-libs/libXtst-1.2.3/work/libXtst-1.2.3/src/XTest.c:101
#13 0x00000000004022c7 in ?? ()
#14 0x00007ffff6edb44a in __libc_start_main (main=0x401c80, argc=1,
    argv=0x7fffffffd888, init=<optimized out>, fini=<optimized out>,
    rtld_fini=<optimized out>, stack_end=0x7fffffffd878) at
    ../csu/libc-start.c:295
#15 0x0000000000402749 in ?? ()
Comment 5 mario.frauscher 2017-11-01 18:58:47 UTC
@Andreas K. Hüttel

I can confirm and reproduce the Bug.

But perhaps as Workaround:
(as described above)
add
"dev-libs/libg15render -truetype" to your "/etc/portage/package.use/<MYFILE>.use"
and rekompile lig15render

It works now... :-)

Hopefully the bug will be fixed in near future...