Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 397489 - =sys-libs/glibc-2.15-r3 - Failed Patch: 0068_all_glibc-2.14-glibc-revert-fseek-on-fclose.patch - Aborted ${patch_cmd} --dry-run -f < "${PATCH_TARGET}" 2>&1
Summary: =sys-libs/glibc-2.15-r3 - Failed Patch: 0068_all_glibc-2.14-glibc-revert-fsee...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 397665 424543 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-03 12:16 UTC by Brian Harring (RETIRED)
Modified: 2013-10-12 14:19 UTC (History)
3 users (show)

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


Attachments
build.log (file_397489.txt,4.81 KB, text/plain)
2013-07-19 20:56 UTC, Tom Wijsman (TomWij) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Harring (RETIRED) gentoo-dev 2012-01-03 12:16:13 UTC
Working your way through the glibc patches, once you hit 0068*, the following invocation sigaborts due to a failed assert:

patch -p3 -i path-to-0068*.patch -f --dry-run

failed assert is w/in intuit_diff_type, line 631.c of pch.c w/in patch.

Both patch 2.5.9 and 2.5.9-r1 are failing on this.  Patch shouldn't be aborting, but filing this against glibc initially since the patch itself should be tweaked to not piss off patch, while addressing patch in parallel...

System in question is amd64, sane cflags (debugging is enabled, that's it), although a quick look at the code doesn't show any cflag/architecture specific issues- just plain looks like a bad patch from the glibc standpoint which is mighty odd.
Comment 1 Brian Harring (RETIRED) gentoo-dev 2012-01-03 15:30:56 UTC
relevant gdb output:

ferringb@localhost /var/tmp/portage/sys-libs/glibc-2.14.1-r2/work/glibc-2.14.1 $ gdb --args ~/tmp/patch-2.5.9/patch -p3 -f --dry-run -i ../patches/0068_all_glibc-2.14-glibc-revert-fseek-on-fclose.patch
GNU gdb (Gentoo 7.3.1 p2) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /home/ferringb/tmp/patch-2.5.9/patch...done.
(gdb) r
Starting program: /home/ferringb/tmp/patch-2.5.9/patch -p3 -f --dry-run -i ../patches/0068_all_glibc-2.14-glibc-revert-fseek-on-fclose.patch
missing header for unified diff at line 29 of patch
can't find file to patch at input line 29
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|https://bugs.gentoo.org/370413
|http://sourceware.org/bugzilla/show_bug.cgi?id=12724
|https://bugzilla.novell.com/show_bug.cgi?id=711829
|http://redmine.ruby-lang.org/issues/5108
|
|This reverts the following patch from upstream PR 12724,
|which can cause surprising changes in fclose behaviour when multiple
|file handles refer to the same file (fclose on one changes file position
|on the other).
|See bnc #711829.
|
|git diff -R 'fcabc0f8b185f9e0a9289720be5ede6c39b3bf21^!'
|
|2011-05-13  Ulrich Drepper  <drepper@gmail.com>
|
|       [BZ #12724]
|       * libio/fileops.c (_IO_new_file_close_it): Always flush when
|       currently writing and seek to current position when not.
|       * libio/Makefile (tests): Add bug-fclose1.
|       * libio/bug-fclose1.c: New file.
|
| 2011-05-12  Ulrich Drepper  <drepper@gmail.com>
|
|       [BZ #12511]
|diff --git b/libio/Makefile a/libio/Makefile
|index ec30904..83b9458 100644
|--- b/libio/Makefile
|+++ a/libio/Makefile
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
missing header for unified diff at line 49 of patch
patch: pch.c:621: intuit_diff_type: Assertion `i0 != NONE' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff7a838b5 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
        in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
#0  0x00007ffff7a838b5 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff7a84bb5 in *__GI_abort () at abort.c:93
#2  0x00007ffff7a7c66e in __assert_fail_base (fmt=<optimized out>, assertion=0x41448b "i0 != NONE", file=0x414125 "pch.c", line=<optimized out>, function=<optimized out>) at assert.c:96
#3  0x00007ffff7a7c730 in *__GI___assert_fail (assertion=0x41448b "i0 != NONE", file=0x414125 "pch.c", line=621, function=0x414d20 "intuit_diff_type") at assert.c:105
#4  0x000000000040a969 in intuit_diff_type () at pch.c:621
#5  0x00000000004097c4 in there_is_another_patch () at pch.c:210
#6  0x00000000004075a0 in main (argc=6, argv=0x7fffffffdfc8) at patch.c:177
(gdb) q

emerge --info;

Portage 2.1.10.44 (default/linux/amd64/10.0/developer, gcc-4.5.3, glibc-2.14.1-r1, 3.1.6 x86_64)
=================================================================
System uname: Linux-3.1.6-x86_64-Intel-R-_Core-TM-_i7-2920XM_CPU_@_2.50GHz-with-gentoo-2.1
Timestamp of tree: Tue, 03 Jan 2012 15:00:01 +0000
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.2-r3, 3.1.4-r3, 3.2.2
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26::<unknown repository>
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.7
sys-apps/sandbox:         2.5::<unknown repository>
sys-devel/autoconf:       2.68::<unknown repository>
sys-devel/automake:       1.11.2
sys-devel/binutils:       2.21.1-r1::<unknown repository>
sys-devel/gcc:            4.5.3-r2, 4.6.0::<unknown repository>
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r1
Repositories: gentoo local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -g -ggdb -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
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="-O2 -pipe -g -ggdb -march=native"
DISTDIR="/var/cache/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles multilib-strict news parallel-fetch pristine-buildpkg protect-owned sandbox sfperms sign splitdebug strict test-fail-continue unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C"
LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/var/db/repos/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/db/repos/gentoo"
PORTDIR_OVERLAY="/var/db/repos/harrings"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="a52 aac acl acpi alsa amd64 amr aotuv async avx berkdb bitmap-fonts bzip2 cairo caps cdda cdparanoia cli cracklib crypt cups custom-cflags cxx devicemapper dri dts dvd dvdr dvdread emboss encode exif fam fame firefox flac fontconfig gdbm gdu gif hpn iconv ipv6 jpeg kvm lcms libnotify libyaml lzo mad matroska mmap mmx mmxext mng modules mp3 mp4 mpeg mudflap multilib multitarget ncurses nls nptl nptlonly nsplugin ogg oggvorbis opengl openmp pam pango pch pcre pdf png ppds pppd pth qt3support readline rle sdl session snmp spell sse sse2 sse3 sse4 ssl ssse3 startup-notification svg sysfs tcpd theora tiff truetype truetype-fonts type1-fonts udev unicode usb utf8 vaapi vorbis vorbis-psy x264 xcb xml xorg xulrunner xv xvid zlib" 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" 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="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 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="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" USERLAND="GNU" VIDEO_CARDS="intel" 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

Ignore the unknown repository bit; that's from gentoo, just is a hold over from a local vdb bug.

Oddly cannot replicate this on my headless server- basically same setup, flags, use, active compiler is 4.5, not 4.6 (I have 4.6 for experimentation only).

Comments?  I poked through the source... it's fairly freaking heinous, thus I'm rather disinterested in trying to sort out why patch is complaining here...
Comment 2 SpanKY gentoo-dev 2012-01-03 20:04:39 UTC
upgrade your patch.  we don't care about patch-2.5.9* anymore.
Comment 4 SpanKY gentoo-dev 2012-01-04 19:34:38 UTC
*** Bug 397665 has been marked as a duplicate of this bug. ***
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2012-07-03 16:24:05 UTC
*** Bug 424543 has been marked as a duplicate of this bug. ***
Comment 6 Peter Stuge 2012-10-10 14:32:29 UTC
(In reply to comment #3)
> should be all set now in the tree; thanks for the report!
> 
> Commit message: Block older versions of patch so we don't have to test
> against them
> http://sources.gentoo.org/sys-libs/glibc/glibc-2.13-r2.ebuild?r1=1.8&r2=1.9
> http://sources.gentoo.org/sys-libs/glibc/glibc-2.13-r4.ebuild?r1=1.9&r2=1.10
> http://sources.gentoo.org/sys-libs/glibc/glibc-2.14.1-r1.ebuild?r1=1.1&r2=1.2
> http://sources.gentoo.org/sys-libs/glibc/glibc-2.14.1-r2.ebuild?r1=1.1&r2=1.2
> http://sources.gentoo.org/sys-libs/glibc/glibc-2.14.1.ebuild?r1=1.3&r2=1.4
> http://sources.gentoo.org/sys-libs/glibc/glibc-2.14.ebuild?r1=1.12&r2=1.13

Upgrading an old system ran into this bug in sys-libs/glibc-2.15-r3 again. patch 2.5.9.

This seems like the wrong approach. portage notices the block on the installed patch version, but by default does not suggest to fix it up and happily fails to emerge glibc using the blocked patch. I think a versioned patch DEPEND would be more efficient?
Comment 7 Ben Kohler gentoo-dev 2013-07-19 20:53:06 UTC
This blocker isn't accomplishing what it's supposed to-- it needs to either be !!<sys-devel/patch-2.6 or >=<sys-devel/patch-2.6 in DEPEND
Comment 8 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-19 20:56:50 UTC
Created attachment 353680 [details]
build.log

Discovered by bande18 at #gentoo.
Comment 9 Ryan Hill (RETIRED) gentoo-dev 2013-07-20 22:08:06 UTC
(In reply to Ben Kohler from comment #7)
> This blocker isn't accomplishing what it's supposed to-- it needs to either
> be !!<sys-devel/patch-2.6 or >=<sys-devel/patch-2.6 in DEPEND

Neither of those is a valid DEPEND atom in EAPI 0.
Comment 10 Ben Kohler gentoo-dev 2013-07-20 22:16:09 UTC
(In reply to Ryan Hill from comment #9)
> (In reply to Ben Kohler from comment #7)
> > This blocker isn't accomplishing what it's supposed to-- it needs to either
> > be !!<sys-devel/patch-2.6 or >=<sys-devel/patch-2.6 in DEPEND
> 
> Neither of those is a valid DEPEND atom in EAPI 0.

Sorry, there was a typo there.  Is there some reason >=sys-devel/patch-2.6 won't work there though?  As it is, it is not forcing the patch upgrade before glibc.
Comment 11 SpanKY gentoo-dev 2013-09-05 06:53:48 UTC
time has obsoleted this for the majority of users