GNU bug report logs - #30785
Man pages truncated, repeated

Previous Next

Package: guix;

Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Date: Mon, 12 Mar 2018 21:26:01 UTC

Severity: minor

Done: Marius Bakke <mbakke <at> fastmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30785 in the body.
You can then email your comments to 30785 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 12 Mar 2018 21:26:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 12 Mar 2018 21:26:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: bug-guix <at> gnu.org
Subject: Man pages truncated, repeated
Date: Mon, 12 Mar 2018 22:24:46 +0100
Guix,

Perhaps he's just getting old, but our man has a tendency to forget 
where he was, start over from the beginning, and repeat himself several 
times:

  $ guix package -i knot rofi
  $ man 5 knot.conf | grep -E '^(NAME|DESCRIPTION)'
  NAME
  DESCRIPTION
  NAME
  DESCRIPTION
  NAME
  DESCRIPTION
  NAME
  DESCRIPTION
  NAME
  $

There's also some stderr...

  <standard input>:25: error: end of file while defining macro 
`UNINDENT'

...but I think that's just a symptom of the input being cut short; man 
rofi(1) prints no such error yet suffers the same fate.

The affected man pages themselves are not truncated, nor do they repeat:

  $ zgrep '\.SH' `man -w knot.conf`
  .SH NAME
  .SH DESCRIPTION
  .SH COMMENTS
  .SH INCLUDES
  .SH MODULE SECTION
  .SH SERVER SECTION
  .SH KEY SECTION
  .SH ACL SECTION
  .SH CONTROL SECTION
  .SH STATISTICS SECTION
  .SH KEYSTORE SECTION
  .SH SUBMISSION SECTION
  .SH POLICY SECTION
  .SH REMOTE SECTION
  .SH TEMPLATE SECTION
  .SH ZONE SECTION
  .SH LOGGING SECTION
  .SH AUTHOR
  .SH COPYRIGHT
  $

However, even longer man pages such as bash(1) render without fail, so 
there might be something special about the two examples above that 
triggers this behaviour.

Kind regards,

T G-R

Sent from a Web browser. Excuse or enjoy my brevity.




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Tue, 13 Mar 2018 21:35:02 GMT) Full text and rfc822 format available.

Message #8 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Tue, 13 Mar 2018 22:34:43 +0100
Hello,

Tobias Geerinckx-Rice <me <at> tobias.gr> skribis:

> Perhaps he's just getting old, but our man has a tendency to forget
> where he was, start over from the beginning, and repeat himself
> several times:
>
>   $ guix package -i knot rofi
>   $ man 5 knot.conf | grep -E '^(NAME|DESCRIPTION)'

[...]

> However, even longer man pages such as bash(1) render without fail, so
> there might be something special about the two examples above that
> triggers this behaviour.

I suspect something wrong with ‘knot.conf.5.gz’, but I don’t have
tangible evidence.

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Tue, 13 Mar 2018 22:02:01 GMT) Full text and rfc822 format available.

Message #11 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: ludo <at> gnu.org
Cc: 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Tue, 13 Mar 2018 23:01:09 +0100
Ludo',

On 2018-03-13 22:34, ludo <at> gnu.org wrote:
>> However, even longer man pages such as bash(1) render without fail, so
>> there might be something special about the two examples above that
>> triggers this behaviour.
> 
> I suspect something wrong with ‘knot.conf.5.gz’, but I don’t have
> tangible evidence.

Yup, that's about as far as I got before giving up and submitting to the 
wisdom of the crowd. We need someone who knows something — anything — 
about man pages, or someone who can reproduce this on another distro. I 
had no luck searching for similar bug reports.

...or do you mean with the knot.conf page *specifically*, as opposed to 
the rofi one? Is your suspicion based on something you saw in there?

It's not the .gz part: opening the uncompressed page with man directly 
has the same result.

--

For the record: apparently this doesn't happen on Debian, according to 
some fellow on IRC named ‘civodul’. There goes my brief hope that this 
was an (exclusively) upstream problem after all.

Kind regards,

T G-R

Sent from a Web browser. Excuse or enjoy my brevity.




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Wed, 14 Mar 2018 13:23:02 GMT) Full text and rfc822 format available.

Message #14 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Wed, 14 Mar 2018 14:22:03 +0100
Hi,

Tobias Geerinckx-Rice <me <at> tobias.gr> skribis:

> On 2018-03-13 22:34, ludo <at> gnu.org wrote:
>>> However, even longer man pages such as bash(1) render without fail, so
>>> there might be something special about the two examples above that
>>> triggers this behaviour.
>>
>> I suspect something wrong with ‘knot.conf.5.gz’, but I don’t have
>> tangible evidence.
>
> Yup, that's about as far as I got before giving up and submitting to
> the wisdom of the crowd. We need someone who knows something —
> anything — about man pages, or someone who can reproduce this on
> another distro. I had no luck searching for similar bug reports.
>
> ...or do you mean with the knot.conf page *specifically*, as opposed
> to the rofi one? Is your suspicion based on something you saw in
> there?

I didn’t check the rofi one.  The knot.conf one is generated by some
“docutils”, a reStructuredText thing, which is where my unfounded
suspicion comes from.  :-)

We’d need to analyze the nroff “code” in there to understand what’s
going on.

> For the record: apparently this doesn't happen on Debian, according to
> some fellow on IRC named ‘civodul’. There goes my brief hope that this
> was an (exclusively) upstream problem after all.

I think I know that person.  ;-)  Perhaps we could check how Debian
generates the page.  Do they have a patch for “docutils”?  Should we try
with a different version to see if that helps?

Cheers,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Wed, 14 Mar 2018 13:44:02 GMT) Full text and rfc822 format available.

Message #17 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Wed, 14 Mar 2018 14:43:13 +0100
Hello,

On Mon, Mar 12, 2018 at 10:24:46PM +0100, Tobias Geerinckx-Rice wrote:
>   $ man 5 knot.conf | grep -E '^(NAME|DESCRIPTION)'
>   NAME
>   DESCRIPTION
>   NAME
>   DESCRIPTION
>   NAME
>   DESCRIPTION
>   NAME
>   DESCRIPTION
>   NAME
>   $
> 
> There's also some stderr...
>   <standard input>:25: error: end of file while defining macro `UNINDENT'

with Guix on Debian (git commit 464f5447396fcec9b43f7eab71d5d42b522a157f),
I am not seeing this problem:
$ man 5 knot.conf | grep -E '^(NAME|DESCRIPTION)'
NAME
DESCRIPTION

and no stderr. This uses the "man" binary from Debian (/usr/bin/man) and
/gnu/store/a9w7mm0mrgrakl9khmi91ybp34ly4iqc-knot-2.6.5/share/man/man5/knot.conf.5.gz

What is your distribution? Could it be that the problem is in the "man" binary and
not in the man page?

Actually, also this does work:
$ /gnu/store/kh2av28w5rd3fbidqssp0fzv661hb9l5-man-db-2.7.6.1/bin/man 5 knot.conf | grep -E '^(NAME|DESCRIPTION)'
NAME
DESCRIPTION

Maybe your store is corrupted?

Or did I misunderstand the problem?

Andreas





Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Thu, 15 Mar 2018 00:41:02 GMT) Full text and rfc822 format available.

Message #20 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Thu, 15 Mar 2018 01:40:18 +0100
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice <me <at> tobias.gr> writes:

> Guix,
>
> Perhaps he's just getting old, but our man has a tendency to forget 
> where he was, start over from the beginning, and repeat himself several 
> times:
>
>    $ guix package -i knot rofi
>    $ man 5 knot.conf | grep -E '^(NAME|DESCRIPTION)'
>    NAME
>    DESCRIPTION
>    NAME
>    DESCRIPTION
>    NAME
>    DESCRIPTION
>    NAME
>    DESCRIPTION
>    NAME
>    $

One thing rofi.1 and knot.conf.5 have in common is that they are both
unicode.  Whereas working pages are ASCII.

I've tried running groff and nroff manually on rofi.1, but haven't been
able to reproduce the duplicate sections.
[signature.asc (application/pgp-signature, inline)]

Severity set to 'minor' from 'normal' Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Thu, 15 Mar 2018 08:48:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Sat, 05 May 2018 01:32:02 GMT) Full text and rfc822 format available.

Message #25 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Vagrant Cascadian <vagrant <at> debian.org>
To: 30785 <at> debbugs.gnu.org
Subject: Re: Man pages truncated, repeated
Date: Fri, 04 May 2018 18:31:32 -0700
[Message part 1 (text/plain, inline)]
On 2018-03-12, Tobias Geerinckx-Rice wrote:
> Perhaps he's just getting old, but our man has a tendency to forget 
> where he was, start over from the beginning, and repeat himself several 
> times:
>
>    $ guix package -i knot rofi
>    $ man 5 knot.conf | grep -E '^(NAME|DESCRIPTION)'
>    NAME
>    DESCRIPTION
>    NAME

I'm seeing this same behavior with the gpg-agent manpage as well, for
what it's worth.

  $ man gpg-agent | grep ^NAME
  <standard input>:172: warning [p 2, 10.5i]: cannot
  adjust line
  <standard input>:172: warning [p 6, 4.8i]: cannot
  adjust line
  NAME
  <standard input>:172: warning [p 9, 10.0i]: cannot
  adjust line
  NAME
  NAME
  NAME

Grepping the file directly:

  $ zgrep NAME $(dirname $(readlink $(which gpg)))/../share/man/man1/gpg-agent.1.gz
  .SH NAME
  identified in the environment variable
  \fBLISTEN_FDNAMES\fR (see
  

Interestingly enough, gpg manpage from the same package doesn't seem to
have the issue:

  $ man gpg | grep ^NAME
  NAME
  <standard input>:1481: warning [p 19, 7.2i]: cannot adjust line

I've also copied the gpg-agent.1.gz file to a Debian system running the
same upstream version of man 2.8.3, and that has no issue. So it's
something specific to the guix version of the "man" command.


live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Sat, 05 May 2018 21:41:02 GMT) Full text and rfc822 format available.

Message #28 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Sat, 05 May 2018 23:40:51 +0200
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes:

> Tobias Geerinckx-Rice <me <at> tobias.gr> writes:
>
>> Guix,
>>
>> Perhaps he's just getting old, but our man has a tendency to forget 
>> where he was, start over from the beginning, and repeat himself several 
>> times:
>>
>>    $ guix package -i knot rofi
>>    $ man 5 knot.conf | grep -E '^(NAME|DESCRIPTION)'
>>    NAME
>>    DESCRIPTION
>>    NAME
>>    DESCRIPTION
>>    NAME
>>    DESCRIPTION
>>    NAME
>>    DESCRIPTION
>>    NAME
>>    $
>
> One thing rofi.1 and knot.conf.5 have in common is that they are both
> unicode.  Whereas working pages are ASCII.

This ultimately turned out to be due to man-db not finding "preconv".

The attached patches fixes it.

Adding preconv adds ~0.1 MiB to the groff-minimal closure size.

WDYT?

[bug-30785.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Reply sent to Marius Bakke <mbakke <at> fastmail.com>:
You have taken responsibility. (Sun, 06 May 2018 13:55:01 GMT) Full text and rfc822 format available.

Notification sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
bug acknowledged by developer. (Sun, 06 May 2018 13:55:01 GMT) Full text and rfc822 format available.

Message #33 received at 30785-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>, 30785-done <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Sun, 06 May 2018 15:53:59 +0200
[Message part 1 (text/plain, inline)]
Marius Bakke <mbakke <at> fastmail.com> writes:

> Marius Bakke <mbakke <at> fastmail.com> writes:
>
>> Tobias Geerinckx-Rice <me <at> tobias.gr> writes:
>>
>>> Guix,
>>>
>>> Perhaps he's just getting old, but our man has a tendency to forget 
>>> where he was, start over from the beginning, and repeat himself several 
>>> times:
>>>
>>>    $ guix package -i knot rofi
>>>    $ man 5 knot.conf | grep -E '^(NAME|DESCRIPTION)'
>>>    NAME
>>>    DESCRIPTION
>>>    NAME
>>>    DESCRIPTION
>>>    NAME
>>>    DESCRIPTION
>>>    NAME
>>>    DESCRIPTION
>>>    NAME
>>>    $
>>
>> One thing rofi.1 and knot.conf.5 have in common is that they are both
>> unicode.  Whereas working pages are ASCII.
>
> This ultimately turned out to be due to man-db not finding "preconv".
>
> The attached patches fixes it.

I pushed the fix as 296551a2e9310d4a030ee49530e9367e73aaeecf.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Sun, 06 May 2018 22:07:01 GMT) Full text and rfc822 format available.

Message #36 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 07 May 2018 00:06:47 +0200
reopen 30785

Marius Bakke <mbakke <at> fastmail.com> writes:

> Marius Bakke <mbakke <at> fastmail.com> writes:
>
>> Marius Bakke <mbakke <at> fastmail.com> writes:
>>
>>> Tobias Geerinckx-Rice <me <at> tobias.gr> writes:
>>>
>>>> Guix,
>>>>
>>>> Perhaps he's just getting old, but our man has a tendency to forget 
>>>> where he was, start over from the beginning, and repeat himself several 
>>>> times:
>>>>
>>>>    $ guix package -i knot rofi
>>>>    $ man 5 knot.conf | grep -E '^(NAME|DESCRIPTION)'
>>>>    NAME
>>>>    DESCRIPTION
>>>>    NAME
>>>>    DESCRIPTION
>>>>    NAME
>>>>    DESCRIPTION
>>>>    NAME
>>>>    DESCRIPTION
>>>>    NAME
>>>>    $
>>>
>>> One thing rofi.1 and knot.conf.5 have in common is that they are both
>>> unicode.  Whereas working pages are ASCII.
>>
>> This ultimately turned out to be due to man-db not finding "preconv".
>>
>> The attached patches fixes it.
>
> I pushed the fix as 296551a2e9310d4a030ee49530e9367e73aaeecf.

This patch caused `man` to segfault when invoked outside `guix
environment`(!) so I reverted it for now.

To be continued...




Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 06 May 2018 22:10:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 20 Aug 2018 10:34:02 GMT) Full text and rfc822 format available.

Message #41 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <ambrevar <at> gmail.com>
To: 30785 <at> debbugs.GNU.org
Subject: Re: Man pages truncated, repeated
Date: Mon, 20 Aug 2018 12:32:55 +0200
[Message part 1 (text/plain, inline)]
The 'man' program from the 'man-db' Guix package has an issue with UTF-8
man pages: the page is truncated and sometimes the truncation is
repeated a couple of times.

The bug does not occur when non-ASCII characters are removed.
I haven't tried with other non-ASCII encodings.

There must be something wrong with the way we package man-db.

See https://lists.gnu.org/archive/html/help-guix/2018-05/msg00084.html
for a discussion.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Sun, 13 Jan 2019 16:10:02 GMT) Full text and rfc822 format available.

Message #44 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: 30785 <at> debbugs.gnu.org, Tobias Geerinckx-Rice <me <at> tobias.gr> ,
 Christopher Baines <mail <at> cbaines.net> , Ludovic Courtès
 <ludo <at> gnu.org>  
Subject: bug#30785: Man pages truncated, repeated
Date: Sun, 13 Jan 2019 17:09:51 +0100
[Message part 1 (text/plain, inline)]
Great news, I've (finally) made some progress!

On a suggestion from Christopher Baines, I compared the strace of a
working man and Guix' man.
I noticed that Guix man failed to find "preconv".

If I install groff-minimal into my user profile, the issue disappears
indeed.  So it's just a matter of letting man-db find preconv.

I've tried the following substitution:

--8<---------------cut here---------------start------------->8---
(substitute* "lib/encodings.c"
               (("const char \\*groff_preconv = NULL;")
                (string-append "const char *groff_preconv = \""
                               (assoc-ref inputs "groff-minimal")
                               "/bin/preconv"
                               "\";")))
--8<---------------cut here---------------end--------------->8---

Surprisingly, man only displays this on every call:

--8<---------------cut here---------------start------------->8---
/gnu/store/6dv1q0s8rlf1ndaqx2qhnkiz9x4840ba-man-db-2.8.3/bin/man: /gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/preconv: Segmentation fault
--8<---------------cut here---------------end--------------->8---

However, calling

--8<---------------cut here---------------start------------->8---
echo "hêlló"  | /gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/preconv -e UTF-8
--8<---------------cut here---------------end--------------->8---

works.

I'm stuck here...  Anyone?

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Sun, 13 Jan 2019 16:16:02 GMT) Full text and rfc822 format available.

Message #47 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: 30785 <at> debbugs.gnu.org, Tobias Geerinckx-Rice <me <at> tobias.gr>, Christopher
 Baines <mail <at> cbaines.net>, Ludovic Courtès <ludo <at> gnu.org>,
 Marius Bakke <mbakke <at> fastmail.com>  
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Sun, 13 Jan 2019 17:15:21 +0100
[Message part 1 (text/plain, inline)]
And... from the log I just noticed that Marius had arrived to the same
conclusion 8 months ago :(

That'll teach me to look at logs before getting started...

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Sun, 13 Jan 2019 17:01:02 GMT) Full text and rfc822 format available.

Message #50 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Marius Bakke <mbakke <at> fastmail.com>, Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Christopher Baines <mail <at> cbaines.net>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Sun, 13 Jan 2019 18:00:52 +0100
Pierre Neidhardt <mail <at> ambrevar.xyz> skribis:

> And... from the log I just noticed that Marius had arrived to the same
> conclusion 8 months ago :(
>
> That'll teach me to look at logs before getting started...

Heheh.  :-)

Another useful debugging tip is setting PIPELINE_DEBUG=1.

Anyway I hope we’ll soon squash that bug!

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Sun, 13 Jan 2019 17:32:02 GMT) Full text and rfc822 format available.

Message #53 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Marius Bakke <mbakke <at> fastmail.com>, Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Christopher Baines <mail <at> cbaines.net>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Sun, 13 Jan 2019 18:31:10 +0100
[Message part 1 (text/plain, inline)]
Indeed.  So the reason that there is an issue at all is that man-db uses
libpipeline to run a pipeline of programs.

I've used Ludo's trick to see if could get more details:

--8<---------------cut here---------------start------------->8---
ambrevar <at> mimimi ~/projects/guix/gnu/packages$ PIPELINE_DEBUG=1 /gnu/store/fm7jlkf93bh7bw03m8hbha2b5qxjz0kz-man-db-2.8.3/bin/man emacs
Starting pipeline: /gnu/store/h0c398zan9ibhk4w0c944vp5pwgzkfpd-gzip-1.9/bin/gzip -dc /gnu/store/gppr8msvzgxr87psbj3w6hc07lnnzpvx-emacs-26.1/share/man/man1/emacs.1.gz [input: {0, /gnu/store/gppr8msvzgxr87psbj3w6hc07lnnzpvx-emacs-26.1/share/man/man1/emacs.1.gz}, output: {-1, NULL}]
Started "/gnu/store/h0c398zan9ibhk4w0c944vp5pwgzkfpd-gzip-1.9/bin/gzip", pid 13814
Waiting for pipeline: /gnu/store/h0c398zan9ibhk4w0c944vp5pwgzkfpd-gzip-1.9/bin/gzip -dc /gnu/store/gppr8msvzgxr87psbj3w6hc07lnnzpvx-emacs-26.1/share/man/man1/emacs.1.gz [input: {0, /gnu/store/gppr8msvzgxr87psbj3w6hc07lnnzpvx-emacs-26.1/share/man/man1/emacs.1.gz}, output: {-1, NULL}]
Active processes (1):
  "/gnu/store/h0c398zan9ibhk4w0c944vp5pwgzkfpd-gzip-1.9/bin/gzip" (13814) -> 0
Starting pipeline: /gnu/store/h0c398zan9ibhk4w0c944vp5pwgzkfpd-gzip-1.9/bin/gzip -dc /gnu/store/gppr8msvzgxr87psbj3w6hc07lnnzpvx-emacs-26.1/share/man/man1/emacs.1.gz [input: {0, /gnu/store/gppr8msvzgxr87psbj3w6hc07lnnzpvx-emacs-26.1/share/man/man1/emacs.1.gz}, output: {-1, NULL}]
Started "/gnu/store/h0c398zan9ibhk4w0c944vp5pwgzkfpd-gzip-1.9/bin/gzip", pid 13815
Waiting for pipeline: /gnu/store/h0c398zan9ibhk4w0c944vp5pwgzkfpd-gzip-1.9/bin/gzip -dc /gnu/store/gppr8msvzgxr87psbj3w6hc07lnnzpvx-emacs-26.1/share/man/man1/emacs.1.gz [input: {0, /gnu/store/gppr8msvzgxr87psbj3w6hc07lnnzpvx-emacs-26.1/share/man/man1/emacs.1.gz}, output: {-1, NULL}]
Active processes (1):
  "/gnu/store/h0c398zan9ibhk4w0c944vp5pwgzkfpd-gzip-1.9/bin/gzip" (13815) -> -1
Active processes (1):
  "/gnu/store/h0c398zan9ibhk4w0c944vp5pwgzkfpd-gzip-1.9/bin/gzip" (13815) -> 0
Starting pipeline: /gnu/store/h0c398zan9ibhk4w0c944vp5pwgzkfpd-gzip-1.9/bin/gzip -dc /gnu/store/gppr8msvzgxr87psbj3w6hc07lnnzpvx-emacs-26.1/share/man/man1/emacs.1.gz [input: {0, /gnu/store/gppr8msvzgxr87psbj3w6hc07lnnzpvx-emacs-26.1/share/man/man1/emacs.1.gz}, output: {-1, NULL}]
Started "/gnu/store/h0c398zan9ibhk4w0c944vp5pwgzkfpd-gzip-1.9/bin/gzip", pid 13816
Starting pipeline: (cd /home/ambrevar/.guix-profile/share/man && /gnu/store/fm7jlkf93bh7bw03m8hbha2b5qxjz0kz-man-db-2.8.3/libexec/man-db/zsoelim) | (cd /home/ambrevar/.guix-profile/share/man && /gnu/store/fm7jlkf93bh7bw03m8hbha2b5qxjz0kz-man-db-2.8.3/libexec/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE) | (cd /home/ambrevar/.guix-profile/share/man && /gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/preconv -e UTF-8) | (cd /home/ambrevar/.guix-profile/share/man && /gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/tbl) | (cd /home/ambrevar/.guix-profile/share/man && /gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/nroff -mandoc -Tutf8) [input: {-1, NULL}, output: {-1, NULL}]
Started "/gnu/store/fm7jlkf93bh7bw03m8hbha2b5qxjz0kz-man-db-2.8.3/libexec/man-db/zsoelim", pid 13817
Started "/gnu/store/fm7jlkf93bh7bw03m8hbha2b5qxjz0kz-man-db-2.8.3/libexec/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE", pid 13818
Started "/gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/preconv", pid 13819
Started "/gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/tbl", pid 13820
Started "/gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/nroff", pid 13821
Starting pipeline: sed -e '/^[[:space:]]*$/{ N; /^[[:space:]]*\n[[:space:]]*$/D; }' | LESS=-ix8RmPm Manual page emacs(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$PM Manual page emacs(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$ MAN_PN=emacs(1) less -s [input: {-1, NULL}, output: {0, NULL}]
Started "sed -e '/^[[:space:]]*$/{ N; /^[[:space:]]*\n[[:space:]]*$/D; }'", pid 13822
Started "less", pid 13823
source pipeline 0 returned error or EOF
Active processes (1):
  "less" (13823) -> 0
/gnu/store/fm7jlkf93bh7bw03m8hbha2b5qxjz0kz-man-db-2.8.3/bin/man: command exited with status 127: (cd /home/ambrevar/.guix-profile/share/man && /gnu/store/fm7jlkf93bh7bw03m8hbha2b5qxjz0kz-man-db-2.8.3/libexec/man-db/zsoelim) | (cd /home/ambrevar/.guix-profile/share/man && /gnu/store/fm7jlkf93bh7bw03m8hbha2b5qxjz0kz-man-db-2.8.3/libexec/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE) | (cd /home/ambrevar/.guix-profile/share/man && /gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/preconv -e UTF-8) | (cd /home/ambrevar/.guix-profile/share/man && /gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/tbl) | (cd /home/ambrevar/.guix-profile/share/man && /gnu/store/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3/bin/nroff -mandoc -Tutf8)
--8<---------------cut here---------------end--------------->8---

I'm not sure this tells us much.

From libpipeline's documentation
(http://libpipeline.nongnu.org/libpipeline.3.html), it seems that libpipeline
accepts "program names", and it's unclear to me if it accepts full paths (would
be weird, but we never know).

If we can't figure it out, a workaround would be to wrap "man" to add
groff-minimal to PATH.

Thoughts?

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Sun, 13 Jan 2019 17:44:01 GMT) Full text and rfc822 format available.

Message #56 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Marius Bakke <mbakke <at> fastmail.com>, Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Christopher Baines <mail <at> cbaines.net>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Sun, 13 Jan 2019 18:43:02 +0100
[Message part 1 (text/plain, inline)]
My proposed patch:

--8<---------------cut here---------------start------------->8---
(add-after 'install 'wrap-program
           (lambda* (#:key inputs outputs #:allow-other-keys)
            (let* ((out  (assoc-ref outputs "out"))
                   (groff (assoc-ref inputs "groff-minimal")))
              (wrap-program (string-append out "/bin/man")
                `("PATH" ":" prefix (,(string-append groff "/bin")))))
            #t))
--8<---------------cut here---------------end--------------->8---

Not completely ideal, but at least man-db would be fully functional for Guix
1.0! :)

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Sun, 13 Jan 2019 20:28:02 GMT) Full text and rfc822 format available.

Message #59 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Marius Bakke <mbakke <at> fastmail.com>, Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Christopher Baines <mail <at> cbaines.net>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Sun, 13 Jan 2019 21:27:34 +0100
Pierre Neidhardt <mail <at> ambrevar.xyz> skribis:

> My proposed patch:
>
> (add-after 'install 'wrap-program
>            (lambda* (#:key inputs outputs #:allow-other-keys)
>             (let* ((out  (assoc-ref outputs "out"))
>                    (groff (assoc-ref inputs "groff-minimal")))
>               (wrap-program (string-append out "/bin/man")
>                 `("PATH" ":" prefix (,(string-append groff "/bin")))))
>             #t))

It would have the same effect as Marius’ commit
296551a2e9310d4a030ee49530e9367e73aaeecf, wouldn’t it?

My understanding, at this point, is that we need to find out why
‘preconv’ segfaults, no?

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Sun, 13 Jan 2019 20:38:02 GMT) Full text and rfc822 format available.

Message #62 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Marius Bakke <mbakke <at> fastmail.com>, Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Christopher Baines <mail <at> cbaines.net>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Sun, 13 Jan 2019 21:37:25 +0100
[Message part 1 (text/plain, inline)]
> It would have the same effect as Marius’ commit
> 296551a2e9310d4a030ee49530e9367e73aaeecf, wouldn’t it?

I tested and it works! :)

> My understanding, at this point, is that we need to find out why
> ‘preconv’ segfaults, no?

I'm not completely sure but it seems that libpipeline breaks preconv for one of
those two reasons:
- Because it's a path (maybe the slashes create a problem?).
- Because it's not in the PATH.

Very weird indeed.  The libpipeline developers could probably tell us more.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 08:37:02 GMT) Full text and rfc822 format available.

Message #65 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Marius Bakke <mbakke <at> fastmail.com>, Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Christopher Baines <mail <at> cbaines.net>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 09:36:27 +0100
Hi,

Pierre Neidhardt <mail <at> ambrevar.xyz> skribis:

>> It would have the same effect as Marius’ commit
>> 296551a2e9310d4a030ee49530e9367e73aaeecf, wouldn’t it?
>
> I tested and it works! :)
>
>> My understanding, at this point, is that we need to find out why
>> ‘preconv’ segfaults, no?
>
> I'm not completely sure but it seems that libpipeline breaks preconv for one of
> those two reasons:

Did you get a backtrace of ‘preconv’ showing that the segfault is in
libpipeline?

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 08:50:02 GMT) Full text and rfc822 format available.

Message #68 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Marius Bakke <mbakke <at> fastmail.com>, Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Christopher Baines <mail <at> cbaines.net>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 09:49:26 +0100
[Message part 1 (text/plain, inline)]
> Did you get a backtrace of ‘preconv’ showing that the segfault is in
> libpipeline?

I'm not sure what you mean.  preconv is only run from libpipeline, and according
to the debug output and the error message above, preconv segfaults.

I'll try to run a GDB session on it later.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 10:21:01 GMT) Full text and rfc822 format available.

Message #71 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Marius Bakke <mbakke <at> fastmail.com>, Tobias Geerinckx-Rice <me <at> tobias.gr>,
 Christopher Baines <mail <at> cbaines.net>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 11:19:59 +0100
[Message part 1 (text/plain, inline)]
Hmmm... Not sure how to trace that with GDB.
I'm not sure how to handle child processes.

The offending libpipeline call is "pipeline_pump" in src/man.c:2329 in the
"display" function.

I'd need more time to investigate this, time which I don't have at the moment,
sorry :(

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 11:01:02 GMT) Full text and rfc822 format available.

Message #74 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Gábor Boskovits <boskovits <at> gmail.com>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 11:59:48 +0100
Hello Pierre,

Pierre Neidhardt <mail <at> ambrevar.xyz> ezt írta (időpont: 2019. jan.
14., H, 11:42):
>
> Hmmm... Not sure how to trace that with GDB.
> I'm not sure how to handle child processes.
>

https://sourceware.org/gdb/onlinedocs/gdb/Forks.html

this might help here.

> The offending libpipeline call is "pipeline_pump" in src/man.c:2329 in the
> "display" function.
>
> I'd need more time to investigate this, time which I don't have at the moment,
> sorry :(
>
> --
> Pierre Neidhardt
> https://ambrevar.xyz/

Can we trigger the segfault without libpipeline?

If it is so, then IMO preconv is at fault...

Best regards,
g_bor




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 15:08:01 GMT) Full text and rfc822 format available.

Message #77 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Gábor Boskovits <boskovits <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 16:06:58 +0100
[Message part 1 (text/plain, inline)]
> https://sourceware.org/gdb/onlinedocs/gdb/Forks.html
> 
> this might help here.

Thanks Gábor.
So I tried the following in gdb:

> set follow-for-mode child
> set detach-on-fork off
> run emacs
[inferior 2 completes]
> inferior 1
[inferior 3 completes]
> inferior 1
[inferior 4 completes]
> inferior 1
[inferior 5 hangs]

GDB seems to be stuck on the 5th inferior.  Maybe this is not so reliable.

> Can we trigger the segfault without libpipeline?

"preconv" by itself seems to work perfectly.  It even works in man if it's in
the PATH.  It only breaks from libpipeline.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 16:11:02 GMT) Full text and rfc822 format available.

Message #80 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Gábor Boskovits <boskovits <at> gmail.com>,
 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 17:10:23 +0100
Pierre Neidhardt <mail <at> ambrevar.xyz> skribis:

>> https://sourceware.org/gdb/onlinedocs/gdb/Forks.html
>> 
>> this might help here.
>
> Thanks Gábor.
> So I tried the following in gdb:
>
>> set follow-for-mode child
>> set detach-on-fork off
>> run emacs
> [inferior 2 completes]
>> inferior 1
> [inferior 3 completes]
>> inferior 1
> [inferior 4 completes]
>> inferior 1
> [inferior 5 hangs]
>
> GDB seems to be stuck on the 5th inferior.  Maybe this is not so reliable.

Maybe it’s just that the inferior is still running, no?

>> Can we trigger the segfault without libpipeline?
>
> "preconv" by itself seems to work perfectly.  It even works in man if it's in
> the PATH.  It only breaks from libpipeline.

What about reproducing the segfault and getting a core dump?  Roughly
you can do:

  ulimit -c unlimited
  man whatever that causes the crash
  gdb /path/to/preconv core

HTH!

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 16:25:01 GMT) Full text and rfc822 format available.

Message #83 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Gábor Boskovits <boskovits <at> gmail.com>,
 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 17:24:55 +0100
[Message part 1 (text/plain, inline)]
ludo <at> gnu.org (Ludovic Courtès) writes:
> Maybe it’s just that the inferior is still running, no?

Well, it should finish in a fraction of a second.

sudo sh -c "echo '/tmp/core_%e.%p' >  /proc/sys/kernel/core_pattern"

>   ulimit -c unlimited
>   man whatever that causes the crash
>   gdb /path/to/preconv core

Smart!

This gave me no coredump at first because the pipeline "cd" into the
store/profile, which is readonly.  So I did

--8<---------------cut here---------------start------------->8---
sudo sh -c "echo '/tmp/core_%e.%p' > /proc/sys/kernel/core_pattern"
--8<---------------cut here---------------end--------------->8---

and then the segfault would generate a core.  From which GDB gives me:

--8<---------------cut here---------------start------------->8---
Core was generated by `preconv -e UTF-8'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __stpcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:298
298     ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S: No such file or directory.
(gdb) bt
#0  __stpcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcpy-sse2-unaligned.S:298
#1  0x00000000004062c3 in relocatep ()
#2  0x0000000000405b5d in locale_charset ()
#3  0x0000000000402445 in main ()
(gdb) 
--8<---------------cut here---------------end--------------->8---

I haven't looked at the code yet, but here is my clue: argv[0], the program
name, is too long and overflows some string.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 16:44:02 GMT) Full text and rfc822 format available.

Message #86 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 17:42:54 +0100
[Message part 1 (text/plain, inline)]
Hi Pierre,

locale_charset, implemented in groff, uses nl_langinfo(CODESET)--and just a few
days ago we had a bug report that CP437 doesn't work there.  Maybe it's related.

(libs/libgroff/localcharset.c's locale_charset looks overly complicated, WTF?)

Maybe argv[0] is still the cause, but try setting the environment variable
LC_ALL to "C" to disable locales before invoking "man".  Does this make it not
crash?
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 16:58:02 GMT) Full text and rfc822 format available.

Message #89 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 17:57:12 +0100
[Message part 1 (text/plain, inline)]
> (libs/libgroff/localcharset.c's locale_charset looks overly complicated, WTF?)

Oh dear... relocatep.cpp is not much better, here is the offending function:

--8<---------------cut here---------------start------------->8---
// Strip the installation prefix and replace it
// with the current installation prefix; return the relocated path.
char *relocatep(const char *path)
{
#if DEBUG
  fprintf(stderr, "relocatep: path = %s\n", path);
  fprintf(stderr, "relocatep: INSTALLPATH = %s\n", INSTALLPATH);
  fprintf(stderr, "relocatep: INSTALLPATHLEN = %d\n", INSTALLPATHLEN);
#endif
  if (!curr_prefix)
    set_current_prefix();
  if (strncmp(INSTALLPATH, path, INSTALLPATHLEN))
    return strsave(path);
  char *relative_path = (char *)path + INSTALLPATHLEN;
  size_t relative_path_len = strlen(relative_path);
  char *relocated_path = new char[curr_prefix_len + relative_path_len + 1];
  strcpy(relocated_path, curr_prefix);
  strcat(relocated_path, relative_path);
#if DEBUG
  fprintf(stderr, "relocated_path: %s\n", relocated_path);
#endif /* DEBUG */
  return relocated_path;
}
--8<---------------cut here---------------end--------------->8---

I don't even get the use case of the function...  From locale_charset, it seems
that the argument is LIBDIR.

So maybe INSTALLPATH and/or LIBDIR is not properly set when we compile groff.

> Maybe argv[0] is still the cause, but try setting the environment variable
> LC_ALL to "C" to disable locales before invoking "man".  Does this make it not
> crash?

This works indeed!  Can you see a fix then?

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 17:47:02 GMT) Full text and rfc822 format available.

Message #92 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 18:46:00 +0100
[Message part 1 (text/plain, inline)]
Hi Pierre,

On Mon, 14 Jan 2019 17:57:12 +0100
Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:

> > (libs/libgroff/localcharset.c's locale_charset looks overly complicated, WTF?)  
> 
> Oh dear... relocatep.cpp is not much better, here is the offending function:
> 
> --8<---------------cut here---------------start------------->8---
> // Strip the installation prefix and replace it
> // with the current installation prefix; return the relocated path.
> char *relocatep(const char *path)
> {
> #if DEBUG
>   fprintf(stderr, "relocatep: path = %s\n", path);
>   fprintf(stderr, "relocatep: INSTALLPATH = %s\n", INSTALLPATH);
>   fprintf(stderr, "relocatep: INSTALLPATHLEN = %d\n", INSTALLPATHLEN);
> #endif
>   if (!curr_prefix)
>     set_current_prefix();
>   if (strncmp(INSTALLPATH, path, INSTALLPATHLEN))
>     return strsave(path);
>   char *relative_path = (char *)path + INSTALLPATHLEN;
>   size_t relative_path_len = strlen(relative_path);
>   char *relocated_path = new char[curr_prefix_len + relative_path_len + 1];
>   strcpy(relocated_path, curr_prefix);
>   strcat(relocated_path, relative_path);
> #if DEBUG
>   fprintf(stderr, "relocated_path: %s\n", relocated_path);
> #endif /* DEBUG */
>   return relocated_path;
> }
> --8<---------------cut here---------------end--------------->8---
> 
> I don't even get the use case of the function...  From locale_charset, it seems
> that the argument is LIBDIR.

It's used inside get_charset_aliases, which reads the file "charset.alias".
We have only one alias in our file "charset.alias" (in GuixSD), so let's try
ignoring it completely for now.

What happens if you don't mess with LC_ALL but set the environment variable
CHARSETALIASDIR to "/does_not_exist" ?

> Can you see a fix then?

If the avove also works, we can just patch get_charset_aliases to always return
the empty string (or a string literal).

The one alias we do have in "charset.alias" is:

ISO_646.IRV:1983 ASCII

Alternatively, we could patch get_charset_aliases so it always takes our
charset.alias from our libiconv (without get_charset_aliases calling
"relocate").

Still it would be interesting to find the Segmentation fault (that's
not supposed to ever happen).
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 17:50:02 GMT) Full text and rfc822 format available.

Message #95 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 18:48:53 +0100
[Message part 1 (text/plain, inline)]
set_current_prefix() searches for the current program executable file in $PATH,
and it can fail and return 0. 

In that case, relocatep will probably segfault at the location marked below:

>   char *relocated_path = new char[curr_prefix_len + relative_path_len + 1];
>   strcpy(relocated_path, curr_prefix);
                           ^^^^^^^^^^^
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 17:51:01 GMT) Full text and rfc822 format available.

Message #98 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 18:50:54 +0100
[Message part 1 (text/plain, inline)]
On Mon, 14 Jan 2019 18:48:53 +0100
Danny Milosavljevic <dannym <at> scratchpost.org> wrote:

> set_current_prefix() searches for the current program executable file in $PATH,
> and it can fail and return 0. 
> 
> In that case, relocatep will probably segfault at the location marked below:
> 
> >   char *relocated_path = new char[curr_prefix_len + relative_path_len + 1];
> >   strcpy(relocated_path, curr_prefix);  
>                            ^^^^^^^^^^^

This probably happens when argv[0] is not an absolute path, but still the program
somehow got started, but it is not found in $PATH either.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 18:20:01 GMT) Full text and rfc822 format available.

Message #101 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 19:19:19 +0100
[Message part 1 (text/plain, inline)]
You are right:

    CHARSETALIASDIR=/does_not_exist /gnu/store/fm7jlkf93bh7bw03m8hbha2b5qxjz0kz-man-db-2.8.3/bin/man nmcli-examples
    
also works.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 20:28:02 GMT) Full text and rfc822 format available.

Message #104 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 21:27:35 +0100
Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> On Mon, 14 Jan 2019 18:48:53 +0100
> Danny Milosavljevic <dannym <at> scratchpost.org> wrote:
>
>> set_current_prefix() searches for the current program executable file in $PATH,
>> and it can fail and return 0. 
>> 
>> In that case, relocatep will probably segfault at the location marked below:
>> 
>> >   char *relocated_path = new char[curr_prefix_len + relative_path_len + 1];
>> >   strcpy(relocated_path, curr_prefix);  
>>                            ^^^^^^^^^^^
>
> This probably happens when argv[0] is not an absolute path, but still the program
> somehow got started, but it is not found in $PATH either.

The ‘set_current_prefix’ logic is extremely fragile; it should readlink
from /proc/self/exe on GNU/Linux.

But in our case, no relocation happens, so we can just patch it to do:

  void set_current_prefix (void)
  {
    curr_prefix = "/gnu/store/…";
  }

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 21:43:01 GMT) Full text and rfc822 format available.

Message #107 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Ludovic Courtès <ludo <at> gnu.org>, Pierre Neidhardt
 <mail <at> ambrevar.xyz>
Cc: 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 22:42:49 +0100
[Message part 1 (text/plain, inline)]
Hi Pierre,
Hi Ludo,

On Mon, 14 Jan 2019 21:27:35 +0100
Ludovic Courtès <ludo <at> gnu.org> wrote:

> The ‘set_current_prefix’ logic is extremely fragile; it should readlink
> from /proc/self/exe on GNU/Linux.
> 
> But in our case, no relocation happens, so we can just patch it to do:
> 
>   void set_current_prefix (void)
>   {
>     curr_prefix = "/gnu/store/…";
>   }

I agree.

However, in this case the question is why is it picking up all that stuff anyway.

The relocation is only used in the case of the groff-local localcharset.c being
used.
It's only a fallback that is used if glibc < 2.1.  I've checked the guix build
logs, the glibc version is newer and also found by the 'configure phase of groff.

I can't tell about groff-minimal because the build log as given by
"guix build --log-file groff-minimal"
(https://ci.guix.info/log/mpjn4jfx5i8jxblfj538n22hv56rdnhw-groff-minimal-1.22.3)
has 0 Bytes.

Anyway, a simple way to disable this weird relocation business would be to remove:

./src/libs/libgroff/Makefile.sub:             -DENABLE_RELOCATABLE=1 \

However, it would be preferrable to find out why ./src/libs/gnulib/lib/localcharset.c
(the only user of it) is used at all.  It really shouldn't be.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 22:00:02 GMT) Full text and rfc822 format available.

Message #110 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 22:59:23 +0100
[Message part 1 (text/plain, inline)]
Maybe I'm judging a bit too fast, but it seems to me that this part of the code
is rusty to the point that I wonder if getting down to understanding the hows
and the whys will ever reveal useful or enlightening at all.  It's rather safe
to bet that nothing will ever depend on man-db's rendering ;)

I feel that it's just easier to apply one of the 3-4 fixes we've already come up
with :p

My two cents :)

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 22:15:01 GMT) Full text and rfc822 format available.

Message #113 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Ludovic Courtès <ludo <at> gnu.org>, Pierre Neidhardt
 <mail <at> ambrevar.xyz>
Cc: 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 23:14:06 +0100
[Message part 1 (text/plain, inline)]
Correction, the file "charset.alias" is only installed for groff for glibc < 2.1 .
The code that reads charset.alias is always created.
What could possibly go wrong?

Anyway, I suggest the following minimal patch:

diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm
index 77728a5d7..ee2896367 100644
--- a/gnu/packages/groff.scm
+++ b/gnu/packages/groff.scm
@@ -62,6 +62,16 @@
     `(#:parallel-build? #f   ; parallel build fails
       #:phases
       (modify-phases %standard-phases
+        (add-after 'unpack 'disable-relocatability
+          (lambda _
+            (substitute* "src/libs/libgroff/Makefile.sub"
+             (("-DENABLE_RELOCATABLE=1") ""))
+            ;; That file contains a crash bug--so make sure that
+            ;; its contents are not there.
+            (call-with-output-file "src/libs/libgroff/relocate.cpp"
+              (lambda (port)
+                #t))
+            #t))
         (add-after 'unpack 'setenv
           (lambda _
             (setenv "GS_GENERATE_UUIDS" "0")

I filed an upstream bug report:

https://savannah.gnu.org/bugs/index.php?55475
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Mon, 14 Jan 2019 22:40:02 GMT) Full text and rfc822 format available.

Message #116 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Mon, 14 Jan 2019 23:39:19 +0100
[Message part 1 (text/plain, inline)]
I suggest your patch explain that crash involves man-db + add a link to this discussion.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Tue, 15 Jan 2019 12:30:02 GMT) Full text and rfc822 format available.

Message #119 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Tue, 15 Jan 2019 13:29:18 +0100
Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> Correction, the file "charset.alias" is only installed for groff for glibc < 2.1 .
> The code that reads charset.alias is always created.
> What could possibly go wrong?
>
> Anyway, I suggest the following minimal patch:
>
> diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm
> index 77728a5d7..ee2896367 100644
> --- a/gnu/packages/groff.scm
> +++ b/gnu/packages/groff.scm
> @@ -62,6 +62,16 @@
>      `(#:parallel-build? #f   ; parallel build fails
>        #:phases
>        (modify-phases %standard-phases
> +        (add-after 'unpack 'disable-relocatability
> +          (lambda _
> +            (substitute* "src/libs/libgroff/Makefile.sub"
> +             (("-DENABLE_RELOCATABLE=1") ""))
> +            ;; That file contains a crash bug--so make sure that
> +            ;; its contents are not there.
> +            (call-with-output-file "src/libs/libgroff/relocate.cpp"
> +              (lambda (port)
> +                #t))
> +            #t))
>          (add-after 'unpack 'setenv
>            (lambda _
>              (setenv "GS_GENERATE_UUIDS" "0")
>
> I filed an upstream bug report:
>
> https://savannah.gnu.org/bugs/index.php?55475

Neat!  Pierre, can you confirm it fixes the issue?

If it does, I agree with Pierre that you should add a comment
referencing this bug and upstream’s, but apart from that, please go
ahead!

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Wed, 16 Jan 2019 10:02:02 GMT) Full text and rfc822 format available.

Message #122 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Wed, 16 Jan 2019 11:01:44 +0100
[Message part 1 (text/plain, inline)]
Nope, the patch does not work for me.

I applied the patch in the Guix checkout, 
then

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build man-db
...
/gnu/store/1w83i51wvap67kl7gdz51ly3pbbx29dv-man-db-2.8.3
$ /gnu/store/1w83i51wvap67kl7gdz51ly3pbbx29dv-man-db-2.8.3/bin/man nmcli-examples
--8<---------------cut here---------------end--------------->8---

Still truncated.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Wed, 16 Jan 2019 10:58:01 GMT) Full text and rfc822 format available.

Message #125 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Wed, 16 Jan 2019 11:56:54 +0100
[Message part 1 (text/plain, inline)]
Hi Pierre,

On Wed, 16 Jan 2019 11:01:44 +0100
Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:

> Nope, the patch does not work for me.
> 
> I applied the patch in the Guix checkout, 
> then
> 
> --8<---------------cut here---------------start------------->8---
> $ ./pre-inst-env guix build man-db
> ...
> /gnu/store/1w83i51wvap67kl7gdz51ly3pbbx29dv-man-db-2.8.3
> $ /gnu/store/1w83i51wvap67kl7gdz51ly3pbbx29dv-man-db-2.8.3/bin/man nmcli-examples
> --8<---------------cut here---------------end--------------->8---
> 
> Still truncated.
> 

Does this include your groff preconv path substitution in man?
Does preconv still segfault?
How can I reproduce this situation?  Is it a guix branch other than master?
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Wed, 16 Jan 2019 13:03:01 GMT) Full text and rfc822 format available.

Message #128 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Wed, 16 Jan 2019 14:02:10 +0100
[Message part 1 (text/plain, inline)]
Stupid me, forgot to patch man-db with the preconv path substitution!
OK, now it works.

Who would like to merge? :)

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Wed, 16 Jan 2019 14:18:01 GMT) Full text and rfc822 format available.

Message #131 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Wed, 16 Jan 2019 15:17:37 +0100
[Message part 1 (text/plain, inline)]
Hi Pierre,

On Wed, 16 Jan 2019 14:02:10 +0100
Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:

> OK, now it works.
> 
> Who would like to merge? :)

I've pushed the disable-relocatability patch, amended by a huge comment that's
larger than the actual code, as f57693e17c7905d2f11e46d04cb558fe0b0fc39b.

Please push the part that does the preconv path substitution and mention that
it fixes this bug.


[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Wed, 16 Jan 2019 17:40:01 GMT) Full text and rfc822 format available.

Message #134 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Ricardo Wurmus <rekado <at> elephly.net>,
 Ludovic Courtès <ludovic.courtes <at> inria.fr>,
 efraim <at> flashner.co.il, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Wed, 16 Jan 2019 18:39:19 +0100
[Message part 1 (text/plain, inline)]
Danny, Efraim just reverted your commit because it rebuilds 3600+ packages :p

How shall we proceed then?

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Wed, 16 Jan 2019 18:13:01 GMT) Full text and rfc822 format available.

Message #137 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Ricardo Wurmus <rekado <at> elephly.net>,
 Danny Milosavljevic <dannym <at> scratchpost.org>,
 Ludovic Courtès <ludovic.courtes <at> inria.fr>,
 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Wed, 16 Jan 2019 20:12:00 +0200
[Message part 1 (text/plain, inline)]
On Wed, Jan 16, 2019 at 06:39:19PM +0100, Pierre Neidhardt wrote:
> Danny, Efraim just reverted your commit because it rebuilds 3600+ packages :p
> 
> How shall we proceed then?
> 

groff-minimal only has ~20 dependents, does that work? Otherwise
groff-for-manpages is an option


-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Wed, 16 Jan 2019 18:20:02 GMT) Full text and rfc822 format available.

Message #140 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: Ricardo Wurmus <rekado <at> elephly.net>,
 Danny Milosavljevic <dannym <at> scratchpost.org>,
 Ludovic Courtès <ludovic.courtes <at> inria.fr>,
 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Wed, 16 Jan 2019 19:18:59 +0100
[Message part 1 (text/plain, inline)]
My guess is that groff-minimal would work.
Danny?

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Wed, 16 Jan 2019 19:58:01 GMT) Full text and rfc822 format available.

Message #143 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Ricardo Wurmus <rekado <at> elephly.net>,
 Ludovic Courtès <ludovic.courtes <at> inria.fr>,
 Efraim Flashner <efraim <at> flashner.co.il>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Wed, 16 Jan 2019 20:57:28 +0100
[Message part 1 (text/plain, inline)]
Apparently, man-db has groff-minimal as a regular input, so I guess we are lucky.
So we could adapt groff-minimal only if we wanted to.

But that would mean that even after that, the "groff" package would still
contain a memory corruption bug in preconv - which is arguably a security
problem.  Should we use grafts instead?

Patch for the former is attached.
[0001-gnu-groff-minimal-Disable-relocatability.patch (text/x-patch, attachment)]
[Message part 3 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Wed, 16 Jan 2019 22:33:01 GMT) Full text and rfc822 format available.

Message #146 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Wed, 16 Jan 2019 23:32:12 +0100
Hello!

Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> Apparently, man-db has groff-minimal as a regular input, so I guess we are lucky.
> So we could adapt groff-minimal only if we wanted to.
>
> But that would mean that even after that, the "groff" package would still
> contain a memory corruption bug in preconv - which is arguably a security
> problem.  Should we use grafts instead?

Though in practice we don’t do much with ‘groff’ itself, unless users
explicitly install it and use it, right?  I’m leaning towards fixing it
in ‘core-updates’.

> From adc9e7940b54e467732ec923c6a3fcec810dce48 Mon Sep 17 00:00:00 2001
> From: Danny Milosavljevic <dannym <at> scratchpost.org>
> Date: Wed, 16 Jan 2019 15:00:04 +0100
> Subject: [PATCH] gnu: groff-minimal: Disable relocatability.
> Tags: patch
>
> * gnu/packages/groff.scm (groff-minimal)[arguments]<#:phases>
> [disable-relocatability]: New phase.

Please add the “Fixes” line in the log.  Otherwise LGTM (I like the
description of the bug ;-)).

Thanks!

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Wed, 16 Jan 2019 22:47:02 GMT) Full text and rfc822 format available.

Message #149 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Ludovic Courtès <ludo <at> gnu.org>, Pierre Neidhardt
 <mail <at> ambrevar.xyz>
Cc: 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Wed, 16 Jan 2019 23:45:58 +0100
[Message part 1 (text/plain, inline)]
> Please add the “Fixes” line in the log.

It alone does not fix the bug.  Only combined with Pierre's part does it fix it,
the part which makes man-db find groff's preconv in the first place (I don't
believe a patch about that was submitted yet).

Should I still add a "Fixes" line here?

>(I like the description of the bug ;-)).

:-)
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Thu, 17 Jan 2019 07:32:01 GMT) Full text and rfc822 format available.

Message #152 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Thu, 17 Jan 2019 08:31:37 +0100
[Message part 1 (text/plain, inline)]
> It alone does not fix the bug.  Only combined with Pierre's part does it fix it,
> the part which makes man-db find groff's preconv in the first place (I don't
> believe a patch about that was submitted yet).

I can only only add my patch (well, Markus patch, really) after yours, otherwise
it cause `man` to segfault all the time.

Let me know when you've applied it on core-updates and I'll follow you.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Thu, 17 Jan 2019 08:34:02 GMT) Full text and rfc822 format available.

Message #155 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Ricardo Wurmus <rekado <at> elephly.net>,
 Danny Milosavljevic <dannym <at> scratchpost.org>, efraim <at> flashner.co.il,
 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Thu, 17 Jan 2019 09:33:18 +0100
Hello,

Pierre Neidhardt <mail <at> ambrevar.xyz> skribis:

> Danny, Efraim just reverted your commit because it rebuilds 3600+ packages :p

BTW, we must pay a great deal of attention to issues like this one:
someone who pulled right after that commit must have been wondering
what’s going on.  That makes for a very bad user experience.

I wonder if we could come up with a pre-push hook that runs ‘guix
refresh -l’ or something.

Thoughts?

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Thu, 17 Jan 2019 08:42:01 GMT) Full text and rfc822 format available.

Message #158 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludovic.courtes <at> inria.fr>
Cc: Ricardo Wurmus <rekado <at> elephly.net>,
 Danny Milosavljevic <dannym <at> scratchpost.org>, efraim <at> flashner.co.il,
 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Thu, 17 Jan 2019 09:41:47 +0100
[Message part 1 (text/plain, inline)]
> I wonder if we could come up with a pre-push hook that runs ‘guix
> refresh -l’ or something.
> 
> Thoughts?

Absolutely!

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Thu, 17 Jan 2019 08:44:02 GMT) Full text and rfc822 format available.

Message #161 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Thu, 17 Jan 2019 09:43:38 +0100
Pierre Neidhardt <mail <at> ambrevar.xyz> skribis:

>> It alone does not fix the bug.  Only combined with Pierre's part does it fix it,
>> the part which makes man-db find groff's preconv in the first place (I don't
>> believe a patch about that was submitted yet).
>
> I can only only add my patch (well, Markus patch, really) after yours, otherwise
> it cause `man` to segfault all the time.
>
> Let me know when you've applied it on core-updates and I'll follow you.

On ‘master’ you mean?  The patch that touches ‘groff-minimal’ (not
‘groff’) can go to ‘master’.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Thu, 17 Jan 2019 09:12:02 GMT) Full text and rfc822 format available.

Message #164 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Thu, 17 Jan 2019 10:10:45 +0100
[Message part 1 (text/plain, inline)]
Hi Pierre,

I've applied the groff-minimal patch to master now.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Thu, 17 Jan 2019 09:40:01 GMT) Full text and rfc822 format available.

Message #167 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Thu, 17 Jan 2019 10:39:17 +0100
[Message part 1 (text/plain, inline)]
I meant the man-db patch should be applied after the groff (or groff-minimal)
patch.

Are we applying anything on master?  I'd rather just patch groff on core-updates.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Thu, 17 Jan 2019 09:43:02 GMT) Full text and rfc822 format available.

Message #170 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Thu, 17 Jan 2019 10:42:18 +0100
[Message part 1 (text/plain, inline)]
Danny Milosavljevic <dannym <at> scratchpost.org> writes:
> I've applied the groff-minimal patch to master now.

Just saw that.  OK, I'll go ahead and apply my man-db patch.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30785; Package guix. (Thu, 17 Jan 2019 11:33:02 GMT) Full text and rfc822 format available.

Message #173 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Thu, 17 Jan 2019 12:32:03 +0100
[Message part 1 (text/plain, inline)]
Done.

Keeping this bug open till we patch groff on core-updates.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Reply sent to Marius Bakke <mbakke <at> fastmail.com>:
You have taken responsibility. (Thu, 28 Nov 2019 00:14:02 GMT) Full text and rfc822 format available.

Notification sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
bug acknowledged by developer. (Thu, 28 Nov 2019 00:14:02 GMT) Full text and rfc822 format available.

Message #178 received at 30785-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <mbakke <at> fastmail.com>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>, Ludovic Courtès
 <ludo <at> gnu.org>
Cc: 30785-done <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Thu, 28 Nov 2019 01:13:49 +0100
[Message part 1 (text/plain, inline)]
Pierre Neidhardt <mail <at> ambrevar.xyz> writes:

> Keeping this bug open till we patch groff on core-updates.

This was done in 5466e82a1e61349e5a3f9726a03874e4f9817226.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 26 Dec 2019 12:24:06 GMT) Full text and rfc822 format available.

bug unarchived. Request was from "G. Branden Robinson" <g.branden.robinson <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 22 Apr 2021 18:44:02 GMT) Full text and rfc822 format available.

Information forwarded to dannym <at> scratchpost.org, bug-guix <at> gnu.org:
bug#30785; Package guix. (Thu, 22 Apr 2021 18:54:02 GMT) Full text and rfc822 format available.

Message #185 received at 30785 <at> debbugs.gnu.org (full text, mbox):

From: "G. Branden Robinson" <g.branden.robinson <at> gmail.com>
To: 30785 <at> debbugs.gnu.org
Subject: Re: bug#30785: Man pages truncated, repeated
Date: Fri, 23 Apr 2021 04:53:04 +1000
[Message part 1 (text/plain, inline)]
Hello Guix folks,

I submitted a change addressing this bug to groff Git back in
January[1].  Despite repeated requests I couldn't scare up any Windows
users to test it, and that's only environment except for Guix (until you
patched around it) that ever exhibited it.

If my understanding of the problem is correct, then something (possibly
preconv) using libgroff should throw an assertion failure.

My thanks if you can help.

Regards,
Branden

[1] https://savannah.gnu.org/bugs/?55475
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 21 May 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.