FS#18722 - [man-db] col throws warning/error after upgrade
Attached to Project:
Arch Linux
Opened by Radu Potop (wooptoo) - Wednesday, 17 March 2010, 14:16 GMT
Last edited by Andrea Scarpino (BaSh) - Tuesday, 21 June 2011, 05:59 GMT
Opened by Radu Potop (wooptoo) - Wednesday, 17 March 2010, 14:16 GMT
Last edited by Andrea Scarpino (BaSh) - Tuesday, 21 June 2011, 05:59 GMT
|
Details
Description:
col throws the warning/error below after man-db upgrade. This happens when /etc/cron.daily/man-db is executed (I keep receiving this on system email). col: Invalid or incomplete multibyte or wide character Package versions: col: util-linux-ng 2.17.1-1 man-db 2.5.7-1 |
This task depends upon
Closed by Andrea Scarpino (BaSh)
Tuesday, 21 June 2011, 05:59 GMT
Reason for closing: Duplicate
Additional comments about closing: FS#24544
Tuesday, 21 June 2011, 05:59 GMT
Reason for closing: Duplicate
Additional comments about closing:
[root@workstation64 andyrtr]#
I cannot confirm this.
It wasn't fixed before. Postfix failed to start for some reason and I wasn't receiving system mail. Oops.
$ rm /var/cache/man/index.db
$ LANG=C /etc/cron.daily/man-db
col: Invalid or incomplete multibyte or wide character
If I use the default LANG, i.e. en_US.UTF-8 then there are no errors.
The col command is used in mandb, but I expect that it doesnt show up because mandb is written in C and not bash.
I guess a patch for /etc/cron.daily/man-db could be:
37c37
< ${UPDATEMANDB}
---
> LANG=$LANG ${UPDATEMANDB}
http://bazaar.launchpad.net/~cjwatson/man-db/trunk/revision/1361
I can't reproduce it. Colin, any idea?
I've successfully executed:
# rm /var/cache/man/index.db
# LANG=C /etc/cron.daily/man-db
wooptoo: Can you please add
* * * * * /usr/bin/env > /home/username/cron-env
to your root crontab then wait for a minute or so and then post here the contents of cron-env.
SHELL=/bin/sh
USER=root
PATH=/sbin:/usr/sbin:/bin:/usr/bin
PWD=/root
SHLVL=1
HOME=/root
LOGNAME=root
_=/usr/bin/env
So it seems that the cron env contains no LANG.
Can you please try this approach to simulate cron http://serverfault.com/questions/85893/running-a-cron-job-manually-and-immediately to see if you get an error, just to check if simulation works.
Have you set a valid locale in /etc/rc.conf?
Is LANG set for the cron process itself?
$ sudo bash -c "tr '\0' '\n' < /proc/$(pidof crond)/environ"
I'm thinking that this might be pointing to a larger problem in our initscripts. After some digging, I've found 'telinit -e', which claims to be able to modify the environment in which init launches processes. However, it doesn't appear to work as it advertises.
Yes, I do: LOCALE="en_US.UTF-8"
> Is LANG set for the cron process itself?
# cat /proc/$(pidof crond)/environ
PATH=/sbin:/usr/sbin:/bin:/usr/bin
No it isn't.
LOCALE="en_US.UTF-8"
DAEMON_LOCALE="no"
And $ sudo bash -c "tr '\0' '\n' < /proc/$(pidof crond)/environ" gives me
CONSOLE=/dev/console
TERM=linux
SHELL=/bin/sh
INIT_VERSION=sysvinit-2.88
PATH=/sbin:/usr/sbin:/bin:/usr/bin
vga=795
RUNLEVEL=3
PWD=/
LANG=C
PREVLEVEL=N
HOME=/
SHLVL=2
_=/usr/sbin/crond
What about you, wooptoo?
Dave, does man-db uses LANG of parent process i.e. crond? (There is no LANG in the environment of the program executed by crond.)
# tr '\0' '\n' < /proc/$(pidof crond)/environ
CONSOLE=/dev/console
TERM=linux
SHELL=/bin/sh
INIT_VERSION=sysvinit-2.88
PATH=/sbin:/usr/sbin:/bin:/usr/bin
RUNLEVEL=3
PWD=/
LANG=C
PREVLEVEL=N
SHLVL=2
_=/usr/sbin/crond
1) its own environ
2) anything the user sets
The larger issue here is #1 -- the environ for crond isn't being populated correctly, and I'm not sure why.
FS#24544. What do you think, Dave?Moving to close this as a dupe...