Bug 258105 - benchmarks/stress-ng stress-ng(1) manual page rendering warnings and side-effect
Summary: benchmarks/stress-ng stress-ng(1) manual page rendering warnings and side-effect
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Luca Pizzamiglio
URL: https://github.com/ColinIanKing/stres...
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2021-08-27 22:56 UTC by Graham Perrin
Modified: 2023-08-06 13:55 UTC (History)
2 users (show)

See Also:
pizzamig: maintainer-feedback+


Attachments
Screenshot: an initial view of `man stress-ng` (134.20 KB, image/png)
2021-08-27 22:56 UTC, Graham Perrin
no flags Details
Patch for stress-ng.1 to place into files/ (438 bytes, patch)
2021-10-01 18:35 UTC, Mateusz Piotrowski
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2021-08-27 22:56:31 UTC
Created attachment 227495 [details]
Screenshot: an initial view of `man stress-ng`

When I first viewed the manual page, I thought that the section number was missing from the head of the page. 

Then, I noticed warnings at the foot of the terminal window. 

Eventually, I realised that the view of the page begins at the SYNOPSIS (presumably as a result of rendering the warnings); the true head of the page is eight lines above. 

----

:warning: file '<standard input>', around line 209:
  table wider than line width
warning: file '<standard input>', around line 204:
  table squeezed horizontally to fit line length
warning: file '<standard input>', around line 838:
  table wider than line width
warning: file '<standard input>', around line 833:
  table squeezed horizontally to fit line length
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2021-08-27 23:00:43 UTC
First observed with FreeBSD 14.0-CURRENT. 

Reproducible in a virtual machine with 13.0-RELEASE-p4.
Comment 2 Luca Pizzamiglio freebsd_committer freebsd_triage 2021-08-28 12:37:53 UTC
Thanks for reporting.

It seems indeed that the warnings are rendered by groff/troff and overlapping the text, but when moving down and up fix the rendering.

I'll try to understand how to fix the man page to avoid generating those warnings, but it seems also that the groff/troff pipeline could gain some improvement.
Comment 3 Mateusz Piotrowski freebsd_committer freebsd_triage 2021-10-01 18:35:07 UTC
Created attachment 228331 [details]
Patch for stress-ng.1 to place into files/

So, that's groff printing the warnings, I checked:

$ cat stress-ng.1 | tbl 2>&1 >/dev/null | grep -c .
0
$ cat stress-ng.1 | tbl |  groff -S -P-h -mtty-char -man -Tascii -P-c 2>&1 >/dev/null | grep -c .
8

When looking at the stress-ng.1 file, I noticed that one of the warnings goes away if I remove the table starting with macro ".TS" on line 248 and ending on line 303 with ".TE".

The solution seems to be removing the "w" specifiers from the tables (look for "Minimum column width value." in the tbl(1) manual page if you'd like to dig deeper). I've attached the patch to be included in files/.
Comment 4 Luca Pizzamiglio freebsd_committer freebsd_triage 2023-08-06 13:55:25 UTC
The upstream contained the fixes, without the need of a patch.

Thanks for digging into the issue.