On Tue, 2014-12-09 at 12:02 +, Ian Campbell wrote:
I tried running under Valgrind, but urxvtd is sgid so Valgrind is
unable to run (if you know of a workaround for this I'll gladly try
again).
Shortly after hitting Send I had a small epiphany. I
copied /usr/bin/urxvt (nb not urxvtd) somewhere else, which dropped the
sgid and ran with -ut (which stops it trying to write to utmp, which I
suppose was the reason for the sgid).
The result of:
valgrind --leak-check=full --log-file=tmp/urxvt.valgrind tmp/urxvt -ut
and then immediately pressing Ctrl-D in the resulting window is
attached.
It shows quite a few definitely lost bytes in both libperl and
libfontconfig. I expect those would be accounted to the urxvtd process
if I were using it here and would accumulate with time.
I hope this is helpful. Next time I lose my urxvtd process I'll rerun it
under valgrind using a similar technique in the hopes that something
useful might show up.
Ian.
==30391== Memcheck, a memory error detector
==30391== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==30391== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==30391== Command: tmp/urxvt -ut
==30391== Parent PID: 29104
==30391==
==30391==
==30391== HEAP SUMMARY:
==30391== in use at exit: 255,466 bytes in 7,491 blocks
==30391== total heap usage: 71,185 allocs, 63,694 frees, 14,205,218 bytes
allocated
==30391==
==30391== 7 bytes in 1 blocks are definitely lost in loss record 8 of 441
==30391==at 0x4C28C20: malloc (vg_replace_malloc.c:296)
==30391==by 0x67B4DF1: Perl_safesysmalloc (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.1)
==30391==by 0x6847A05: Perl_bytes_from_utf8 (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.1)
==30391==by 0x678DE6C: Perl_pad_add_name_pvn (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.1)
==30391==by 0x6743D82: Perl_allocmy (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.1)
==30391==by 0x67756E5: Perl_yylex (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.1)
==30391==by 0x6789BC7: Perl_yyparse (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.1)
==30391==by 0x680C541: ??? (in /usr/lib/x86_64-linux-gnu/libperl.so.5.20.1)
==30391==by 0x6819343: Perl_pp_entereval (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.1)
==30391==by 0x67D2E45: Perl_runops_standard (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.1)
==30391==by 0x675C3E4: Perl_call_sv (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.1)
==30391==by 0x45682C: perl_watcher::invoke(char const*, sv*, int) (in
/local/scratch/ianc/tmp/urxvt)
==30391==
==30391== 8 bytes in 1 blocks are possibly lost in loss record 12 of 441
==30391==at 0x4C28C20: malloc (vg_replace_malloc.c:296)
==30391==by 0x4C2AFCF: realloc (vg_replace_malloc.c:692)
==30391==by 0x624488D: g_realloc (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.0)
==30391==by 0x5FCE2A5: type_node_any_new_W (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.0)
==30391==by 0x5FD326C: g_type_register_static (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.0)
==30391==by 0x5FD7B01: g_type_plugin_get_type (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.0)
==30391==by 0x5FAD624: gobject_init_ctor (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.0)
==30391==by 0x400E9F9: call_init.part.0 (dl-init.c:78)
==30391==by 0x400EAE2: call_init (dl-init.c:36)
==30391==by 0x400EAE2: _dl_init (dl-init.c:126)
==30391==by 0x40011C9: ??? (in /lib/x86_64-linux-gnu/ld-2.19.so)
==30391==by 0x1: ???
==30391==by 0xFFF000292: ???
==30391==
==30391== 8 bytes in 1 blocks are possibly lost in loss record 13 of 441
==30391==at 0x4C28C20: malloc (vg_replace_malloc.c:296)
==30391==by 0x4C2AFCF: realloc (vg_replace_malloc.c:692)
==30391==by 0x624488D: g_realloc (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.0)
==30391==by 0x5FCE2A5: type_node_any_new_W (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.0)
==30391==by 0x5FD326C: g_type_register_static (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.0)
==30391==by 0x5FAF731: g_boxed_type_register_static (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.0)
==30391==by 0x5FAF8ED: g_value_array_get_type (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.0)
==30391==by 0x5FC05E4: _g_param_spec_types_init (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.0)
==30391==by 0x5FAD64A: gobject_init_ctor (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4200.0)
==30391==by 0x400E9F9: call_init.part.0 (dl-init.c:78)
==30391==by 0x400EAE2: call_init (dl-init.c:36)
==30391==by 0x400EAE2: _dl_init (dl-init.c:126)
==30391==by 0x40011C9: ??? (in /lib/x86_64-linux-gnu/ld-2.19.so)
==30391==
==30391== 8 bytes in 1 blocks are possibly lost in loss record 14 of 441
==30391==at 0x4C28C20: malloc (vg_replace_malloc.c:296)
==30391==by 0x4C2AFCF: realloc (vg_replace_malloc.c:692)
==30391==