When opening some man pages (userdel, rm,...), an error is reportet. No man page appears. I switched back to man-1.5p. Now everything is fine again... This error occurs only to some (let me guess... 30%? of all man pages) Reproducible: Always Steps to Reproduce: 1.update to man-1.6 2.enter: man userdel 3. Expected Results: *huh* bring me a beer? mh... or at least show me the man page i requested
`man userdel` and `man rm` both work for me; emerge --info, please. Also please port the error you encounter.
There's more than one person in the german partof forums.g.o mentioning this problem and while I don't face such issues, man pages do not get cached for me (anymore?). The relevant category directories stay empty, even though man.conf isn't modified not to cache and permissions are fine.
Adding the forums URL. @carlo: Speicherzugriffsfehler = error accessing memory or something like that?
so man-1.5p works fine ? what do you have your language settings to ? (i dont know because you neglected to provide `emerge info`)
*** Bug 97614 has been marked as a duplicate of this bug. ***
Hi, Speicherzugriffsfehler = segmentation fault (imho) Poly
I can confirm this issue, it is triggered from locale setting, uncached man pages with locale set to "de_DE@euro" cause a segfault of /usr/bin/man, cached man pages and uncached man pages with locale set to "en_EN" show up properly... Please mask version 1.6 and test this package further, version 1.5p lacks no vital features and having no functional man pages is really annoying... Gentoo Base System version 1.6.12 Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.200 41102-r1, 2.4.31-grsec i686) ================================================================= System uname: 2.4.31-grsec i686 Pentium III (Katmai) Python: dev-lang/python-2.3.5 [2.3.5 (#1, Apr 30 2005, 16:53:41)] dev-lang/python: 2.3.5 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentiumpro -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/ config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentiumpro -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/ distributions/gentoo" LC_ALL="de_DE@euro" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 activefilter bitmap-fonts bzlib crypt ctype dbm emboss erandom ethereal flatfile fortran ftp gdbm gnutls hardened icc ifc maildir mbox memlimit mhash m ime mmap mmx mp3 mysqli ncurses nls pam pcntl pcre perl pic pie posix readline r ecode sasl shared sharedmem slang sockets socks5 sse ssl sysvipc szip tcpd truet ype-fonts type1-fonts unicode zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Created attachment 62407 [details] ltrace of man userdel 1. LANG=de_DE man userdel => SEGFAULT 2. LANG= man userdel => works 3. LANG=de_DE man userdel => works 4. rm /var/cache/man/cat8/userdel.8.bz2 5. LANG=de_DE ltrace -s255 man userdel => attached The segfault occurs in vfprintf, the message translates to: "File %s could not be opened for output"
Created attachment 62412 [details, diff] man-1.6-message-order.patch OK, here ist the solution. Those guys added some messages in the english message file only, and not at the end but somewhere in between, with the messages identified by position. So man got the wrong message, one containing a %s where no argument was supplied in the call, resulting in this segmentation fault. I'll try to take this upstream as well.
Created attachment 62413 [details, diff] patch to man-1.6.ebuild Patch ebuild to apply attachment 62412 [details, diff] and solve bug 97612 as well.
*** Bug 97721 has been marked as a duplicate of this bug. ***
have you e-mailed upstream yet ? if not i can do so ...
*** Bug 97803 has been marked as a duplicate of this bug. ***
(in reply to comment #12) July 1 I did send an email to flucifredi at acm. No reply so far. But It's been weekend, so let's wait a hope for the best. In the meantime I think you should apply the patch at distribution level, since those segfaults are rather annoying to ~ARCH users.
so now is two days since last post and no sign of amend in emerge?
Still no news from upstream. SpanKY, perhaps you can give this issue more weight by sending an email as well, as you offered in comment #12. Anyway, I fear this might take some time, so please include the patch in portage.
Mail from the upstream maintainer; he'll look into it next week.
there's something odd here: Medusa% man dig zsh: segmentation fault man dig Medusa% strace man dig <snip> open("/usr/share/locale/nl_NL@euro/LC_MESSAGES/man", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/locale/nl/man", O_RDONLY) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=6000, ...}) = 0 mmap2(NULL, 6000, PROT_READ, MAP_PRIVATE, 4, 0) = 0xa7e32000 close(4) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ Medusa% strace man dig > bla <snip> Medusa% cat bla DIG(1) DIG(1) NAME dig - DNS lookup utility <snip> BUGS There are probably too many query options. BIND9 Jun 30, 2000 DIG(1) The man page does show up! LC_ALL = nl_NL@euro "info dig" also works. Because info can also show man pages, this can be used as a temporary workaround.
As far as I could see from gripes.c, the precedence of locale environment variables is reversed for man; LANG has precedence over LC_MESSAGES has precedence over LC_ALL. I think I'll report this as a bug upstream as well. (in reply to comment #18) Please also state the settings of those other variables. It would be also interesting which of those operations were executed as root and which as a normal user. Because man is usually setgid man to access the man page cache, it should by impossible to strace man as a normal user. And for root you usually should not have set locale, so probably the page got formatted correctly while stracing as root? The message when man failed for me was about the man page being formatted, so for all pages that were already in the cache, man worked fine. To reproduce the bug, you might have to remove /var/cache/man/cat8/userdel.8.bz2.
you're right: Medusa% man dig zsh: segmentation fault man dig Medusa% sudo man dig Formatting page, please wait... <man page displays correctly> Medusa% cat /etc/env.d/02locale LC_ALL=nl_NL@euro LANG=nl_NL@euro LANGUAGE=nl_NL@euro LINGUAS="nl" All of the commands in #18 were done as a normal user. The enviroment settings for all users on my system are the same: Medusa% echo $LANG nl_NL@euro Medusa% echo $LC_MESSAGES Medusa% echo $LC_ALL nl_NL@euro Medusa% su Password: Medusa# echo $LANG nl_NL@euro Medusa# echo $LC_MESSAGES Medusa# echo $LC_ALL nl_NL@euro setting the LC_MESSAGES enviroment variable fixed it for me as normal user: Medusa% LC_MESSAGES="nl_NL@euro" man dig <page displays correctly!> Medusa% LC_MESSAGES="aaaa" man dig <page displays correctly> I guess this is the whole problem: LC_MESSAGES should be set (or at least, not be blank, except for the root user. After adding LC_MESSAGES="nl_NL@euro" to /etc/env.d/02locale, I can use man again. (without the patch)
There is some strange behaviour in the man sources with respect to which environment variables are used where. Notice that LC_ALL is AFAIK indended as an override; you set this only if you simply want to switch "everything" temporarily. Otherwise you set LANG for defaults, and can fine tune different locale categories by setting different LC_* variables to other settings. So LANG is default, LC_* is more specific, and LC_ALL is override. All those settings are neatly printed by locale(1p), which is a lot easier than echoing all those variables manually. A simple "su" takes large portions of the user environment with it, the cleaner approach would be "su -", which might set those settings differently. I'm still surprised that simply setting LC_MESSAGES seems to solve the problem for you. I know from the sources that it will still fail if it tries to display some unlucky message. Somehow setting this variable seems to have deactivated output of those messages during default operation for you. Strange. But I don't believe this to be a viable workaround for everybody. So please include patch in portage soon! I met another bunch of people today who "solved" the issue by removing the category subdirs of the cache, thus suppressing the "formatting..." message. But this is not the way it should be.
nope, /home/heimat> locale LANG=pl_PL LC_CTYPE="pl_PL" LC_NUMERIC="pl_PL" LC_TIME="pl_PL" LC_COLLATE="pl_PL" LC_MONETARY="pl_PL" LC_MESSAGES="pl_PL" LC_PAPER="pl_PL" LC_NAME="pl_PL" LC_ADDRESS="pl_PL" LC_TELEPHONE="pl_PL" LC_MEASUREMENT="pl_PL" LC_IDENTIFICATION="pl_PL" LC_ALL=pl_PL (the same for root) and >man fdisk segfaults (user) #man [sth] segfaults (root)
added to man-1.6-r1 please post any updates you receive from the man author, thanks
*** Bug 98643 has been marked as a duplicate of this bug. ***
Created attachment 66650 [details] man-1.6a.ebuild Frederico Lucifredi released a minor fix, man-1.6a, to address this bug as well as the parallel make issue. The attached ebuild seems to work, although it perhaps should be tested some more. Frederico wrote that he is "planning to review the internationalization and coherence of the environment use in the upcoming minor releases".
1.6a is already in portage :P