Bug 2182414 - [RHEL8.6/man-db/Bug] /usr/bin/mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2"): Invalid argument errs
Summary: [RHEL8.6/man-db/Bug] /usr/bin/mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: man-db
Version: 8.6
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Lukas Javorsky
QA Contact: RHEL CS Apps Subsystem QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-28 15:06 UTC by Rajesh Dulhani
Modified: 2023-07-10 09:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-10 09:39:28 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-153296 0 None None None 2023-03-28 15:10:49 UTC
Red Hat Issue Tracker RHELPLAN-153297 0 None None None 2023-03-28 15:10:46 UTC

Description Rajesh Dulhani 2023-03-28 15:06:46 UTC
Description of problem:

On the AWS instance seen only  " /usr/bin/mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2"): Invalid argument" is logged 5 times every time the man db cache 
is updated.

~~~
:~$ sudo systemctl status  man-db-cache-update
● man-db-cache-update.service
   Loaded: loaded (/usr/lib/systemd/system/man-db-cache-update.service; static; vendor preset: disabled)
   Active: inactive (dead)

Mar 23 16:12:19 ip-10-214-52-123.eu-west-1.compute.internal sh[1797552]: /usr/bin/mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2"): Invalid argument
Mar 23 16:12:19 ip-10-214-52-123.eu-west-1.compute.internal sh[1797556]: /usr/bin/mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2"): Invalid argument
Mar 23 16:12:19 ip-10-214-52-123.eu-west-1.compute.internal sh[1797560]: /usr/bin/mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2"): Invalid argument
Mar 23 16:12:19 ip-10-214-52-123.eu-west-1.compute.internal sh[1797564]: /usr/bin/mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2"): Invalid argument
Mar 23 16:12:19 ip-10-214-52-123.eu-west-1.compute.internal sh[1797568]: /usr/bin/mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2"): Invalid argument
Mar 23 16:12:21 ip-10-214-52-123.eu-west-1.compute.internal systemd[1]: man-db-cache-update.service: Succeeded.
Mar 23 16:12:21 ip-10-214-52-123.eu-west-1.compute.internal systemd[1]: Started man-db-cache-update.service.
Mar 23 16:33:40 ip-10-214-52-123.eu-west-1.compute.internal systemd[1]: Starting man-db-cache-update.service...
Mar 23 16:33:40 ip-10-214-52-123.eu-west-1.compute.internal systemd[1]: man-db-cache-update.service: Succeeded.
Mar 23 16:33:40 ip-10-214-52-123.eu-west-1.compute.internal systemd[1]: Started man-db-cache-update.service.
~~~


Version-Release number of selected component (if applicable):

Package - man-db-2.7.6.1-18.el8.x86_64.rpm


Actual results:

On the AWS instance seen only  " /usr/bin/mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2"): Invalid argument" is logged 5 times every time the man db cache 
is updated.

Expected results:

Invalid argument should not be looged in.


Additional info:

Comment 1 Lukas Javorsky 2023-03-29 10:20:27 UTC
Thank you for reporting.

Could you please find out if this bug is reproducible?
If so, could you please include the reproducer so we can debug it?

Comment 12 Peter Vreman 2023-04-24 14:10:03 UTC
Summary of analysis:
The ISO8859-2 support (/usr/lib64/gconv/ISO8859-2.so) provided by the optional rpm glibc-gconv-extra

Reproducer:
- Remove optional rpm glibc-gconv-extra
- Install vim-common rpm that has a few man pages where it tries to use iso8859-2
- Run 'mandb -c'

See attached case for details

Comment 13 Honza Horak 2023-06-27 15:15:55 UTC
I confirm that the reproducer works for me as well:

# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.6 (Ootpa)

# rpm -q vim-minimal glibc-gconv-extra
vim-minimal-8.0.1763-19.el8_6.4.x86_64
package glibc-gconv-extra is not installed

# mandb -c
...skipped...
Checking for stray cats under /var/cache/man/ko...
Processing manual pages under /usr/share/man/pl...
Updating index cache for path `/usr/share/man/pl/man1'. Wait...mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2"): Invalid argument
mandb: warning: /usr/share/man/pl/man1/evim.1.gz: whatis parse for evim(1) failed
mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2"): Invalid argument
mandb: warning: /usr/share/man/pl/man1/vim.1.gz: whatis parse for ex(1) failed
mandb: warning: /usr/share/man/pl/man1/vim.1.gz: whatis parse for rview(1) failed
mandb: warning: /usr/share/man/pl/man1/vim.1.gz: whatis parse for rvim(1) failed
mandb: warning: /usr/share/man/pl/man1/vim.1.gz: whatis parse for view(1) failed
mandb: warning: /usr/share/man/pl/man1/vim.1.gz: whatis parse for vim(1) failed
mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2"): Invalid argument
mandb: warning: /usr/share/man/pl/man1/vimdiff.1.gz: whatis parse for vimdiff(1) failed
mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2"): Invalid argument
mandb: warning: /usr/share/man/pl/man1/vimtutor.1.gz: whatis parse for vimtutor(1) failed
mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-2"): Invalid argument
mandb: warning: /usr/share/man/pl/man1/xxd.1.gz: whatis parse for xxd(1) failed
Updating index cache for path `/usr/share/man/pl/man5'. Wait...done.
...skipped...
Checking for stray cats under /usr/local/share/man...
Checking for stray cats under /var/cache/man/local...
113 man subdirectories contained newer manual pages.
3879 manual pages were added.
0 stray cats were added.

What is not clear to me is whether expecting this to work fine without glibc-gconv-extra package installed is a valid use case, because as the description of this package says: "This package contains all iconv converter modules built in glibc."

I understand that allowing users to uninstall this package and then seeing some commands to yield warnings is not perfect.

On the other hand, allowing to uninstall this package is definitely a valid use case for systems where a minimal footprint is required. In those cases, accepting some commands not to run perfectly might be what we actually expect. In other words, uninstalling the package has some cost.

Adding a strict dependency to man-db to require glibc-gconv-extra package everytime would disallow to have man command available for the mentioned minimal footprint systems, so I don't see this as a perfect scenario.

There is also an easy work-around -- install glibc-gconv-extra package for systems where `mandb -c` command should not yield any warnings, which seems like an easy step.

Based on all the thoughts above, I'd incline to keep the status quo myself.

Comment 14 Lukas Javorsky 2023-06-28 08:34:38 UTC
Hi Peter,

I apologize for the delay.

I agree with Honza's proposal, as we know some systems aim for a minimal footprint, we need to keep that in mind.

The `glibc-gconv-extra` alone has 6.1M size which is 3 times bigger than the `man-db` package with 1.9M size.

We can add 'Suggests: glibc-gconv-extra' to the man-db package.

Comment 15 Peter Vreman 2023-06-28 10:01:33 UTC
A KB Solution article with the content of the BZ on the warning and the root cause (missing iconv tables provided by glibc-gconv-exrta) and the reasons why there is no dependency and how to fix it will also help. At least for me it would have saved many hours of running strace if the googling for the warning line would have a match in the KB.

Having the Suggests might be an additional improvement

Comment 16 Lukas Javorsky 2023-06-29 08:07:20 UTC
Yes, I'll create the article with the help of our Docs team, and I'll add the 'Suggests'.

Thank you so much for the report, Peter.

We will keep this BZ updated with the progress.

Comment 19 Rajesh Dulhani 2023-07-07 09:49:44 UTC
KCS article is created --> https://access.redhat.com/solutions/7023601 and published.

Comment 21 Lukas Javorsky 2023-07-10 09:39:28 UTC
We've decided to add `Recommends` to the Fedora repository (for future RHELs) for now.
As this won't bring much value to backport it to current RHEL distros.

The solution article is the important one, and we want to thank you Peter for your investigation work.


Note You need to log in before you can comment on or make changes to this bug.