[Spice-devel] server bug: Spice-ERROR **: snd_worker.c:434:snd_receive: assertion `n' failed

Nahum Shalman nshalman at elys.com
Thu Apr 5 07:05:30 PDT 2012


The price of living on the edge is I find the fun bugs... :)

I have VMs running that have been crashing when someone is watching 
video (I'm pretty sure there's always sound at the same time).
I'm running on code from spice.git at 
8cd92109d42db45fd5b3aa9674b2148550ffe17b

The last thing I get on in the log is:
((null):17981): Spice-ERROR **: snd_worker.c:434:snd_receive: assertion 
`n' failed

Immediate context:
    431      for (;;) {
    432          ssize_t n;
    433          n = channel->recive_data.end - channel->recive_data.now;
    434          spice_assert(n);
    435          n = reds_stream_read(channel->stream, 
channel->recive_data.now, n);
    436          if (n <= 0) {
    437              if (n == 0) {
    438                  snd_disconnect_channel(channel);
    439                  return;
    440              }


I haven't looked into this much further; it doesn't immediately trip 
every time you stream sound, so I'm not sure of the exact trigger.  From 
talking to elmarco on IRC, it seems that the error in the code might be 
immediately obvious to someone who knows what to look for:

9:41 < nahamu> http://fpaste.org/iMPB/
09:41 < nahamu> I tripped over an assert in snd_worker ^^^
09:41 < nahamu> trying to figure out what I should do to isolate it.
09:48 < elmarco> nahamu: you could report a bug, the code looks suspicious
09:49 < elmarco> this line in particular  channel->recive_data.now = 
channel->recive_data.buf + n;
09:51 < nahamu> elmarco: do I need anything else in such a bug report, 
or is it enough to let people know that the
                 VM tripped over the assert?
09:51 < elmarco> if think the code is sufficiently suspicious :)
09:52 < nahamu> elmarco: thanks.  I'll fire off something to the mailing 
list.

Let me know if there's anything I can do to help isolate this further.

-Nahum



More information about the Spice-devel mailing list