[pulseaudio-tickets] [PulseAudio] #351: module-rtp-recv.c segfaults

PulseAudio trac-noreply at tango.0pointer.de
Wed Feb 4 10:35:21 PST 2009


#351: module-rtp-recv.c segfaults
---------------------------+------------------------------------------------
  Reporter:  Achim         |       Owner:  lennart
      Type:  defect        |      Status:  closed 
  Priority:  normal        |   Milestone:         
 Component:  module-rtp-*  |    Severity:  normal 
Resolution:  worksforme    |    Keywords:         
---------------------------+------------------------------------------------
Changes (by erich):

  * status:  reopened => closed
  * resolution:  => worksforme

Comment:

 This is from 2 emails to the "pulseaudio-discuss" email list, reporting of
 problem and then the patch to resolve it:

   NOTE: I apologize for the detective-y nature of this, for some reason
   gdb did not want to cooperate and let me debug the pulseaudio server.

 Err, hand-determined backtrace:
   --  There is a "Updating sample rate" message in the log, then a
 segfault
       at IP 0, right inside the call "pa_resampler_set_input_rate".

   --  I added an assert to the resampler inside
 "src/pulsecore/resampler.c",
       i.e.:

         pa_assert(r->impl_update_rates);

   ...and got the following entry in the debug log on the next run (I
     ignored the first few large deviations, since it seems to bounce
 around
     a lot!):

    Feb  2 17:52:21 mythtv3 pulseaudio[8409]: module-rtp-recv.c: Updating
 sample
 rate
    Feb  2 17:52:21 mythtv3 pulseaudio[8409]: module-rtp-recv.c: Write
 index devi
 ates by 479.95 ms, expected 500.00 ms
    Feb  2 17:52:21 mythtv3 pulseaudio[8409]: resampler.c: Assertion
 'r->impl_upd
 ate_rates' failed at pulsecore/resampler.c:338, function
 pa_resampler_set_input_
 rate(). Aborting.

 So, in the call to "pa_resampler_set_input_rate", at least some of the
 data structures are uninitialized.

 The problem is in the sink connection being made from "module-rtp-recv.c",
 the "PA_SINK_INPUT_VARIABLE_RATE" flag should be passed into
 "pa_sink_input_new", but is not there.

 Made the change and tested it, fixes the problem.  Checked and head-of-
 tree off of the pulseaudio.org source browsing link does not have this
 fix either.

 One-liner patch attached.

 Not sure what the etiquitte is about resolving bugs, please feel free to
 point out that I shouldn't change the bug states to "worksforme".  I'll
 do the Right Thing next time.

-- 
Ticket URL: <http://www.pulseaudio.org/ticket/351#comment:13>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server


More information about the pulseaudio-bugs mailing list