Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 586972 - sys-process/criu-2.2 with dev-libs/protobuf-3.0.0_beta3: *** stack smashing detected ***: protoc-c terminated
Summary: sys-process/criu-2.2 with dev-libs/protobuf-3.0.0_beta3: *** stack smashing d...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Yixun Lan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-24 16:40 UTC by Toralf Förster
Modified: 2016-07-04 04:22 UTC (History)
7 users (show)

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


Attachments
emerge-history.txt (emerge-history.txt,478.49 KB, text/plain)
2016-06-24 16:41 UTC, Toralf Förster
Details
environment (environment,159.57 KB, text/plain)
2016-06-24 16:41 UTC, Toralf Förster
Details
sys-process:criu-2.2:20160624-162617.log (sys-process:criu-2.2:20160624-162617.log,27.83 KB, text/plain)
2016-06-24 16:41 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2016-06-24 16:40:59 UTC
protoc-c --proto_path=images/ --c_out=images/ images/time.proto
[libprotobuf WARNING /var/tmp/portage/dev-libs/protobuf-3.0.0_beta3/work/protobuf-3.0.0-beta-3/src/google/protobuf/compiler/parser.cc:547] No syntax specified for the proto file: time.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
*** stack smashing detected ***: protoc-c terminated
protoc-c --proto_path=images/ --c_out=images/ images/binfmt-misc.proto
[libprotobuf WARNING /var/tmp/portage/dev-libs/protobuf-3.0.0_beta3/work/protobuf-3.0.0-beta-3/src/google/protobuf/compiler/parser.cc:547] No syntax specified for the proto file: binfmt-misc.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)


$ cat emerge-info.txt
  -----------------------------------------------------------------

  This is an unstable amd64 chroot image (named amd64-13.0-systemd-unstable_20160615-104634) at a hardened host acting as a tinderbox.

  -----------------------------------------------------------------

  make.conf: USE="sse2 pax_kernel xtpax -cdinstall -oci8 -bindist alsa btrfs compat custom-optimization -declarative dnssec ecc egl evdev fortran gles -gstreamer -haptic -icu imap -javascript kerberos lapack ldap logrotate mdnsresponder-compat midi mikmod -mng mpeg3 mpg123 multimedia -opengl pam pcre16 -pkcs11 plasma -png pulseaudio pwquality smartcard sse4 swscale -system-cairo -system-llvm thinkpad traceroute usbredir -v4l wav X x264 xetex xscreensaver xslt -xz zenmap zip"

  -----------------------------------------------------------------

Portage 2.3.0 (python 3.4.4-final-0, default/linux/amd64/13.0/systemd, gcc-5.4.0, glibc-2.23-r2, 4.5.7-hardened-r3 x86_64)
=================================================================
System uname: Linux-4.5.7-hardened-r3-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16157888 total,   1362012 free
KiB Swap:   16777212 total,  16724648 free
Timestamp of repository gentoo: Fri, 24 Jun 2016 15:45:01 +0000
sh bash 4.3_p46
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p46::gentoo
dev-lang/perl:            5.24.0-r1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.4::gentoo, 3.5.1-r3::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.21::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.9.6-r4::gentoo, 1.10.3-r2::gentoo, 1.11.6-r2::gentoo, 1.12.6-r1::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.9.3::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.4::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: 1

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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/grs/systems.conf /etc/omega.conf /etc/stunnel/stunnel.conf /usr/lib64/fax /usr/lib64/tomoyo/conf /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/qpsmtpd/plugins /usr/share/themes/oxygen-gtk/gtk-2.0 /var/spool/fax/etc"
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.5/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/tmp/distfiles"
EMERGE_DEFAULT_OPTS="--verbose-conflicts --color=n --nospinner --tree --quiet-build"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox parallel-fetch preserve-libs protect-owned sandbox sfperms strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo rsync://mirror.netcologne.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gor.bytemark.co.uk/gentoo/ rsync://ftp.snt.utwente.nl/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
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 acl alsa amd64 berkdb btrfs bzip2 cli compat cracklib crypt custom-optimization cxx dnssec dri ecc egl evdev fortran gdbm gles iconv imap ipv6 kerberos lapack ldap logrotate mdnsresponder-compat midi mikmod mmx mmxext modules mpeg3 mpg123 multilib multimedia ncurses nls nptl openmp pam pax_kernel pcre pcre16 plasma pulseaudio pwquality readline seccomp session smartcard sse sse2 sse4 ssl swscale systemd tcpd thinkpad traceroute udev unicode usbredir wav x264 xattr xetex xscreensaver xslt xtpax zenmap zip zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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 synaptics" 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" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Toralf Förster gentoo-dev 2016-06-24 16:41:02 UTC
Created attachment 438672 [details]
emerge-history.txt
Comment 2 Toralf Förster gentoo-dev 2016-06-24 16:41:04 UTC
Created attachment 438674 [details]
environment
Comment 3 Toralf Förster gentoo-dev 2016-06-24 16:41:07 UTC
Created attachment 438676 [details]
sys-process:criu-2.2:20160624-162617.log
Comment 4 Dennis Schridde 2016-07-01 08:23:36 UTC
See-Also: bug #587172
Comment 5 M. B. 2016-07-02 15:07:50 UTC
I had the same issue. Re-compiling protobuf-c against protobuf-3.0.0_beta3 resolved the issue. Please test and notify me if the issue persists for you.
Comment 6 Dennis Schridde 2016-07-02 15:30:18 UTC
(In reply to M. B. from comment #5)
> I had the same issue. Re-compiling protobuf-c against protobuf-3.0.0_beta3
> resolved the issue. Please test and notify me if the issue persists for you.

Is this caused by beta2 and beta3 having different ABI?
Comment 7 Toralf Förster gentoo-dev 2016-07-02 15:40:04 UTC
(In reply to M. B. from comment #5)
If a recompile is mandatory - why did you close this bug ? And why  as "worksforme" ? Shouldn't then the ebuild be fixed ?
Comment 8 Toralf Förster gentoo-dev 2016-07-02 17:31:42 UTC
(In reply to M. B. from comment #5)
# emerge -1 protobuf-c && emerge -u criu
made it.

BTW before I tried

# emerge -u protobuf-c && emerge -u criu
which just added protobuf-c to the world file and criu failed (expected).
Comment 9 M. B. 2016-07-02 23:39:47 UTC
(In reply to Dennis Schridde from comment #6)
> (In reply to M. B. from comment #5)
> > I had the same issue. Re-compiling protobuf-c against protobuf-3.0.0_beta3
> > resolved the issue. Please test and notify me if the issue persists for you.
> 
> Is this caused by beta2 and beta3 having different ABI?

Actually, I'm not sure what's going wrong here. It might be that the ABI has changed, but the so-name hasn't changed (still 10.0.0). So I would attribute this problem to protobuf-3.0.0 only being available as beta releases.

(In reply to Toralf Förster from comment #7)
> (In reply to M. B. from comment #5)
> If a recompile is mandatory - why did you close this bug ? And why  as
> "worksforme" ? Shouldn't then the ebuild be fixed ?

I don't see how. I consider this to be a problem with protobuf-c and not protobuf itself.
I could change the subslot from 0/10 to 0/10b, but that smells fishy to me. I'll consider.

(In reply to Toralf Förster from comment #8)
> (In reply to M. B. from comment #5)
> # emerge -1 protobuf-c && emerge -u criu
> made it.
> 
> BTW before I tried
> 
> # emerge -u protobuf-c && emerge -u criu
> which just added protobuf-c to the world file and criu failed (expected).

Just to confirm, it works now?

Also, are you sure that "emerge -u protobuf-c" actually caused a recompile of protobuf-c? (It shouldn't, unless there's a new version of protobuf-c available.)
Comment 10 Dennis Schridde 2016-07-03 00:07:45 UTC
(In reply to M. B. from comment #9)
> (In reply to Dennis Schridde from comment #6)
> > (In reply to M. B. from comment #5)
> > > I had the same issue. Re-compiling protobuf-c against protobuf-3.0.0_beta3
> > > resolved the issue. Please test and notify me if the issue persists for you.
> > 
> > Is this caused by beta2 and beta3 having different ABI?
> 
> Actually, I'm not sure what's going wrong here. It might be that the ABI has
> changed, but the so-name hasn't changed (still 10.0.0). So I would attribute
> this problem to protobuf-3.0.0 only being available as beta releases.
> 
> (In reply to Toralf Förster from comment #7)
> > (In reply to M. B. from comment #5)
> > If a recompile is mandatory - why did you close this bug ? And why  as
> > "worksforme" ? Shouldn't then the ebuild be fixed ?
> 
> I don't see how. I consider this to be a problem with protobuf-c and not
> protobuf itself.
> I could change the subslot from 0/10 to 0/10b, but that smells fishy to me.
> I'll consider.

That's what I'd suggest: 0/10b3 or similar. But I don't know about the Gentoo policy about subslots vs sonames.
Comment 11 Adrian Bassett 2016-07-03 11:01:34 UTC
Without commenting on the politics, I can confirm that the suggestion in comment #5 (https://bugs.gentoo.org/show_bug.cgi?id=586972#c5) enabled the criu upgrade from 2.2 to 2.3 to succeed.
Comment 12 Oleh 2016-07-03 15:52:04 UTC
(In reply to M. B. from comment #9)
> (In reply to Dennis Schridde from comment #6)
> > (In reply to M. B. from comment #5)
> > > I had the same issue. Re-compiling protobuf-c against protobuf-3.0.0_beta3
> > > resolved the issue. Please test and notify me if the issue persists for you.
> > 
> > Is this caused by beta2 and beta3 having different ABI?
> 
> Actually, I'm not sure what's going wrong here. It might be that the ABI has
> changed, but the so-name hasn't changed (still 10.0.0). So I would attribute
> this problem to protobuf-3.0.0 only being available as beta releases.
> 
> (In reply to Toralf Förster from comment #7)
> > (In reply to M. B. from comment #5)
> > If a recompile is mandatory - why did you close this bug ? And why  as
> > "worksforme" ? Shouldn't then the ebuild be fixed ?
> 
> I don't see how. I consider this to be a problem with protobuf-c and not
> protobuf itself.
> I could change the subslot from 0/10 to 0/10b, but that smells fishy to me.
> I'll consider.
> 
> (In reply to Toralf Förster from comment #8)
> > (In reply to M. B. from comment #5)
> > # emerge -1 protobuf-c && emerge -u criu
> > made it.
> > 
> > BTW before I tried
> > 
> > # emerge -u protobuf-c && emerge -u criu
> > which just added protobuf-c to the world file and criu failed (expected).
> 
> Just to confirm, it works now?
> 
> Also, are you sure that "emerge -u protobuf-c" actually caused a recompile
> of protobuf-c? (It shouldn't, unless there's a new version of protobuf-c
> available.)

easy. just do revbump to protobuf-c that depends strictly on newer protobuf-3.0.0_beta3. Assuming that there is no other versions of 3.0.0 present in tree. This is straightforward and less messed with fragile sub-slots deps.
Comment 13 Oleh 2016-07-03 16:18:11 UTC
and i can also confirm that rebuilding protobuf-c after update to protobuf-3.0.0_beta3 fixes criu. So thats good reason to do simple revbump with protobuf dep rised. It's a clean update.
Comment 14 M. B. 2016-07-03 23:54:57 UTC
Submitted my change as https://github.com/gentoo/gentoo/pull/1816.



(In reply to Dennis Schridde from comment #10)
> That's what I'd suggest: 0/10b3 or similar. But I don't know about the
> Gentoo policy about subslots vs sonames.

Yes, that's what I did now.
Policy is quite relaxed. so-names are a good guideline, since they usually correspond well with ABI-changes.
I'm not sure this is the actual issue in this case but updating the subslot triggers a rebuild, so this solution should work just fine.
Comment 15 Yixun Lan archtester gentoo-dev 2016-07-04 04:22:09 UTC
I've pushed this fix[0] to portage tree (many thanks to @tomboy64)

so, "emerge =dev-libs/protobuf-3.0.0_beta3_p1" will trigger dev-libs/protobuf-c a rebuild, and this would make criu build fine.

I'm closing this, if you still have problem, please re-open..

[0] https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=842bba13133c19720953a8d420400b3de075ec5e