Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] emerge sys-libs/glibc-2.25-r8 is stuck at makeinfo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
arcctgx
n00b
n00b


Joined: 07 Jul 2014
Posts: 30

PostPosted: Sat Nov 04, 2017 2:46 pm    Post subject: [SOLVED] emerge sys-libs/glibc-2.25-r8 is stuck at makeinfo Reply with quote

Hi,

Today I was trying to emerge glibc-2.25-r8. The compilation finished successfully, but I have a problem during installation phase. Installation is stuck at the following command:
Code:

LANGUAGE=C LC_ALL=C makeinfo -P /var/tmp/portage/sys-libs/glibc-2.25-r8/work/build-amd64-x86_64-pc-linux-gnu-nptl/manual/ --output=/var/tmp/portage/sys-libs/glibc-2.25-r8/work/build-amd64-x86_64-pc-linux-gnu-nptl/manual/libc.info libc.texinfo

The 'makeinfo' process consumes 100% of one CPU core, and nothing else happens. I left the compilation running overnight, so this was stuck for at least 10 hours before I noticed it's not going anywhere. ;)
/usr/bin/makeinfo is a symlink to /usr/bin/texi2any, which is a Perl program. I ran perl-cleaner --all, but it didn't solve the issue.

I ran the problematic command using strace, the output ends with:
Code:

open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=26244, ...}) = 0
mmap(NULL, 26244, PROT_READ, MAP_SHARED, 3, 0) = 0x7f3c37198000
close(3)                                = 0
futex(0x7f3c36b9c8a8, FUTEX_WAKE_PRIVATE, 2147483647) = 0

So it looks like it's stuck at this futex() call. Full strace output is available at https://pastebin.com/KYs7R6Hb.

I was searching this forum and the web for information about problems with emerging glibc, but I didn't find anything similar to what I described. Has anyone of you seen something like this before?

Here's my emerge --info:
Code:
# > emerge --info
Portage 2.3.8 (python 2.7.12-final-0, default/linux/amd64/13.0/no-multilib, gcc-5.4.0, glibc-2.23-r4, 4.12.12-gentoo x86_64)
=================================================================
System uname: Linux-4.12.12-gentoo-x86_64-Intel-R-_Core-TM-_i3-2120_CPU_@_3.30GHz-with-gentoo-2.4.1
KiB Mem:     4005824 total,    509412 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Sat, 04 Nov 2017 11:45:01 +0000
Head commit of repository gentoo: ec7e9a38b63eb8a4066b231fe97ee7cb8a13e365
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.8.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.32.1::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.15-r2::gentoo
sys-devel/binutils:       2.28.1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

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

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict 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="rsync://gentoo.prz.rzeszow.pl/gentoo http://gentoo.prz.rzeszow.pl"
LANG="pl_PL"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
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 a52 aac aalib acl acpi alsa amd64 berkdb bzip2 cairo cdda cddb cdparanoia cdr chromaprint cli consolekit crypt cxx dbus dri dts dvd dvdr encode fam ffmpeg flac fortran gadu gdbm geoip gif gpm gtk hddtemp iconv jpeg lame lcms libcaca libnotify lm_sensors lzma mng modules mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf pinentry pm-utils png policykit pulseaudio rar readline sdl seccomp session sqlite ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis x264 xattr xcb xdg xml xv xvid zlib" ABI_X86="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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="vesa nouveau" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Last edited by arcctgx on Mon Jan 22, 2018 7:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Tue Nov 14, 2017 11:01 pm    Post subject: Reply with quote

Never seen this before, but have you tried --reallyall instead of just --all?
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
arcctgx
n00b
n00b


Joined: 07 Jul 2014
Posts: 30

PostPosted: Wed Nov 29, 2017 8:08 pm    Post subject: Reply with quote

(Sorry for very late reply, somehow I failed to subscribe to notifications of answers...) :(

Yes, I tried --reallyall as well. texinfo package was rebuilt, but there was no change. In the meantime glibc was updated to version 2.25-r9, but I still experience this issue.

For now I masked this version of glibc so that I can still update other packages, but sooner or later I will have to update glibc.

I really don't know what can I do to debug it further. Do you think I should file a bug report to the maintainers of Gentoo package of glibc?
Back to top
View user's profile Send private message
dilfridge
Developer
Developer


Joined: 18 Sep 2010
Posts: 120
Location: Regensburg, Germany

PostPosted: Thu Nov 30, 2017 9:15 am    Post subject: Reply with quote

Making sure that it doesn't call texinfo at all is on my todo list, and with that this problem should go away too...

That said I have no clue what happens here.
Back to top
View user's profile Send private message
Myrv
n00b
n00b


Joined: 07 Jan 2018
Posts: 8

PostPosted: Tue Jan 09, 2018 5:41 am    Post subject: Same problem with glibc-2.25-r9 Reply with quote

Did you ever find a resolution to this problem?

I've run into the same issue with glibc-2.25-r9. The build process hangs on the makeinfo command:

Code:

LANGUAGE=C LC_ALL=C makeinfo -P /var/tmp/portage/sys-libs/glibc-2.25-r9/work/build-x86-x86_64-pc-linux-gnu-nptl/manual/ --output=/var/tmp/portage/sys-libs/glibc-2.25-r9/work/build-x86-x86_64-pc-linux-gnu-nptl/manual/libc.info libc.texinfo


After some trial and error I sort of tracked down the "cause" of the problem (I know the part of the texinfo file that is causing the issue) but I don't know why the the makeinfo is choking on the file.

The problem, at least in my case, is caused by the texinfo '@cite' command when the documenttype is set to UTF-8. The glic texinfo file uses both the @cite and UTF-8 settings causing my makeinfo to hang.

In my case I can duplicate the libc.texinfo hanging issue with simplest of texinfo files as follows:

Code:
\input texinfo                  @c -*- Texinfo -*-
@comment %**start of header (This is for running Texinfo on a region.)
@setfilename simple.info
@settitle Simple Test
@documentencoding UTF-8

Nothing much here:
@cite{foo}


Trying to run makeinfo on the above will just hang on my machine (just like the glibc build script).

Code:

$ makeinfo -v simple.texinfo
Output file simple.info
<never returns>


If I comment out the documentencoding line or remove the cite command it works fine (although complains about missing nodes in this ultra simple texinfo file)

Code:
$ makeinfo -v simple.texinfo
Output file simple.info
simple.texinfo: warning: document without nodes
$


and generates a .info file:

Code:

This is simple.info, produced by makeinfo version 6.3 from
simple.texinfo.

Nothing much here: 'foo'

Tag Table:

End Tag Table

This generates a


That all said, I don't know why texinfo is crapping out on this markup on my main machine. I do know the cite command seems to generate UTF-8 quotes around the cited value so something in outputing those UTF-8 characters is causing my main Gentoo machine to barf. I know the output includes UTF because all this works on my laptop running an older (and out of date) Gentoo install. I can run the problematic texinfo file without issue. I updated the laptops texinfo and perl to the same version as the ones my desktop and it still works without issue.

Main machine:
Code:

Portage 2.3.5 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-5.4.0, glibc-2.23-r3, 4.9.16-gentoo x86_64)
=================================================================
System uname: Linux-4.9.16-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9550_@_2.83GHz-with-gentoo-2.3
KiB Mem:     8163440 total,    585640 free
KiB Swap:    4194300 total,   2222600 free
Timestamp of repository gentoo: Sat, 06 Jan 2018 01:30:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.26.2::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

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

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
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.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs 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"
LANG="en_CA"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
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 a52 aac acl acpi activities alsa amd64 apache2 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg kde kipi kwallet lcms ldap libnotify mad mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf pdo phonon php plasma png policykit ppds pulseaudio qml qt3support qt5 readline s3tc samba sdl seccomp semantic-desktop session spell sqlite ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="sse sse2 mmx mmxext" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" 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-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Code:

$ equery list texinfo
 * Searching for texinfo ...
[IP-] [  ] sys-apps/texinfo-6.3:0
$ equery list perl   
 * Searching for perl ...
[IP-] [  ] dev-lang/perl-5.24.3:0/5.24


on laptop:

Code:

Portage 2.3.0 (python 2.7.10-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-4.9.3, glibc-2.25-r9, 4.4.26-gentoo x86_64)
=================================================================
System uname: Linux-4.4.26-gentoo-x86_64-Intel-R-_Core-TM-2_CPU_T5500_@_1.66GHz-with-gentoo-2.3
KiB Mem:     2047296 total,    663288 free
KiB Swap:    4194300 total,   3527344 free
Timestamp of repository gentoo: Mon, 08 Jan 2018 00:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.23.2::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo, 2.29.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 6.4.0::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo
Repositories:

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

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs 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://gentoo.gossamerhost.com rsync://mirrors.tera-byte.com/gentoo http://gentoo.mirrors.tera-byte.com/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/"
LANG="en_CA"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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 a52 aac acl acpi activities alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg kde kipi kwallet lcms ldap libnotify mad mng modules mp3 mp4 mpeg mtp multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt3support qt5 readline samba sdl seccomp semantic-desktop spell ssl startup-notification svg tcpd tiff touchpad truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zlib" ABI_X86="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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2 mmxext" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="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-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Code:

$ equery list texinfo
 * Searching for texinfo ...
[IP-] [  ] sys-apps/texinfo-6.3:0
$ equery list perl
 * Searching for perl ...
[IP-] [  ] dev-lang/perl-5.24.3:0/5.24


Now the laptop seems to have a lot more dev-perl packages install than my desktop. Maybe one of those is required but at this point it's starting to get a little tedious blindly guessing.

I'm just wondering if you found a fix for this issue or if anyone else has any ideas what may be causing it. Right now It's blocking my world update

Thanks.
Back to top
View user's profile Send private message
arcctgx
n00b
n00b


Joined: 07 Jul 2014
Posts: 30

PostPosted: Tue Jan 09, 2018 6:02 pm    Post subject: Re: Same problem with glibc-2.25-r9 Reply with quote

Good to know I'm not alone in this. :)

Myrv wrote:
Did you ever find a resolution to this problem?

Unfortunately no.
I intended to try to find a minimal example like you did, but I never found the time to narrow it down so much. Thanks for this input.

With my not-as-minimal reproduction I was only able to find that it doesn't matter which texinfo version is used, they are all hanging in Gentoo (I tried texinfo-6.1, -6.3 and -6.5).
I wasn't able to reproduce the problem on a machine with Slackware64-14.2 and texinfo-6.1. On that machine it looks like texinfo content of glibc-2.25-r9 is processed correctly.

I can confirm that your minimal example hangs in Gentoo using texinfo-6.3. It works after removing "@documentencoding UTF-8" line.
Again, it works fine in Slackware64-14.2 with texinfo-6.1 with "@documentencoding UTF-8" line present.

Myrv wrote:
Right now It's blocking my world update

Same for me.

Maybe we could somehow check the differences between our systems...? We both have one system where texinfo hangs, and one where it doesn't. Do you have any idea where we could start? I must admit that I don't know much about texinfo.
Back to top
View user's profile Send private message
Myrv
n00b
n00b


Joined: 07 Jan 2018
Posts: 8

PostPosted: Wed Jan 10, 2018 10:33 pm    Post subject: Re: Same problem with glibc-2.25-r9 Reply with quote

arcctgx wrote:
Good to know I'm not alone in this. :)

Myrv wrote:
Did you ever find a resolution to this problem?

Unfortunately no.


Well that is unfortunate. In my searching I did find one other similar issue where the suggested fix was to uninstall texinfo altogether then update the glibc libary. Supposedly it will detect the missing texinfo and skip that step but I have not tried it myself (and this was on a non-gentoo source build so some extra finagling may be needed to get this to work in Gentoo).

That said, I would still like to find a solution that doesn't require uninstalling (then reinstalling) packages.

arcctgx wrote:

I intended to try to find a minimal example like you did, but I never found the time to narrow it down so much. Thanks for this input.

With my not-as-minimal reproduction I was only able to find that it doesn't matter which texinfo version is used, they are all hanging in Gentoo (I tried texinfo-6.1, -6.3 and -6.5).
I wasn't able to reproduce the problem on a machine with Slackware64-14.2 and texinfo-6.1. On that machine it looks like texinfo content of glibc-2.25-r9 is processed correctly.


Same, I've tried 3 different versions of texinfo. Even built one from scratch from the source on the texinfo site (outside of portage/ebuild). No luck. My next attempt was Perl which texinfo uses. Tried 2 versions of Perl without success.

The only thing I can say at this point is it appears to be linked with unicode support and string or file I/O.

arcctgx wrote:

Maybe we could somehow check the differences between our systems...? We both have one system where texinfo hangs, and one where it doesn't. Do you have any idea where we could start? I must admit that I don't know much about texinfo.


I have my laptop to compare against right now.

Seeing as there doesn't appear to be a solution yet I'll keep hammering at it although I probably will not have time till this weekend. Will start looking at the deeper dependencies in the texinfo tool chain and try to bring them into alignment with the ones on my working machine. Hopefully I will be able to identify the offending piece.
Back to top
View user's profile Send private message
arcctgx
n00b
n00b


Joined: 07 Jul 2014
Posts: 30

PostPosted: Fri Jan 19, 2018 7:30 pm    Post subject: Reply with quote

I found a workaround. It doesn't address the root cause at all, but at least it allows to update glibc...

I prepared the patch to be applied automatically at build time using epatch_user mechanism [1]. The diff removes the piece of code Myrv identified to be problematic:
Code:
--- glibc-2.25/manual/libc.texinfo   2017-02-05 16:28:43.000000000 +0100
+++ glibc-2.25-workaround/manual/libc.texinfo   2018-01-19 19:20:17.151672912 +0100
@@ -2,7 +2,6 @@
 @comment %**start of header (This is for running Texinfo on a region.)
 @setfilename libc.info
 @settitle The GNU C Library
-@documentencoding UTF-8
 @c '@codequotebacktick on' and '@codequoteundirected on' require
 @c Texinfo 5.0 or later, so use the older equivalent @set variables
 @c supported in Texinfo 4.11 and later.

This patch needs to placed inside directory /etc/portage/patches/sys-libs/glibc-2.25-r9/, and the filename must have extension .patch

If all goes well you will see a message similar to this during prepare phase:
Code:
 * Applying user patches from /etc/portage/patches/sys-libs/glibc-2.25-r9 ...
 *   makeinfo_hang_workaround.patch ...                                        [ ok ]
 * Done with patching

The above fixed the problem with hanging makeinfo on my system. I don't know if it breaks the texinfo documentation in any way. But frankly speaking, I couldn't care less.

I'm not marking the thread as solved, because this workaround doesn't address the root cause at all.

[1] https://wiki.gentoo.org/wiki//etc/portage/patches
Back to top
View user's profile Send private message
arcctgx
n00b
n00b


Joined: 07 Jul 2014
Posts: 30

PostPosted: Sat Jan 20, 2018 12:16 pm    Post subject: Reply with quote

It seems that I found a real solution now.

After I applied my workaround from the post above I started a long overdue world update. I noticed the following message when installing many Python related packages:
Code:
Could not find a UTF-8 locale. This may trigger build failures in
some python packages. Please ensure that a UTF-8 locale is listed in
/etc/locale.gen and run locale-gen.

Which was strange, because I thought I had UTF-8 locales generated:
Code:
$ locale -a
C
POSIX
en_US
en_US.iso88591
en_US.utf8
pl_PL
pl_PL.iso88592
pl_PL.utf8

But in my /etc/locale.gen the locales were defined like this:
Code:
en_US ISO-8859-1
en_US.UTF8 UTF8
pl_PL ISO-8859-2
pl_PL.UTF8 UTF8

That is, without the dash in "UTF8". I changed all instances of "UTF8" to "UTF-8" in my /etc/locale.gen, and regenerated locales with locale-gen. While locale -a lists exactly the same set of locales as before, the problem with makeinfo hanging when "@documentencoding UTF-8" is present in .texinfo file is fixed.

@Myrv, can you check if it's the same in your system?
Back to top
View user's profile Send private message
Myrv
n00b
n00b


Joined: 07 Jan 2018
Posts: 8

PostPosted: Wed Jan 24, 2018 5:30 am    Post subject: Reply with quote

Bah, I missed your last post, would have saved me a day but I basically came to the same conclusion, albeit through a much different route.

The gory details:

I started debugging the makeinfo (which is really texi2any) script. It's a giant Perl script which is unfortunately not a language I know but after a crash course on the Perl debugger I eventually identified the function that was causing the hangup. It was the 'add_next' function in the XSParagraph extension (which thankfully was written in C, a language I do know). Anyway, there is a bug in this function. It doesn't cause the problem by itself however under certain circumstance (will get to that in a bit) it does cause the hangup. Specifically, in the add_next function there is a loop:

Code:
 
while (left > 0)
{
       int char_len = mbrtowc (&w, p, left, NULL);
       left -= char_len;
       p += char_len;
       len++;
}


The intent is to convert a multibyte (UTF8) characters string into wide characters and count the number of wide chars.

Unfortunately there are a couple of issues with this code. One problem is mbrtowc doesn't return an int, it returns a size_t which is unsigned. Second, mbrtowc can fail if it doesn't recognize the multibyte sequence passed to it in 'p' and if it does fail decoding the sequence it returns (size_t)-1. This should be a really big number (because size_t is unsigned) however since this code (erroneously) converts it to an int you end up with a 'char_len' of -1. The code doesn't check for this condition and ends up decremented the 'p' pointer by -1. This puts 'p' outside its defined memory. This is generally a bad thing but it gets worse. More often than not this out of bounds pointer will point to a 0 (or Null) value. When the loop loops back and tries to convert this new 0 'p' it fails again but this time returns a char_len of zero (because it detected a Null/0 character). Again the code doesn't check for this and just blindly subtracts zero from 'left' doing nothing and adds zero to the pointer which also does nothing. The loop is now infinite because the exit condition is 'left <=0' and since neither 'left' or 'p' changes the loop never exits. This is what caused our hang.

Ok, so this is bad code and really should be fixed, but by itself it doesn't cause the problem. Generally the multibyte character string in 'p' is valid and everything "just works". So what causes the failure? Strangely it is not the 'p' string. The problem is in the character table that mbrtowc uses to decode the multibyte characters in the 'p' string. And where does mbrtowc get the character table? (I'm sure you guessed it now) It gets it from the system locale.

Now the problem is a little more subtle. Not having an UTF8 locale defined on your system is not enough to cause the problem. If you are missing an UTF8 locale texinfo is smart enough to detect that and doesn't use UTF8 encoding in the first place. The problem arises when locale has what looks to be a UTF8 locale but it really has a non-UTF character mapping. In this case texinfo generates valid UTF8 strings but mbrtowc tries to decode them with a non-UTF8 character map and wham, you get the infinite loop of death.

Now, on my machine the cause of the bad UTF8 map was a little different than yours. My /etc/locale.gen had the lines

Code:

en_CA.utf8
en_US.utf8


Which tries to define the locales en_CA.utf8 and en_US.utf8 but both are missing the second parameter that defines what character map to use (don't ask me why my file looked like this, I never edited it). You would think this would just cause an error but no, locale-gen parses those two lines as a single line:

Code:

en_CA.utf8  en_US.utf8


Which despite 'en_US.utf8' not being a valid character map allowed localedef to generate an en_CA.utf8 locale that does not have a UTF8 character map (ultimately similar to your local.gen defining a locale with an invalid character map).

Anyway, the TL;DR is if your locale provides a UTF8 locale that doesn't actually have an UTF8 character map then texinfo will hang in an infinite loop when trying to produce UTF8 output.

And to answer your question,

Yes, nuking my existing locale archive and regenerating the locales with a correct locale.gen file fixed (or more aptly avoids) the texinfo infinite loop issue and allowed me to upgrade my glibc (and hopefully my world, which is next on the list).

Sorry I didn't come to this conclusion earlier but at least we both eventually found the solution. Thanks for your comments.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Fri Jan 26, 2018 3:13 am    Post subject: Reply with quote

Myrv, did you file a bug report about this? If your diagnosis is correct, this ought to be fixed in the source so that users get a reasonable error message rather than an infinite loop.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Fri Jan 26, 2018 2:27 pm    Post subject: Reply with quote

I think locale-gen is the one that should be bug report.
Look
Code:
>cat /etc/locale.gen
fr_FR UTF-8
> locale-gen
 * Generating 1 locales (this might take a while) with 1 jobs
 *  (1/1) Generating fr_FR.UTF-8 ...                                      [ ok ]
 * Generation complete
>echo "en_US.utf8" >> /etc/locale.gen
locale-gen
 * Generating locale-archive: forcing # of jobs to 1
 * Generating 1 locales (this might take a while) with 1 jobs
 * Bad entry in locale.gen: 'UTF-8 '; skipping
 *  (1/1) Generating en_US.utf8 ...
character map file `fr_FR' not found: No such file or directory           [ !! ]
 * Generation complete

locale-gen is the one doing shit for me, many programs expect a good locale, and even they shouldn't assume one is properly set, i think still the assumption is safe, you cannot validate everything yourself no?
the real validator is locale-gen, but as it fail, user is allow to propagate bad settings on every programs.
while it do report an error, still locale-gen accept to use "en_US.utf8" alone while it's format is clearly <locale name> <charset>
it's even worst because not only it accept the bad format of "en_US.utf8" but it reject my good one with "fr_FR UTF-8", lol what a failure!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum