Bug 1155879 - mandb.service: "find: ‘standard output’: Broken pipe", "find: write error", "status=0/SUCCESS"
Summary: mandb.service: "find: ‘standard output’: Broken pipe", "find: write error", "...
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Leap 15.1
Hardware: Other Other
: P5 - None : Enhancement (vote)
Target Milestone: ---
Assignee: Dr. Werner Fink
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1213571
  Show dependency treegraph
 
Reported: 2019-11-05 09:23 UTC by Ulrich Windl
Modified: 2023-08-11 12:30 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Windl 2019-11-05 09:23:24 UTC
I noticed this problem in the journal: mandb.service seems to fail for unknown reasons, but "success" is reported:
# systemctl status mandb.service 
● mandb.service - Do daily mandb update
   Loaded: loaded (/usr/lib/systemd/system/mandb.service; static; vendor preset: disabled)
   Active: inactive (dead) since Tue 2019-11-05 09:52:59 CET; 17min ago
     Docs: man:mandb(8)
           man:catman(8)
  Process: 2568 ExecStart=/usr/lib/man-db/do_mandb (code=exited, status=0/SUCCESS)
 Main PID: 2568 (code=exited, status=0/SUCCESS)

Nov 05 09:51:30 pc systemd[1]: Starting Do daily mandb update...
Nov 05 09:52:59 pc do_mandb[2568]: find: ‘standard output’: Broken pipe
Nov 05 09:52:59 pc do_mandb[2568]: find: write error
Nov 05 09:52:59 pc systemd[1]: Started Do daily mandb update.
Comment 1 Ulrich Windl 2019-11-05 09:31:14 UTC
Running /usr/lib/man-db/do_mandb interactively showed no such problem.
Grepping for do_mandb in the journal, it shows that the problem started on "Jul 04 08:08:00", while it was last OK on "Jul 02 15:30:06". Seems I upgraded to Leap 15.1 on "Wed 03 Jul"...
Comment 2 Dr. Werner Fink 2019-11-06 07:18:14 UTC
What shell are you using as /bin/sh ... see outout of

   update-alternatives --config sh
Comment 3 Ulrich Windl 2019-11-06 07:49:04 UTC
(In reply to Dr. Werner Fink from comment #2)
> What shell are you using as /bin/sh ... see output of
> 
>    update-alternatives --config sh

# update-alternatives --config sh
update-alternatives: error: no alternatives for sh
Comment 4 Dr. Werner Fink 2019-11-06 08:02:48 UTC
(In reply to Ulrich Windl from comment #3)
> (In reply to Dr. Werner Fink from comment #2)
> > What shell are you using as /bin/sh ... see output of
> > 
> >    update-alternatives --config sh
> 
> # update-alternatives --config sh
> update-alternatives: error: no alternatives for sh

But /bin/sh is lined to /bin/bash or /usr/bin/bash ?
Comment 5 Ulrich Windl 2019-11-06 08:30:30 UTC
(In reply to Dr. Werner Fink from comment #4)
> But /bin/sh is linked to /bin/bash or /usr/bin/bash ?

# ll /bin/sh
lrwxrwxrwx 1 root root 4 Sep 20 14:14 /bin/sh -> bash
Comment 6 Dr. Werner Fink 2019-11-06 08:38:15 UTC
(In reply to Ulrich Windl from comment #5)
> (In reply to Dr. Werner Fink from comment #4)
> > But /bin/sh is linked to /bin/bash or /usr/bin/bash ?
> 
> # ll /bin/sh
> lrwxrwxrwx 1 root root 4 Sep 20 14:14 /bin/sh -> bash

The line which may cause this is:

   find $mp -follow -newer $db | read -t 1 line

that is somehow the read builtin of the bash dies before find is finished here.
Nevertheless as this does not hurt I'll decrease severity
Comment 7 Swamp Workflow Management 2019-11-06 09:32:35 UTC
This is an autogenerated message for OBS integration:
This bug (1155879) was mentioned in
https://build.opensuse.org/request/show/745706 Factory / man
Comment 8 Ulrich Windl 2019-11-06 11:55:35 UTC
(In reply to Dr. Werner Fink from comment #6)
> The line which may cause this is:
> 
>    find $mp -follow -newer $db | read -t 1 line
> 
> that is somehow the read builtin of the bash dies before find is finished
> here.

IMHO read does not DIE, but it may run into the specified TIMEOUT of one second when the load is a bit high. Effectively the code was not testing whether find returned something, but it timed out find via broken pipe, causing a write error.

(In reply to Ulrich Windl from comment #0)
> Nov 05 09:52:59 pc do_mandb[2568]: find: ‘standard output’: Broken pipe
> Nov 05 09:52:59 pc do_mandb[2568]: find: write error


(In reply to Dr. Werner Fink from comment #6)
> Nevertheless as this does not hurt I'll decrease severity
(I wonder why this is priority "enhancement")
Of course not updating the mandb is not serious, but seen from the perspective of the code it was just wrong (and thus is a bug).
Comment 9 Dr. Werner Fink 2020-05-06 08:03:26 UTC
SR#745706
Comment 11 Maintenance Automation 2023-08-11 12:30:57 UTC
SUSE-RU-2023:3274-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 1155879
Sources used:
Basesystem Module 15-SP5 (src): man-2.7.6-150100.8.3.1
SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS 15-SP1 (src): man-2.7.6-150100.8.3.1
SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS 15-SP2 (src): man-2.7.6-150100.8.3.1
SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): man-2.7.6-150100.8.3.1
SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): man-2.7.6-150100.8.3.1
SUSE Linux Enterprise Real Time 15 SP3 (src): man-2.7.6-150100.8.3.1
SUSE Linux Enterprise Server 15 SP1 LTSS 15-SP1 (src): man-2.7.6-150100.8.3.1
SUSE Linux Enterprise Server 15 SP2 LTSS 15-SP2 (src): man-2.7.6-150100.8.3.1
SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): man-2.7.6-150100.8.3.1
SUSE Linux Enterprise Server for SAP Applications 15 SP1 (src): man-2.7.6-150100.8.3.1
SUSE Linux Enterprise Server for SAP Applications 15 SP2 (src): man-2.7.6-150100.8.3.1
SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): man-2.7.6-150100.8.3.1
SUSE Manager Proxy 4.2 (src): man-2.7.6-150100.8.3.1
SUSE Manager Retail Branch Server 4.2 (src): man-2.7.6-150100.8.3.1
SUSE Manager Server 4.2 (src): man-2.7.6-150100.8.3.1
SUSE Enterprise Storage 7.1 (src): man-2.7.6-150100.8.3.1
SUSE CaaS Platform 4.0 (src): man-2.7.6-150100.8.3.1
openSUSE Leap 15.4 (src): man-2.7.6-150100.8.3.1
openSUSE Leap 15.5 (src): man-2.7.6-150100.8.3.1
Basesystem Module 15-SP4 (src): man-2.7.6-150100.8.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.