<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-text-flowed" style="font-family: -moz-fixed;
      font-size: 12px;" lang="x-unicode">On 12/02/12 05:49, Tanu
      Kaskinen wrote:
      <br>
      <blockquote type="cite" style="color: #000000;">On Wed, 2012-11-28
        at 02:35 +0100, Henrik /KaarPoSoft wrote:
        <br>
        <blockquote type="cite" style="color: #000000;">
          <br>
          It seems that more apps / libraries depend on
          libpulsecommon-2.1.so
          <br>
          which has now been removed (as 2.99.2 has been installed
          instead).
          <br>
          So, I tried to identify every lib/app dependent on pulseaudio,
          and have
          <br>
          now recompiled+reinstalled:
          <br>
          gnome-shell
          <br>
          alsa-plugins
          <br>
          libcanberra
          <br>
          gst-plugins-good
          <br>
          gnome-control-center
          <br>
          gnome-settings-daemon
          <br>
          gtk-vnc
          <br>
          empathy
          <br>
          <br>
          Now I am <b class="moz-txt-star"><span class="moz-txt-tag">*</span>not<span
              class="moz-txt-tag">*</span></b> able to recreate this
          hang:
          <br>
          open gnome-terminal (as only app on desktop), press backspace,
          close
          <br>
          terminal.
          <br>
          <br>
          However, this seems to hang every time:
          <br>
          open gnome-terminal, press backspace twice to get two beeps.
          <br>
          open firefox, play html5 video on youtube, close firefox.
          <br>
          close gnome-terminal (which is now last app on desktop).
          <br>
          Now the desktop is frozen.
          <br>
          <br>
          The last 40 lines of .xsession-errors:
          <br>
          ----------------------------------------
          <br>
          [0x9e6df4f0] Received opcode <REQUEST>, tag 4294967295
          <br>
          [0x9e6df4f0] Received opcode <REQUEST>, tag 4294967295
          <br>
          [0x9e6df4f0] Received opcode <REQUEST>, tag 4294967295
          <br>
          [0x9e6df4f0] Received opcode <REQUEST>, tag 4294967295
          <br>
          [0x9e6df4f0] Received opcode <REQUEST>, tag 4294967295
          <br>
          [0x9e6df4f0] Received opcode <REQUEST>, tag 4294967295
          <br>
          [0x9e6df4f0] Received opcode <REQUEST>, tag 4294967295
          <br>
          [0xb2406210] Received opcode <SUBSCRIBE_EVENT>, tag
          4294967295
          <br>
          [0x877c6e0] Received opcode <SUBSCRIBE_EVENT>, tag
          4294967295
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 25
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 26
          <br>
          [0xa643cd8] Received opcode <SUBSCRIBE_EVENT>, tag
          4294967295
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 27
          <br>
          [0x877c6e0] Received opcode <SUBSCRIBE_EVENT>, tag
          4294967295
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 28
          <br>
          [0x877c6e0] Received opcode <REPLY>, tag 35
          <br>
          [0x877c6e0] Received opcode <REPLY>, tag 36
          <br>
          [0xa643cd8] Received opcode <SUBSCRIBE_EVENT>, tag
          4294967295
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 29
          <br>
          [0xa643cd8] Received opcode <REPLY>, tag 26
          <br>
          [0xa643cd8] Received opcode <REPLY>, tag 27
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 30
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 31
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 32
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 33
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 34
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 35
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 36
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 37
          <br>
          [0x9e6df4f0] Received opcode <REPLY>, tag 38
          <br>
          [0xb2406210] Received opcode <SUBSCRIBE_EVENT>, tag
          4294967295
          <br>
          [0x877c6e0] Received opcode <SUBSCRIBE_EVENT>, tag
          4294967295
          <br>
          [0x877c6e0] Received opcode <SUBSCRIBE_EVENT>, tag
          4294967295
          <br>
          [0xa643cd8] Received opcode <SUBSCRIBE_EVENT>, tag
          4294967295
          <br>
          [0xa643cd8] Received opcode <SUBSCRIBE_EVENT>, tag
          4294967295
          <br>
          [0xb2406210] Received opcode <ERROR>, tag 9
          <br>
          [0x877c6e0] Received opcode <SUBSCRIBE_EVENT>, tag
          4294967295
          <br>
          [0x877c6e0] Received opcode <SUBSCRIBE_EVENT>, tag
          4294967295
          <br>
          [0x877c6e0] Received opcode <REPLY>, tag 37
          <br>
          [0x877c6e0] Received opcode <REPLY>, tag 38
          <br>
          ----------------------------------------
          <br>
          <br>
          The last 20 lines of syslog matching grep 'Received opcode'
          <br>
          ----------------------------------------
          <br>
          Nov 28 02:05:54 kx8400-5 pulseaudio[2064]: (  52.665|   0.001)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x868dcc8]
          <br>
          Received opcode <GET_PLAYBACK_LATENCY>, tag 27
          <br>
          Nov 28 02:05:54 kx8400-5 pulseaudio[2064]: (  52.675|   0.009)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x8666228]
          <br>
          Received opcode <GET_SINK_INPUT_INFO>, tag 35
          <br>
          Nov 28 02:05:54 kx8400-5 pulseaudio[2064]: (  52.676|   0.001)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x86812c0]
          <br>
          Received opcode <GET_SINK_INPUT_INFO>, tag 26
          <br>
          Nov 28 02:05:54 kx8400-5 pulseaudio[2064]: (  52.677|   0.001)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x868dcc8]
          <br>
          Received opcode <GET_PLAYBACK_LATENCY>, tag 28
          <br>
          Nov 28 02:05:54 kx8400-5 pulseaudio[2064]: (  52.678|   0.001)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x8666228]
          <br>
          Received opcode <GET_SINK_INFO>, tag 36
          <br>
          Nov 28 02:05:54 kx8400-5 pulseaudio[2064]: (  52.694|   0.015)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x868dcc8]
          <br>
          Received opcode <GET_PLAYBACK_LATENCY>, tag 29
          <br>
          Nov 28 02:05:54 kx8400-5 pulseaudio[2064]: (  52.705|   0.011)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x86812c0]
          <br>
          Received opcode <GET_SINK_INFO>, tag 27
          <br>
          Nov 28 02:05:54 kx8400-5 pulseaudio[2064]: (  52.734|   0.029)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x868dcc8]
          <br>
          Received opcode <GET_PLAYBACK_LATENCY>, tag 30
          <br>
          Nov 28 02:05:54 kx8400-5 pulseaudio[2064]: (  52.815|   0.081)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x868dcc8]
          <br>
          Received opcode <GET_PLAYBACK_LATENCY>, tag 31
          <br>
          Nov 28 02:05:54 kx8400-5 pulseaudio[2064]: (  52.976|   0.160)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x868dcc8]
          <br>
          Received opcode <GET_PLAYBACK_LATENCY>, tag 32
          <br>
          Nov 28 02:05:55 kx8400-5 pulseaudio[2064]: (  53.297|   0.320)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x868dcc8]
          <br>
          Received opcode <GET_PLAYBACK_LATENCY>, tag 33
          <br>
          Nov 28 02:05:55 kx8400-5 pulseaudio[2064]: (  53.325|   0.028)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x868dcc8]
          <br>
          Received opcode <GET_PLAYBACK_LATENCY>, tag 34
          <br>
          Nov 28 02:05:55 kx8400-5 pulseaudio[2064]: (  53.327|   0.001)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x868dcc8]
          <br>
          Received opcode <CORK_PLAYBACK_STREAM>, tag 35
          <br>
          Nov 28 02:05:55 kx8400-5 pulseaudio[2064]: (  53.327|   0.000)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x868dcc8]
          <br>
          Received opcode <GET_PLAYBACK_LATENCY>, tag 36
          <br>
          Nov 28 02:05:55 kx8400-5 pulseaudio[2064]: (  53.328|   0.000)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x868dcc8]
          <br>
          Received opcode <GET_PLAYBACK_LATENCY>, tag 37
          <br>
          Nov 28 02:05:55 kx8400-5 pulseaudio[2064]: (  53.328|   0.000)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x868dcc8]
          <br>
          Received opcode <FLUSH_PLAYBACK_STREAM>, tag 38
          <br>
          Nov 28 02:05:55 kx8400-5 pulseaudio[2064]: (  53.328|   0.000)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x868dcc8]
          <br>
          Received opcode <GET_PLAYBACK_LATENCY>, tag 39
          <br>
          Nov 28 02:05:56 kx8400-5 pulseaudio[2064]: (  54.319|   0.052)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x86828d8]
          <br>
          Received opcode <PLAY_SAMPLE>, tag 9
          <br>
          Nov 28 02:06:00 kx8400-5 pulseaudio[2064]: (  58.343|   0.000)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x8666228]
          <br>
          Received opcode <GET_SINK_INFO>, tag 37
          <br>
          Nov 28 02:06:00 kx8400-5 pulseaudio[2064]: (  58.343|   0.000)
          <br>
          [pulseaudio][pulsecore/pdispatch.c:318 pa_pdispatch_run()]
          [0x8666228]
          <br>
          Received opcode <GET_SOURCE_INFO>, tag 38
          <br>
          <br>
          ----------------------------------------
          <br>
          <br>
          So it would seem that tag 39 is received by pulseaudio daemon,
          but the
          <br>
          response not received by the client (presumably gnome-shell)
          <br>
        </blockquote>
        Do you mean the reply to the GET_PLAYBACK_LATENCY message? If
        this is
        <br>
        the exact same code that is hanging in the original backtrace,
        then the
        <br>
        latency message isn't the problem. Also, the latency message
        comes from
        <br>
        a different client than the PLAY_SAMPLE message, so the latency
        message
        <br>
        is probably not from gnome-shell.
        <br>
      </blockquote>
      I concur.
      <br>
      I think that #39 GET_PLAYBACK_LATENCY is from firefox, which was
      closed, hence not receiving the result.
      <br>
      <blockquote type="cite" style="color: #000000;">Assuming that it
        is always the PLAY_SAMPLE message that hangs, then it
        <br>
        looks like the reply is received by the client. The last
        PLAY_SAMPLE
        <br>
        message has tag 9, and xsession-errors shows that some client
        receives
        <br>
        an error reply for tag 9 (an error is expected, because we found
        out
        <br>
        already earlier that there are always two PLAY_SAMPLE messages,
        of which
        <br>
        the latter one fails).
        <br>
      </blockquote>
      I concur.
      <br>
      <blockquote type="cite" style="color: #000000;">The original
        backtrace only has the trace for one thread, the thread
        <br>
        where the libpulse mainloop runs isn't shown. Could you take a
        backtrace
        <br>
        again, this time with "thread apply all bt"? The libpulse thread
        might
        <br>
        be hanging too (which would explain why the main thread is
        hanging,
        <br>
        since the libpulse thread is responsible for waking up the main
        thread).
        <br>
      </blockquote>
      I have changed Xsession to log client messages to syslog.
      <br>
      Unfortunatly they all show up with tag Xsession, not the
      individual client.
      <br>
      <br>
      Anyway, I have attached the relevant part of syslog (pulseaudio
      and Xsession), as well as pulseaudio and gnome-shell backtraces
      for all threads.
      <br>
      <blockquote type="cite" style="color: #000000;">Btw, when it
        hangs, does it hang permanently, needing gnome-shell
        <br>
        restart?
        <br>
      </blockquote>
      Permanently, as in at least 10 minutes.
      <br>
      (I don't wait that long every time, but I did a couple of times,
      and nothing changed within 10-15 minutes).
      <br>
      So yes: Needing restart.
      <br>
      (I usually do a reboot to get a clean slate, but somtimes I just
      restart gdm. Have not tried just gnome.shell restart).
      <br>
      <blockquote type="cite" style="color: #000000;">Lastly, when
        pasting syslog contents, please ensure that the lines
        <br>
        aren't wrapped. It's really hard to read otherwise.
        <br>
      </blockquote>
      My apologies. Will use attachments.
      <br>
      /Henrik
      <br>
      <br>
      Now attaching syslog+backtraces tar+gzipped; previous message was
      rejected; apologies if you receive this twice.<br>
    </div>
    <br>
  </body>
</html>