GNU bug report logs - #36677
[PATCH] Don't truncate backtraces

Previous Next

Package: guile;

Reported by: Robert Vollmert <rob <at> vllmrt.net>

Date: Mon, 15 Jul 2019 20:33:01 UTC

Severity: normal

Tags: patch

Full log


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

From: Robert Vollmert <rob <at> vllmrt.net>
To: Mark H Weaver <mhw <at> netris.org>
Cc: 36677 <at> debbugs.gnu.org
Subject: Re: bug#36677: [PATCH] Don't truncate backtraces
Date: Sun, 21 Jul 2019 17:35:35 +0200

> On 17. Jul 2019, at 20:11, Robert Vollmert <rob <at> vllmrt.net> wrote:
> 
> 
> 
>> On 17. Jul 2019, at 19:57, Mark H Weaver <mhw <at> netris.org> wrote:
>> 
>> Hi Robert,
>> 
>> Robert Vollmert <rob <at> vllmrt.net> writes:
>> 
>>> * module/system/repl/debug.scm (print-frame): Print full object if
>>> width keyword is #f.
>>> * libguile/backtrace.c (display_backtrace_body): Call print-frames
>>> with #:width #f.
>>> ---
>>> 
>>> This change was prompted by recent discussion on the Guix lists:
>>> https://lists.gnu.org/archive/html/guix-devel/2019-07/msg00207.html
>>> In Guix, the truncation of stack traces frequently obscures
>>> important information due to the long filenames.
>> 
>> I'm sympathetic to this problem, but simply disabling the truncated
>> printing during backtraces is not workable.  It is quite often the case
>> that some of the structures printed in backtraces are *huge*, or even
>> cyclic.
>> 
>> Have you tried setting the COLUMNS environment variable to a larger
>> value?  I'd prefer a solution along those lines, where the user can set
>> an environment variable to ask for less truncation in backtraces.
> 
> Defaulting to something longer than 80 might be workable, say 250?
> 
> I don’t think that it should be necessary to set an environment variable
> to get usable stack traces…

I’d like to add that the current code to determine terminal width
seems to be broken. COLUMNS is a bash-local variable, it’s not typically
set anywhere as an environment variable.

Some ways to get actual terminal size:

$ tput cols  # from ncurses
80
$ stty size  # from coreutils
25 80

Though it’s unclear how these work in non-interactive situations.





This bug report was last modified 6 years and 24 days ago.

Previous Next


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