vlc taking 100% cpu when started in daemon mode with rc control

Bug #104698 reported by bma
0
Affects Status Importance Assigned to Milestone
vlc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: vlc

When vlc is started in daemon mode with the rc interface for control takes 100% of cpu.

Command to reproduce this:
vlc -d -I dummy --extraintf rc --rc-host localhost:5000 --rc-fake-tty

Tags: patch

Related branches

Revision history for this message
bma (bertrand-marquis-deactivatedaccount) wrote :

This bug has been reported as vlc ticket 986:
http://trac.videolan.org/vlc/ticket/986

Revision history for this message
bma (bertrand-marquis-deactivatedaccount) wrote :

I made a patch to fix this (it is attached to this).

It is not very clean but principe is to prevent trying to read or write to stdin/stdout when the fake-tty mode is enabled.

To save cpu on the read thread i did same thing as under windows which make a small sleep before returning that there is nothing
to read. This solve the problem for me.

I tested the path on edgy and feisty x86 32 bits.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vlc - 0.8.6.release.d-0ubuntu5

---------------
vlc (0.8.6.release.d-0ubuntu5) hardy; urgency=low

  * debian/patches/022_no_cpu_consumption.diff: (LP: #104698)
    - Fix CPU consumption when fake-tty mode is enabled
      Thx to bma (No Real Name) for providing the patch

 -- Stephan Hermann <email address hidden> Thu, 06 Mar 2008 21:53:50 +0100

Changed in vlc:
status: New → Fix Released
Revision history for this message
bma (bertrand-marquis-deactivatedaccount) wrote :

You are welcome for the patch.

By the way bma = Bertrand Marquis ;-)

Revision history for this message
Karoly Segesdi (vrm) wrote :

I'd like to express my concerns about the patch.
I think the first half of the patch is an error: it disables the stdout of the rc module.
I've created a perl script that launches vlc with the rc interface module and expects it's initialisation message on stdout.
This patch caused my script to fail.
I think there is no reason to disable output to stdout in the patch as I can't imagine how it could cause 100% cpu usage.
On the other side the messages disabled by the patch can be useful for an application that embeds vlc by executing it with the rc interface module.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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