Mixxx looses realtime priority after switching audio Buffer

Bug #1196449 reported by Daniel Schürmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Daniel Schürmann

Bug Description

This was tested with ubuntu precise amd64 and Mixxx master 3499.

Test:

start Mixxx

$ ps -Leo pid,tid,class,rtprio,priority,stat,comm,wchan | grep mixxx
 3966 3966 TS - 20 Sl mixxx poll_schedule_timeout
 3966 3970 TS - 20 Sl mixxx futex_wait_queue_me
 3966 3971 TS - 20 Sl mixxx futex_wait_queue_me
 3966 3977 TS - 20 Sl mixxx futex_wait_queue_me
 3966 3978 TS - 20 Sl mixxx futex_wait_queue_me
 3966 3979 IDL 0 20 Sl mixxx futex_wait_queue_me
 3966 3980 TS - 20 Sl mixxx poll_schedule_timeout
 3966 3981 FF 82 -83 Sl mixxx poll_schedule_timeout

change Audio Buffer Size

$ ps -Leo pid,tid,class,rtprio,priority,stat,comm,wchan | grep mixxx
 3966 3966 TS - 20 Sl mixxx poll_schedule_timeout
 3966 3970 TS - 20 Sl mixxx futex_wait_queue_me
 3966 3971 TS - 20 Sl mixxx futex_wait_queue_me
 3966 3977 TS - 20 Sl mixxx futex_wait_queue_me
 3966 3978 TS - 20 Sl mixxx futex_wait_queue_me
 3966 3979 IDL 0 20 Sl mixxx futex_wait_queue_me
 3966 3980 TS - 20 Sl mixxx poll_schedule_timeout
 3966 3996 FF 1 -2 Sl mixxx poll_schedule_timeout

Thread 3981 with rtprio of 82 is gone and a new thread with rtprio 1 is issued.

$ cat /etc/security/limits.d/audio.conf
# Provided by the jackd package.
#
# Changes to this file will be preserved.
#
# If you want to enable/disable realtime permissions, run
#
# dpkg-reconfigure -p high jackd

@audio - rtprio 95
@audio - memlock unlimited
@audio - nice -19

By the way: I have noticed that changes limits requires a system restart.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote : Re: [Bug 1196449] [NEW] Mixxx looses realtime priority after switching audio Buffer

Hm! Good catch. We should clear SoundDevicePortAudio::m_bSetThreadPriority
on close().

On Mon, Jul 1, 2013 at 4:50 AM, Daniel Schürmann <<email address hidden>
> wrote:

> Public bug reported:
>
> This was tested with ubuntu precise amd64 and Mixxx master 3499.
>
> Test:
>
> start Mixxx
>
> $ ps -Leo pid,tid,class,rtprio,priority,stat,comm,wchan | grep mixxx
> 3966 3966 TS - 20 Sl mixxx poll_schedule_timeout
> 3966 3970 TS - 20 Sl mixxx futex_wait_queue_me
> 3966 3971 TS - 20 Sl mixxx futex_wait_queue_me
> 3966 3977 TS - 20 Sl mixxx futex_wait_queue_me
> 3966 3978 TS - 20 Sl mixxx futex_wait_queue_me
> 3966 3979 IDL 0 20 Sl mixxx futex_wait_queue_me
> 3966 3980 TS - 20 Sl mixxx poll_schedule_timeout
> 3966 3981 FF 82 -83 Sl mixxx poll_schedule_timeout
>
> change Audio Buffer Size
>
> $ ps -Leo pid,tid,class,rtprio,priority,stat,comm,wchan | grep mixxx
> 3966 3966 TS - 20 Sl mixxx poll_schedule_timeout
> 3966 3970 TS - 20 Sl mixxx futex_wait_queue_me
> 3966 3971 TS - 20 Sl mixxx futex_wait_queue_me
> 3966 3977 TS - 20 Sl mixxx futex_wait_queue_me
> 3966 3978 TS - 20 Sl mixxx futex_wait_queue_me
> 3966 3979 IDL 0 20 Sl mixxx futex_wait_queue_me
> 3966 3980 TS - 20 Sl mixxx poll_schedule_timeout
> 3966 3996 FF 1 -2 Sl mixxx poll_schedule_timeout
>
>
> Thread 3981 with rtprio of 82 is gone and a new thread with rtprio 1 is
> issued.
>
>
> $ cat /etc/security/limits.d/audio.conf
> # Provided by the jackd package.
> #
> # Changes to this file will be preserved.
> #
> # If you want to enable/disable realtime permissions, run
> #
> # dpkg-reconfigure -p high jackd
>
> @audio - rtprio 95
> @audio - memlock unlimited
> @audio - nice -19
>
> By the way: I have noticed that changes limits requires a system
> restart.
>
> ** Affects: mixxx
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
> https://bugs.launchpad.net/bugs/1196449
>
> Title:
> Mixxx looses realtime priority after switching audio Buffer
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/1196449/+subscriptions
>

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Thank you for your hint! That was actualy the fix.

Committed to master 44cfe127f7 r3510

Changed in mixxx:
assignee: nobody → Daniel Schürmann (daschuer)
importance: Undecided → Medium
status: New → Confirmed
milestone: none → 1.12.0
Changed in mixxx:
status: Confirmed → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/7087

lock status: Metadata changes locked and limited to project staff
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.