[mythtv-users] mythbackend leaking file descriptors/sockets?

Udo van den Heuvel udovdh at xs4all.nl
Sun Aug 30 07:48:28 UTC 2009


On 2009-08-30 09:21, Joel wrote:
>> If your backend's memory consumption is not perpetually increasing and
>> causing these slowdowns you may really have another 'leakage' on your
>> hands.
> 
> I do not see a significant increase in memory usage.  Just in file
> descriptors.  mythbackend runs just fine for 42 hours until it hits the
> 1024 fd limit.  Then it fails on anything that tries to open a new one.

Wow!
That's even worse than the memory leak I see.
Luckily you can run debugging tools. Would valgrind help in your case?


In my case the machine is too slow to run mythbackend *and* valgrind so
the bug I see is not being fixed. (yes, go figure)

%CPU %MEM    VSZ   RSS TTY      STAT START   TIME
 8.8  7.5 406932 73388 ?        Ssl  Jul12  66:16
 9.5  8.9 419968 86440 ?        Ssl  Jul12 208:24
 9.7 10.0 430568 97152 ?        Ssl  Jul12 352:41
 9.8 11.2 442716 109300 ?       Ssl  Jul12 498:47
 9.8 12.4 454348 120588 ?       Ssl  Jul12 642:41
 9.9 13.6 465720 132804 ?       Ssl  Jul12 787:34
 9.8 14.4 474128 140428 ?       Ssl  Jul12 929:27
 9.8 15.5 483596 150588 ?       Ssl  Jul12 1067:41
 9.8 16.6 496132 162028 ?       Ssl  Jul12 1213:01
 9.9 18.0 508792 174968 ?       Ssl  Jul12 1363:09
 9.9 19.1 519904 185872 ?       Ssl  Jul12 1507:43
 9.9 20.2 531156 196576 ?       Ssl  Jul12 1654:26
 9.9 21.4 543420 208636 ?       Ssl  Jul12 1801:54
 9.9 22.4 552212 217884 ?       Ssl  Jul12 1939:52
 9.9 23.2 561016 225672 ?       Ssl  Jul12 2075:35
 9.9 24.5 573292 238180 ?       Ssl  Jul12 2221:10
 9.9 25.9 586980 251756 ?       Ssl  Jul12 2370:42
 9.9 27.2 598616 264180 ?       Ssl  Jul12 2517:40
10.0 28.5 611928 276940 ?       Ssl  Jul12 2668:58
10.0 29.3 595772 284880 ?       Ssl  Jul12 2817:10
 9.9 28.7 633624 278868 ?       Ssl  Jul12 2955:12
 9.9 28.8 642948 279992 ?       Ssl  Jul12 3093:19
 9.9 29.5 647676 286624 ?       Ssl  Jul12 3237:22
10.0 29.9 669528 290960 ?       Ssl  Jul12 3390:36
10.0 30.0 682020 291436 ?       Ssl  Jul12 3538:38
10.0 27.9 693508 271320 ?       Ssl  Jul12 3691:24
10.0 28.2 706940 274180 ?       Ssl  Jul12 3846:07
10.0 28.5 715216 276652 ?       Ssl  Jul12 3984:52
10.0 28.8 723620 279748 ?       Ssl  Jul12 4120:59
10.0 29.4 737340 285600 ?       Ssl  Jul12 4268:13
10.0 30.1 750652 292900 ?       Ssl  Jul12 4422:32
10.0 30.6 763824 297348 ?       Ssl  Jul12 4576:37
10.0 31.1 776140 302624 ?       Ssl  Jul12 4729:27
10.1 32.0 788544 310632 ?       Ssl  Jul12 4883:11
10.1 32.2 798108 312792 ?       Ssl  Jul12 5023:18
10.0 32.2 806388 312944 ?       Ssl  Jul12 5162:54
10.0 32.8 820472 318984 ?       Ssl  Jul12 5311:43
10.1 31.1 833268 301840 ?       Ssl  Jul12 5462:41
10.1 31.4 836716 305508 ?       Ssl  Jul12 5614:35
10.1 32.2 857712 313332 ?       Ssl  Jul12 5764:40
10.1 28.5 873696 276856 ?       Ssl  Jul12 5921:53
10.1 28.0 882124 271832 ?       Ssl  Jul12 6064:38
10.1 28.0 890392 272616 ?       Ssl  Jul12 6205:41
10.1 28.3 902788 274720 ?       Ssl  Jul12 6355:56
10.1 28.8 916376 279948 ?       Ssl  Jul12 6512:21
10.1 29.2 929284 284140 ?       Ssl  Jul12 6662:59

The typical graph looks like this:
http://img151.imageshack.us/img151/4247/mythbackendeatsmemory.png


More information about the mythtv-users mailing list