valgrind is finding ~288 bytes per thread create being leaked:
==12683== Thread 1:
==12683== 288 bytes in 1 blocks are possibly lost in loss record 1 of 7
==12683== at 0x4C2EB45: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==12683== by 0x40139AA: allocate_dtv (dl-tls.c:322)
==12683== by 0x40139AA: _dl_allocate_tls (dl-tls.c:539)
==12683== by 0x4E412C9: allocate_stack (allocatestack.c:586)
==12683== by 0x4E412C9: pthread_create@@GLIBC_2.2.5 (pthread_create.c:539)
==12683== by 0xA89731: _cgo_sys_thread_start (in /usr/lib/snapd/snapd)
==12683== by 0x5EB33C: ??? (in /usr/lib/snapd/snapd)
==12683== by 0xC820000A7F: ???
==12683== by 0xC84CBF: ??? (in /usr/lib/snapd/snapd)
..but I suspect there are other memory consumers somewhere else too as this can't explain the megabytes of leakage I'm seeing.
valgrind is finding ~288 bytes per thread create being leaked:
==12683== Thread 1: valgrind/ vgpreload_ memcheck- amd64-linux. so) c:586) create@ @GLIBC_ 2.2.5 (pthread_ create. c:539) thread_ start (in /usr/lib/ snapd/snapd) snapd/snapd) snapd/snapd)
==12683== 288 bytes in 1 blocks are possibly lost in loss record 1 of 7
==12683== at 0x4C2EB45: calloc (in /usr/lib/
==12683== by 0x40139AA: allocate_dtv (dl-tls.c:322)
==12683== by 0x40139AA: _dl_allocate_tls (dl-tls.c:539)
==12683== by 0x4E412C9: allocate_stack (allocatestack.
==12683== by 0x4E412C9: pthread_
==12683== by 0xA89731: _cgo_sys_
==12683== by 0x5EB33C: ??? (in /usr/lib/
==12683== by 0xC820000A7F: ???
==12683== by 0xC84CBF: ??? (in /usr/lib/
..but I suspect there are other memory consumers somewhere else too as this can't explain the megabytes of leakage I'm seeing.