[pacman-dev] [PATCH 1/3] Always enable TotalDownload

Allan McRae allan at archlinux.org
Tue Apr 20 04:15:42 UTC 2021


On 20/4/21 2:09 pm, Allan McRae wrote:
> On 19/4/21 5:59 am, morganamilo wrote:
>> Previously TotalDownload would switch the % download from per package to
>> overall. Meaning you had a choice of which information to dispplay.
>>
>> Now with parallel downloads TotalDownload adds an extra progress bar.
>> There's no reason to have this an off by default feature. Let's just
>> make it always on.
>> ---
> 
> 
> allan at mando ~/arch/code/pacman (patchqueue)
> $ PACTEST_VALGRIND=1 ninja -C build test
> 
> Summary of Failures:
> 
> 332/335 xfercommand001.py                                 FAIL
>    2.51s   0/1 subtests passed
> 
> Memory leak somewhere - I have have not looked beyond attributing it to
> this patch.   How this patch causes it is another issue!
> .
> 

The total progressbar is unconditionally initialised, but not used/freed
with xfercommand.

==1615702== 80 bytes in 1 blocks are still reachable in loss record 3 of 3
==1615702==    at 0x4840B65: calloc (vg_replace_malloc.c:760)
==1615702==    by 0x11C29C: init_total_progressbar (callback.c:743)
==1615702==    by 0x11C29C: cb_event (callback.c:345)
==1615702==    by 0x48A336E: download_files (sync.c:796)
==1615702==    by 0x48A336E: _alpm_sync_load (sync.c:1131)
==1615702==    by 0x48A4ECA: alpm_trans_commit (trans.c:173)
==1615702==    by 0x11A4C9: sync_prepare_execute (sync.c:829)
==1615702==    by 0x10F218: main (pacman.c:1257)
==1615702==
{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   match-leak-kinds: reachable
   fun:calloc
   fun:init_total_progressbar
   fun:cb_event
   fun:download_files
   fun:_alpm_sync_load
   fun:alpm_trans_commit
   fun:sync_prepare_execute
   fun:main
}


More information about the pacman-dev mailing list