public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Aaron Merey <amerey@redhat.com>, keiths@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Remove download size from debuginfod progress messages
Date: Thu, 24 Mar 2022 11:17:43 -0400	[thread overview]
Message-ID: <eabe522a-4126-ce60-0227-9c7ad5892523@simark.ca> (raw)
In-Reply-To: <20220323180616.29957-1-amerey@redhat.com>

On 2022-03-23 14:06, Aaron Merey via Gdb-patches wrote:
> Hi Keith,
>
> On Wed, Mar 23, 2022 at 12:02 PM Keith Seitz <keiths@redhat.com> wrote:
>> On 3/22/22 17:34, Aaron Merey wrote:
>>> Currently debuginfod progress update messages include the size of
>>> each download:
>>>
>>>    Downloading 7.5 MB separate debug info /lib/libxyz.so.0
>>>
>>> This value originates from the Content-Length HTTP header of the
>>> transfer.  However this header is not guaranteed to be present for
>>> each download.  This can happen when debuginfod servers compress files
>>> on-the-fly at the time of transfer.  In this case gdb wrongly prints
>>> "-0.00 MB" as the size.
>>
>> I realize this is an interim patch to address an issue currently
>> under development, and I'm okay with that. There are a lot of
>> people that use devel versions of gdb to do work. [At least I
>> hope I'm not alone!]
>>
>> However, I would really rather not simply remove all download
>> sizes. If we can detect the condition that would print the unhelpful
>> "-0.00 MB", then *just* removing the download size for that case (or
>> printing "unknown" or something) would be my preferred path.
>
> I wanted to keep this patch as simple as possible in order to avoid
> getting bogged down by details that might be more appropriate for
> the patch in-progress that reworks these messages.  But I agree that
> we should continue to print sizes if they are available.  I've added
> this to the patch below.
>
> Aaron
>
> ---
> Remove download size from debuginfod progress messages if unavailable
>
> Currently debuginfod progress update messages include the size of
> each download:
>
>   Downloading 7.5 MB separate debug info /lib/libxyz.so.0
>
> This value originates from the Content-Length HTTP header of the
> transfer.  However this header is not guaranteed to be present for
> each download.  This can happen when debuginfod servers compress files
> on-the-fly at the time of transfer.  In this case gdb wrongly prints
> "-0.00 MB" as the size.
>
> This patch removes download sizes from progress messages when they are
> not available.  It also removes usage of the progress bar until
> a more thorough reworking of progress updating is implemented. [1]
>
> [1] https://sourceware.org/pipermail/gdb-patches/2022-February/185798.html

I'm fine with an interim patch, but I'd really like to see the progress
bar back, I enjoy it :)!

I haven't been involved in those dicussions so I don't know what the
plan is.  But typically progress bars have an "undefined total" mode
where you can still tell that the operation is progressing (bytes are
being received), you just don't what percentage of the total.

But really, is it a problem for GDB master to print "~0.00 MB", until
the "real" fix is merged?  It's not like it's causing a crash or
anything like that?  Or is it something you want to push to the GDB 12
branch?

The patch LGTM in any case, if that's the route you want to take.

Simon

  parent reply	other threads:[~2022-03-24 15:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-23  0:34 Aaron Merey
2022-03-23 16:02 ` Keith Seitz
2022-03-23 18:06   ` Aaron Merey
2022-03-23 18:56     ` Keith Seitz
2022-03-24 15:17     ` Simon Marchi [this message]
2022-03-24 19:04       ` Aaron Merey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eabe522a-4126-ce60-0227-9c7ad5892523@simark.ca \
    --to=simark@simark.ca \
    --cc=amerey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).