mythbackend uses 100% cpu and leaks in memory when upnp is enabled.

Bug #200761 reported by hitme
6
Affects Status Importance Assigned to Milestone
MythTV
Fix Released
Unknown
mythtv (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: mythtv

System Informations:
Hardware:
AMD 2500+
nForce2 Chipset
1GB RAM
OnBoard GF 4MX Card, 128MB Shared
40GB HDD
saa7134 DVB-T TV Card
Software:
mythbuntu 8.04 Hardy, all updates till 10.03.2008 included beside kernel.
kernel 2.6.25-11.15
Mythtv-backend 0.21.0ubuntu2

after a few hours i saw mythbackend been using 100% cpu + 1800MB memory.

i did restart the backend, short cpu was up on 100% after the memory was raising again.

i enabled verbose mode and disabled UPNP, now system is running stable, no memory leak no abnormal cpu usage.

Tags: fixed-0.22

Related branches

Revision history for this message
Mario Limonciello (superm1) wrote : Re: [Bug 200761] [NEW] mythbackend uses 100% cpu and leaks in memory when upnp is enabled.

In verbose mode did you catch what activity was going on keeping it so high?

On Mon, Mar 10, 2008 at 4:27 PM, hitme <email address hidden> wrote:

> Public bug reported:
>
> Binary package hint: mythtv
>
> System Informations:
> Hardware:
> AMD 2500+
> nForce2 Chipset
> 1GB RAM
> OnBoard GF 4MX Card, 128MB Shared
> 40GB HDD
> saa7134 DVB-T TV Card
> Software:
> mythbuntu 8.04 Hardy, all updates till 10.03.2008 included beside kernel.
> kernel 2.6.25-11.15
> Mythtv-backend 0.21.0ubuntu2
>
> after a few hours i saw mythbackend been using 100% cpu + 1800MB memory.
>
> i did restart the backend, short cpu was up on 100% after the memory was
> raising again.
>
> i enabled verbose mode and disabled UPNP, now system is running stable,
> no memory leak no abnormal cpu usage.
>
> ** Affects: mythtv (Ubuntu)
> Importance: Undecided
> Status: New
>
> --
> mythbackend uses 100% cpu and leaks in memory when upnp is enabled.
> https://bugs.launchpad.net/bugs/200761
> You received this bug notification because you are a member of MythTV
> Ubuntu Maintainers, which is subscribed to mythtv in ubuntu.
>

--
Mario Limonciello
<email address hidden>

Revision history for this message
hitme (hitme666) wrote :

in logs i didn'T saw anything abnormal, but i think its was the media loaded windows systems where he was stucking at.

system is stable since disable upnp.

Revision history for this message
Nico (nico-rdo) wrote :

I'm experiencing the same.

Gutsy, PPA backport of 0.21 ubuntu1, 64-bit

--noupnp keeps the memory and cpu usage at bay.

This killed my backend during the night, apport could not even get enough RAM to make a report bigger than 35kB.

Now running the backend with upnp enabled through valgrind as per laga's instructions on IRC.

valgrind --leak-check=full --error-limit=no --show-reachable=yes --log-file=logfile -v -- /usr/bin/mythbackend --daemon --logfile /var/log/mythtv/mythbackend.log --pidfile /var/run/mythtv/mythbackend.pid | tee backend.log

I'll post the logs there when done.

nico

Revision history for this message
Nico (nico-rdo) wrote :

My hardware is:

Intel Core 2 Duo
Intel MB with 965G chipset
1 GB RAM
nVIDIA 7100GS with binary blob driver
Hauppauge Nova-T-500 dual tuner DVB-T
KWorld DVB-S100 DVB-S tuner

Ubuntu gutsy, main, restricted, universe, multiverse, security, updates, backports, medibuntu. Up-to-date
MythTV 0.21 backport from mythbuntu-experimental PPA

Revision history for this message
Nico (nico-rdo) wrote :

I have no UPNP client anywhere on my network.

Revision history for this message
Nico (nico-rdo) wrote :
Changed in mythtv:
status: Unknown → New
Changed in mythtv:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Russell Phillips (ignissport) wrote :

I'm having this problem too. --noupnp appears to fix it.

The backend server is a PIII with 512MB RAM. Within hours, the system runs out of memory and the process is killed:

dmsg output:
[95806.603789] Free swap = 0kB
[95806.603792] Total swap = 1061176kB
[95806.603796] Free swap: 0kB
[95806.624574] 130752 pages of RAM
[95806.624581] 0 pages of HIGHMEM
[95806.624585] 2213 reserved pages
[95806.624589] 848 pages shared
[95806.624592] 0 pages swap cached
[95806.624596] 0 pages dirty
[95806.624599] 0 pages writeback
[95806.624603] 32 pages mapped
[95806.624606] 2297 pages slab
[95806.624609] 1122 pages pagetables
[95806.624616] Out of memory: kill process 5834 (mythbackend) score 426864 or a child

Revision history for this message
hugolp (hugolp2) wrote :

I have the same problem. --noupnp solves the problem. Using -noupnp options i had my backend working for a couple of days without a problem now.

Revision history for this message
laga (laga) wrote :

Hugolp,

can you run valgrind against mythbackend:

valgrind --leak-check=full --error-limit=no --show-reachable=yes --log-file=logfile -v -- /usr/bin/mythbackend --daemon --logfile /var/log/mythtv/mythbackend.log --pidfile /var/run/mythtv/mythbackend.pid | tee backend.log

Changed in mythtv:
status: New → Fix Released
Revision history for this message
MarcRandolph (mrand) wrote :

This has been fixed upstream on trunk and will therefore be included in the upcoming 0.22 release (as well as Karmic / 9.10).

We have builds of mythtv 0.22 available on a PPA to test. Please follow the directions at http://mythbuntu.org/auto-builds to enable them.

WARNING: If you intend to go back to 0.21, you will need to back up your database before upgrading.

Changed in mythtv (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
MarcRandolph (mrand) wrote :

Until it is truely released, fix committed is probably more accurate.

tags: added: fixed-0.22
Changed in mythtv (Ubuntu):
status: Fix Released → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythtv - 0.22.0~trunk21556-0ubuntu1

---------------
mythtv (0.22.0~trunk21556-0ubuntu1) karmic; urgency=low

  * New upstream checkout. (r21556)
    - Fixes memory leaks with UPNP enabled. (LP: #200761)
  * debian/control:
    - Build depend on nvidia 185 or nvidia 180.

 -- Mario Limonciello <email address hidden> Sun, 23 Aug 2009 12:18:48 -0500

Changed in mythtv (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.