You are not logged in.

#1 2018-02-12 07:39:11

digrouz
Member
Registered: 2018-02-12
Posts: 17

man-db coredumps

Hello,

Since a few days, I have the systemd man-db service core-dumping on my arch laptop.

While trying to debug, I did run

 mandb --debug 

to see what is actually happening but there is nothing I think I can fix in the output.

shit starts with this message:

mandb: zcat < /usr/share/man/man8/systemd-volatile-root.service.8.gz: Bad system call (core dumped)

, then it runs indefinitly creating core-dumps

Any idea how to fix this ?

Here is the beginning of the debug output:

# mandb --debug
ruid=0, euid=0
rgid=0, egid=0
++priv_drop_count = 1
From the config file /etc/man_db.conf:

Mandatory mandir `/usr/man'.
Mandatory mandir `/usr/share/man'.
Mandatory mandir `/usr/local/share/man'.
Path `/bin' mapped to mandir `/usr/share/man'.
Path `/usr/bin' mapped to mandir `/usr/share/man'.
Path `/sbin' mapped to mandir `/usr/share/man'.
Path `/usr/sbin' mapped to mandir `/usr/share/man'.
Path `/usr/local/bin' mapped to mandir `/usr/local/man'.
Path `/usr/local/bin' mapped to mandir `/usr/local/share/man'.
Path `/usr/local/sbin' mapped to mandir `/usr/local/man'.
Path `/usr/local/sbin' mapped to mandir `/usr/local/share/man'.
Path `/usr/X11R6/bin' mapped to mandir `/usr/X11R6/man'.
Path `/usr/bin/X11' mapped to mandir `/usr/X11R6/man'.
Path `/usr/games' mapped to mandir `/usr/share/man'.
Path `/opt/bin' mapped to mandir `/opt/man'.
Path `/opt/sbin' mapped to mandir `/opt/man'.
Global mandir `/usr/man', catdir `/var/cache/man/fsstnd'.
Global mandir `/usr/share/man', catdir `/var/cache/man'.
Global mandir `/usr/local/man', catdir `/var/cache/man/oldlocal'.
Global mandir `/usr/local/share/man', catdir `/var/cache/man/local'.
Global mandir `/usr/X11R6/man', catdir `/var/cache/man/X11R6'.
Global mandir `/opt/man', catdir `/var/cache/man/opt'.
Added section `1'.
Added section `n'.
Added section `l'.
Added section `8'.
Added section `3'.
Added section `0'.
Added section `2'.
Added section `5'.
Added section `4'.
Added section `9'.
Added section `6'.
Added section `7'.
`/usr/man'	`'	`1'
`/usr/share/man'	`'	`1'
`/usr/local/share/man'	`'	`1'
`/bin'	`/usr/share/man'	`0'
`/usr/bin'	`/usr/share/man'	`0'
`/sbin'	`/usr/share/man'	`0'
`/usr/sbin'	`/usr/share/man'	`0'
`/usr/local/bin'	`/usr/local/man'	`0'
`/usr/local/bin'	`/usr/local/share/man'	`0'
`/usr/local/sbin'	`/usr/local/man'	`0'
`/usr/local/sbin'	`/usr/local/share/man'	`0'
`/usr/X11R6/bin'	`/usr/X11R6/man'	`0'
`/usr/bin/X11'	`/usr/X11R6/man'	`0'
`/usr/games'	`/usr/share/man'	`0'
`/opt/bin'	`/opt/man'	`0'
`/opt/sbin'	`/opt/man'	`0'
`/usr/man'	`/var/cache/man/fsstnd'	`-1'
`/usr/share/man'	`/var/cache/man'	`-1'
`/usr/local/man'	`/var/cache/man/oldlocal'	`-1'
`/usr/local/share/man'	`/var/cache/man/local'	`-1'
`/usr/X11R6/man'	`/var/cache/man/X11R6'	`-1'
`/opt/man'	`/var/cache/man/opt'	`-1'
`1'	`'	`-5'
`n'	`'	`-5'
`l'	`'	`-5'
`8'	`'	`-5'
`3'	`'	`-5'
`0'	`'	`-5'
`2'	`'	`-5'
`5'	`'	`-5'
`4'	`'	`-5'
`9'	`'	`-5'
`6'	`'	`-5'
`7'	`'	`-5'

path directory /usr/local/sbin is in the config file
adding /usr/local/man to manpath
adding /usr/local/share/man to manpath

path directory /usr/local/bin is in the config file
/usr/local/man is already in the manpath
/usr/local/share/man is already in the manpath

path directory /usr/bin is in the config file
adding /usr/share/man to manpath

path directory /opt/cxoffice/bin is not in the config file
and doesn't have ../man, man, ../share/man, or share/man subdirectories

path directory /usr/lib/jvm/default/bin is not in the config file
and doesn't have ../man, man, ../share/man, or share/man subdirectories

path directory /usr/bin/site_perl is not in the config file
and doesn't have ../man, man, ../share/man, or share/man subdirectories

path directory /usr/bin/vendor_perl is not in the config file
and doesn't have ../man, man, ../share/man, or share/man subdirectories

path directory /usr/bin/core_perl is not in the config file
and doesn't have ../man, man, ../share/man, or share/man subdirectories

adding mandatory man directories

warning: /usr/man: No such file or directory
/usr/share/man is already in the manpath
/usr/local/share/man is already in the manpath
manpath=/usr/man:/usr/share/man:/usr/local/man:/usr/local/share/man:/usr/X11R6/man:/opt/man
warning: /usr/man: No such file or directory
adding /usr/share/man to manpathlist
adding /usr/local/man to manpathlist
adding /usr/local/share/man to manpathlist
warning: /usr/X11R6/man: No such file or directory
warning: /opt/man: No such file or directory
Removing duplicate manpath entry /usr/local/share/man (2) -> /usr/local/man (1)
final search path = /usr/share/man:/usr/local/man
--priv_drop_count = 0
Purging old database entries in /usr/share/man...
hashtable_free: 25199 entries, 2001 (7%) unique
count_glob_matches: excluding /usr/share/man/man3/munmap.3p.gz, no newer than database
count_glob_matches: excluding /usr/share/man/man3/pselect.3p.gz, no newer than database
count_glob_matches: excluding /usr/share/man/man3/setrlimit.3p.gz, no newer than database
hashtable_free: 25199 entries, 2001 (7%) unique
Processing manual pages under /usr/share/man...
hashtable_free: 25199 entries, 2001 (7%) unique
update_db(): 1517903013.528858784
Testing /usr/share/man for new files
Examining man8
	subdirectory man8 has been 'modified'
Updating index cache for path `/usr/share/man/man8'. Wait...hashtable_free: 0 entries, 0 (0%) unique

ult_src: File /usr/share/man/man8/systemd-volatile-root.service.8.gz in mantree /usr/share/man
loading seccomp filter (permissive: 0)
mandb: zcat < /usr/share/man/man8/systemd-volatile-root.service.8.gz: Bad system call (core dumped)
++priv_drop_count = 1
++priv_drop_count = 2
--priv_drop_count = 1
loading seccomp filter (permissive: 0)
++priv_drop_count = 2
loading seccomp filter (permissive: 0)
seccomp already enabled
trying encoding UTF-8 -> UTF-8//IGNORE
mandb: zcat: Bad system call (core dumped)
--priv_drop_count = 1
mandb: zcat < /usr/share/man/man8/systemd-volatile-root.service.8.gz: Bad system call (core dumped)
mandb: /usr/lib/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE: Bad system call (core dumped)
--priv_drop_count = 0
"systemd-volatile-root.service, systemd-volatile-root - Make the root file system volatile"
record = 'systemd-volatile-root.service, systemd-volatile-root - Make the root file system volatile'
trace->names[0] = '/usr/share/man/man8/systemd-volatile-root.service.8.gz'
trace->names[1] = '/usr/share/man/man8/systemd-volatile-root.service.8.gz'
name = 'systemd-volatile-root.service', id = A
replace_if_necessary(): newer mtime; replacing
name = 'systemd-volatile-root', id = C
ignoring differing ids: systemd-volatile-root
^C

Offline

#2 2018-02-12 10:42:17

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: man-db coredumps

stat /usr/share/man/man8/systemd-volatile-root.service.8.gz
md5sum /usr/share/man/man8/systemd-volatile-root.service.8.gz
pacman -Qkk systemd
zcat /usr/share/man/man8/systemd-volatile-root.service.8.gz | less

Offline

#3 2018-02-12 10:55:44

digrouz
Member
Registered: 2018-02-12
Posts: 17

Re: man-db coredumps

stat /usr/share/man/man8/systemd-volatile-root.service.8.gz

  File: /usr/share/man/man8/systemd-volatile-root.service.8.gz
  Size: 872       	Blocks: 3          IO Block: 1024   regular file
Device: 1ah/26d	Inode: 38773       Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2018-02-12 07:16:19.567182583 +0100
Modify: 2018-01-31 08:01:10.000000000 +0100
Change: 2018-02-07 08:06:42.368924623 +0100
 Birth: -

md5sum /usr/share/man/man8/systemd-volatile-root.service.8.gz

b8079d4fe890abceab6439143d27a481  /usr/share/man/man8/systemd-volatile-root.service.8.gz

pacman -Qkk systemd

warning: systemd: /var/log/journal (GID mismatch)
systemd: 1430 total files, 1 altered file

zcat /usr/share/man/man8/systemd-volatile-root.service.8.gz | less

'\" t
.TH "SYSTEMD\-VOLATILE\-ROOT\&.SERVICE" "8" "" "systemd 237" "systemd-volatile-root.service"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
systemd-volatile-root.service, systemd-volatile-root \- Make the root file system volatile
.SH "SYNOPSIS"
.PP
systemd\-volatile\-root\&.service
.PP
/usr/lib/systemd/systemd\-volatile\-root
.SH "DESCRIPTION"
.PP
systemd\-volatile\-root\&.service
is a service that replaces the root directory with a volatile memory file system ("tmpfs"), mounting the original (non\-volatile)
/usr
inside it read\-only\&. This way, vendor data from
/usr
is available as usual, but all configuration data in
/etc, all state data in
/var
and all other resources stored directly under the root directory are reset on boot and lost at shutdown, enabling fully stateless systems\&.
.PP
This service is only enabled if full volatile mode is selected, for example by specifying
"systemd\&.volatile=yes"
on the kernel command line\&. This service runs only in the initial RAM disk ("initrd"), before the system transitions to the host\*(Aqs root directory\&. Note that this service is not used if
"systemd\&.volatile=state"
is used, as in that mode the root directory is non\-volatile\&.
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsystemd-fstab-generator\fR(8),
\fBkernel-command-line\fR(7)

Offline

#4 2018-02-12 11:20:32

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: man-db coredumps

So the file seems correct and just zcat'ing works.

Thus it'll be in the seccomp filters.
Is "a few days" linked to updates (systemd or the kernel, check your pacman log)?
Anything special on the setup (docker, snap, firejail, ...)?

Offline

#5 2018-02-12 11:36:08

digrouz
Member
Registered: 2018-02-12
Posts: 17

Re: man-db coredumps

there is docker installed on the laptop. and the rootfs is on ZFS.

indeed, I have the issue since the day when both systemd and the kernel were updated

[2018-02-07 08:06] [ALPM] upgraded libsystemd (236.81-1 -> 237.0-2)
[2018-02-07 08:06] [ALPM] upgraded systemd (236.81-1 -> 237.0-2)
...
[2018-02-07 08:06] [ALPM] upgraded linux (4.14.15-1 -> 4.15.1-2)
[2018-02-07 08:06] [ALPM] upgraded linux-headers (4.14.15-1 -> 4.15.1-2)
...

Last edited by digrouz (2018-02-12 11:36:56)

Offline

#6 2018-02-12 12:49:13

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: man-db coredumps

Are you meanwhile on systemd 237.31-1? 237.0 was kinda full of bugs.

Offline

#7 2018-02-12 13:00:41

digrouz
Member
Registered: 2018-02-12
Posts: 17

Re: man-db coredumps

I'm on 237.0-2,  when I run pacman -Suy, It does not propose me to upgrade systemd to 237.31-1, is it normal ?

Offline

#8 2018-02-12 13:08:25

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: man-db coredumps

What version of man-db are you on? If you haven't yet upgraded with Friday's upgrades, please do a full system upgrade to man-db 2.8.1-1 and report back on the results.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#9 2018-02-12 14:32:00

digrouz
Member
Registered: 2018-02-12
Posts: 17

Re: man-db coredumps

so I did update to systemd 237.31-1, I'm runing man-db 2.8.1-1 but I still have the issue

Offline

#10 2018-02-12 14:34:21

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: man-db coredumps

Did you only update systemd or did you run a complete update (and reboot)?

Offline

#11 2018-02-12 14:38:05

digrouz
Member
Registered: 2018-02-12
Posts: 17

Re: man-db coredumps

complete update and reboot

Offline

#12 2018-02-13 09:47:23

digrouz
Member
Registered: 2018-02-12
Posts: 17

Re: man-db coredumps

any idea how to go further ?

Offline

#13 2018-02-14 07:23:04

Pezo
Member
From: Austria
Registered: 2015-04-08
Posts: 14

Re: man-db coredumps

What worked for me as a workaround was setting MAN_DISABLE_SECCOMP=1 (see this Debian bug report).

I'm on systemd 237.31-1 and man-db 2.8.1-1 btw.

Last edited by Pezo (2018-02-14 07:25:01)

Offline

#14 2018-02-14 07:32:54

digrouz
Member
Registered: 2018-02-12
Posts: 17

Re: man-db coredumps

In the bug report they are speaking about an apparmor issue that I don't have installed hmm Strange that it fixes the issue. Did you had that man-db service core dumping ?

Offline

#15 2018-02-14 12:06:56

Pezo
Member
From: Austria
Registered: 2015-04-08
Posts: 14

Re: man-db coredumps

Strange, I just wanted to try without MAN_DISABLE_SECCOMP=1 and now I don't have any issues...

I can't remember exactly what the output was, just 3 or 4 lines with "bad syscall" somewhere.

Offline

#16 2018-02-16 07:46:23

Unturned
Member
Registered: 2017-04-16
Posts: 30

Re: man-db coredumps

I just updated to version 237 a day ago and now I also noticed that man doesn't work anymore. The output roughly looks like this everytime: "man: zcat  < /usr/share/man/man1/....: bad system call (core dumped)"
Tried to add MAN_DISABLE_SECCOMP=1 in front of the man commands and it works now. Is this problem caused by the update? I've used Arch for quite a while but hadn't dealt with any package issues in-depth before.

Offline

#17 2018-02-16 10:09:22

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: man-db coredumps

Man works fine for almost everyone without having to do anything, what difference or what change did you do to your system that you are not telling us about?


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#18 2018-02-16 10:23:07

digrouz
Member
Registered: 2018-02-12
Posts: 17

Re: man-db coredumps

I don't know, my system is quite fresh, it's has been installed somewhere in January, I'm using zsh, can it be related to that ? to some environment variable ? I would be happy to revert any change that broke man but I cannot identify what to do

Offline

#19 2018-02-16 10:42:24

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: man-db coredumps

@digrouz
And how did you install Arch?


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#20 2018-02-16 10:56:55

digrouz
Member
Registered: 2018-02-12
Posts: 17

Re: man-db coredumps

I used https://wiki.archlinux.org/index.php/In … nux_on_ZFS and https://aaronlauterer.com/blog/2017/04/ … ot-system/ because I was needing an encrypted zfs setup.

Last edited by digrouz (2018-02-16 10:57:13)

Offline

#21 2018-02-21 08:57:04

digrouz
Member
Registered: 2018-02-12
Posts: 17

Re: man-db coredumps

downgrading man-db to 2.7.6.1-3 make it run properly

 Purging old database entries in /usr/share/man...
Processing manual pages under /usr/share/man...
Purging old database entries in /usr/share/man/fr.UTF-8...
Processing manual pages under /usr/share/man/fr.UTF-8...
Purging old database entries in /usr/share/man/cs...
Processing manual pages under /usr/share/man/cs...
Purging old database entries in /usr/share/man/jp...
Processing manual pages under /usr/share/man/jp...
Purging old database entries in /usr/share/man/ru.UTF-8...
Processing manual pages under /usr/share/man/ru.UTF-8...
Purging old database entries in /usr/share/man/pl.UTF-8...
Processing manual pages under /usr/share/man/pl.UTF-8...
Purging old database entries in /usr/share/man/zh_CN...
Processing manual pages under /usr/share/man/zh_CN...
Purging old database entries in /usr/share/man/fr...
Processing manual pages under /usr/share/man/fr...
Purging old database entries in /usr/share/man/nl...
Processing manual pages under /usr/share/man/nl...
Purging old database entries in /usr/share/man/zh_TW...
Processing manual pages under /usr/share/man/zh_TW...
Purging old database entries in /usr/share/man/fr.ISO8859-1...
Processing manual pages under /usr/share/man/fr.ISO8859-1...
Purging old database entries in /usr/share/man/hu...
Processing manual pages under /usr/share/man/hu...
Purging old database entries in /usr/share/man/es...
Processing manual pages under /usr/share/man/es...
Purging old database entries in /usr/share/man/pl...
Processing manual pages under /usr/share/man/pl...
Purging old database entries in /usr/share/man/ru.KOI8-R...
Processing manual pages under /usr/share/man/ru.KOI8-R...
Purging old database entries in /usr/share/man/it...
Processing manual pages under /usr/share/man/it...
Purging old database entries in /usr/share/man/pt_BR...
Processing manual pages under /usr/share/man/pt_BR...
Purging old database entries in /usr/share/man/sl...
Processing manual pages under /usr/share/man/sl...
Purging old database entries in /usr/share/man/tr...
Processing manual pages under /usr/share/man/tr...
Purging old database entries in /usr/share/man/sk...
Processing manual pages under /usr/share/man/sk...
Purging old database entries in /usr/share/man/da...
Processing manual pages under /usr/share/man/da...
Purging old database entries in /usr/share/man/uk...
Processing manual pages under /usr/share/man/uk...
Purging old database entries in /usr/share/man/ja...
Processing manual pages under /usr/share/man/ja...
Purging old database entries in /usr/share/man/de...
Processing manual pages under /usr/share/man/de...
Purging old database entries in /usr/share/man/pl.ISO8859-2...
Processing manual pages under /usr/share/man/pl.ISO8859-2...
Purging old database entries in /usr/share/man/el...
Processing manual pages under /usr/share/man/el...
Purging old database entries in /usr/share/man/it.UTF-8...
Processing manual pages under /usr/share/man/it.UTF-8...
Purging old database entries in /usr/share/man/ko...
Processing manual pages under /usr/share/man/ko...
Purging old database entries in /usr/share/man/pt...
Processing manual pages under /usr/share/man/pt...
Purging old database entries in /usr/share/man/it.ISO8859-1...
Processing manual pages under /usr/share/man/it.ISO8859-1...
Purging old database entries in /usr/share/man/sv...
Processing manual pages under /usr/share/man/sv...
Purging old database entries in /usr/share/man/id...
Processing manual pages under /usr/share/man/id...
Purging old database entries in /usr/share/man/ru...
Processing manual pages under /usr/share/man/ru...
Processing manual pages under /usr/local/man...
0 man subdirectories contained newer manual pages.
0 manual pages were added.
0 stray cats were added.
0 old database entries were purged.

what did change in 2.8.x ?

Last edited by digrouz (2018-02-21 08:57:37)

Offline

#22 2018-02-21 14:32:29

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: man-db coredumps

https://bugs.archlinux.org/task/57557? Are any libraries preloaded on your system?

Offline

#23 2018-02-21 22:52:16

Batou
Member
Registered: 2017-01-03
Posts: 259

Re: man-db coredumps

One thing that surprised me about man-db is how long it took to load when booting. Yes, it uses a man-db.service and it gets loaded on boot. On my machine it took 6sec to load. Second slowest service took 1.3sec to load. Yeah, man-db is weird. No idea why it even has a service.


Please vote for all the AUR packages you're using. You can mass-vote for all of them by doing: "pacman -Qqm | xargs aurvote -v" (make sure to run "aurvote --configure"  first)

Offline

#24 2018-02-22 02:51:37

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: man-db coredumps

The service exists because you want manpages to be up to date. wink

We considered moving to a pacman hook that is triggered whenever a manpage is installed/updated/removed. But as you observed that takes a really long time and the user experience of having a pacman transaction lock up like that wasn't very pleasant. So it was reverted.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#25 2018-02-23 01:24:37

Unturned
Member
Registered: 2017-04-16
Posts: 30

Re: man-db coredumps

Hello,
I just installed a fresh Arch system inside a VM, and added a new user called "lfs" to prepare for my Linux From Scratch build. Man pages worked fine for the root user, but for the "lfs" user it doesn't (needs the MAN_DISABLE_SECCOMP=1 flag). Strangely, if I prefix the man commands with "sudo", it works fine from the lfs user. What's this indicating?
The only packages that I installed besides base and base devel are:

vim, grub, intel-ucode, networkmanager, xorg, xorg-xinit, xterm, fluxbox, linux-headers, dkms, virtualbox-guest-utils

I have no idea whether these packages could be causing any problems. I'll try with a complete vanilla install and see if the problem still exists.

Offline

Board footer

Powered by FluxBB