man: command exited with status 4

Bug #1778684 reported by Deepak
54
This bug affects 12 people
Affects Status Importance Assigned to Milestone
man-db
Fix Released
Unknown
man-db (Ubuntu)
Confirmed
Undecided
Unassigned
Bionic
Incomplete
High
Unassigned

Bug Description

Runnung command below and corresponding output:
$man man
shows blank page with status line as
 Manual page man(1) line ?/? (END) (press h for help or q to quit)

After quitting it shows below output:
man: command exited with status 4: (cd /usr/share/man && /usr/lib/man-db/zsoelim) | (cd /usr/share/man && /usr/lib/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE) | (cd /usr/share/man && preconv -e UTF-8) | (cd /usr/share/man && tbl) | (cd /usr/share/man && nroff -mandoc -rLL=164n -rLT=164n -Tutf8)

The below command returns
man man > manerror.txt
man: man: can't execute tbl: Permission denied
can't execute preconv: Permission denied
man: can't execute col: Permission denied
groff: couldn't exec troff: Permission denied
man: command exited with status 4: (cd /usr/share/man && /usr/lib/man-db/zsoelim) | (cd /usr/share/man && /usr/lib/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE) | (cd /usr/share/man && preconv -e UTF-8) | (cd /usr/share/man && tbl) | (cd /usr/share/man && nroff -mandoc -rLL=164n -rLT=164n -Tutf8)

The Installed man-db details on my Ubuntu Gnome Desktop 18.04:
Package: man-db
Version: 2.8.3-2
State: installed
Automatically installed: no
Multi-Arch: foreign
Priority: standard
Section: doc
Maintainer: Colin Watson <email address hidden>
Architecture: amd64
Uncompressed Size: 2,486 k
Depends: bsdmainutils, debconf (>= 1.2.0) | debconf-2.0, groff-base (>= 1.18.1.1-15), libc6 (>= 2.17), libgdbm5 (>= 1.12), libpipeline1 (>= 1.5.0), libseccomp2 (>=
         2.1.0), zlib1g (>= 1:1.1.4)
PreDepends: dpkg (>= 1.16.1~)
Suggests: apparmor, groff, less, www-browser
Conflicts: man, suidmanager (< 0.50), man-db:i386
Breaks: manpages-tr (< 1.0.5.1-3), manpages-zh (< 1.5.2-1.1)
Replaces: man, manpages-de (< 0.5-4), manpages-tr (< 1.0.5.1-3), manpages-zh (< 1.5.2-1.1), nlsutils
Provides: man, man-browser, man-browser:i386, man-db:i386 (= 2.8.3-2)
Provided by: man-db:i386 (2.8.3-2)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in man-db (Ubuntu):
status: New → Confirmed
Deepak (didipat)
Changed in man-db (Ubuntu):
status: Confirmed → Fix Released
status: Fix Released → Confirmed
Revision history for this message
Lancillotto (antonio-petricca) wrote :

I have the same issue. How can I solve it?

Thank you!
Antonio

Revision history for this message
Colin Watson (cjwatson) wrote :

Please run:

  strace -f -o man.trace -s 1024 man man

... make sure it reproduces the same bug, and attach the resulting man.trace file to this bug report. Thanks.

Changed in man-db (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Deepak (didipat) wrote :

Hi Colin,
Yes, running strace command has reproduced the bug.
Attaching the man.trace herewith.

Revision history for this message
kike (kikecalpe) wrote :

I think it happens since upgraded from 16.04 to 18.04.

Revision history for this message
Lancillotto (antonio-petricca) wrote :

For me happens on Ubuntu 18.04 and Kernel 4.12. Switching to 4.15 it works as expected.

Revision history for this message
Deepak (didipat) wrote :

Thanks Lancillotto. It worked for me too :-)
I had had Kernel 4.10.2-041002. upgrading to 4.15.0-29 solved this issue.

Revision history for this message
Lancillotto (antonio-petricca) wrote :

I am happy to here this Deepack, but unfortunately, for many reasons, I have to rely on 4.12! :(

Revision history for this message
Torsten Ziegler (ziegi) wrote :

Switching to kernel 4.15 resolves also the problem for me.
But unfortunately i have some applications that need kernel version 4.9

Revision history for this message
Alex (alexthreed) wrote :

Seems that problem in apparmor profile loading on older kernels.
I have the same issue on custom kernel 4.4, but with ubuntu kernel 4.15 everything ok.

Workaround for older kernels:
apt install apparmor-utils
aa-disable /usr/bin/man

Upstream Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889617

Revision history for this message
Lancillotto (antonio-petricca) wrote :

Great, it works for 4.12, thank you!

Changed in man-db:
status: Unknown → Fix Released
Changed in man-db (Ubuntu):
status: Incomplete → Confirmed
status: Confirmed → Incomplete
Revision history for this message
Alan Gassner (splang3) wrote :

Worked on my pine64 but on the Rpi 3, OS at same level, it gives the following :'

sudo apt install apparmor-utils

Reading package lists... Done
Building dependency tree
Reading state information... Done
apparmor-utils is already the newest version (2.12-4ubuntu5.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[3]- Done url=https://www.topgear.com.ph/features/lifestyle/lenovo-amd-laptops-a1008-20181202
[5]+ Done cd=CAEYACoUMTA0MDYyMTQwMTQ3MTcxODkyNTEyHGM5OTdmNGFhNDY5YzIwOWY6Y28udWs6ZW46R0I
$
$ sudo aa-disable /usr/bin/man
Disabling /usr/bin/man.

ERROR: Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Warning: unable to find a suitable fs in /proc/mounts, is it mounted?
Use --subdomainfs to override.

Up shot man no still not working.

Any Help, ideas available anybody ?

Revision history for this message
Mike Jonkmans (mjo) wrote :

Is groff installed?

apt install groff

Revision history for this message
cyril (strght2hll) wrote :

Same problem here on a raspberry running volumio2.
We've run out of ideas here. Everything seems ok, yet still the result is:
 Manual page man(1) line ?/? (END) (press h for help or q to quit)
....

Changed in man-db (Ubuntu):
status: Incomplete → Confirmed
tags: added: rls-bb-incoming
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I think we want to backport changes from the below upload to fix this

man-db (2.8.1-1) unstable; urgency=medium

  * New upstream release.
  * Use stacked profiles for subprocesses so that AppArmor realises that
    they constitute a reduction in privileges and allows the transition even
    after a seccomp filter has been installed.
  * Build with seccomp again, now that it works in conjunction with
    AppArmor.
  * Breaks/Replaces manpages-tr (<< 1.0.5.1-3) (closes: #889805).

Changed in man-db (Ubuntu Bionic):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Colin Watson (cjwatson) wrote :

@xnox, that seems unlikely to be helpful since the version you quote is older than the one in bionic! The reference to Debian bug #889617 is probably not correct even though they have similar symptoms.

I don't recall fixing this particular problem in Debian, and we probably need to pull in an AppArmor expert to figure out what the problem is.

Revision history for this message
Colin Watson (cjwatson) wrote :

The duplicate bug has a "profile not found" syslog message which seems likely to be relevant; I suspect there's something going on in relation to man-db's use of stacked profiles.

tags: added: id-5d5ebbb85648f084c34ca454
tags: removed: rls-bb-incoming
Revision history for this message
Seth Arnold (seth-arnold) wrote :

Hello, I believe this issue can be addressed by backporting kernel commit 9fcf78cca198600b27c44b4e50f00f8af3927f17 to your kernel. (Possibly other changes are also necessary; this change may build upon earlier changes, and may be further modified by future changes.

Thanks

Revision history for this message
Brian Murray (brian-murray) wrote :

Can anybody recreate this issue with a 4.15 kernel from the official Ubuntu archive?

Changed in man-db (Ubuntu Bionic):
status: Confirmed → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.