Re: Libsoup Assertion



Hi,

I think I've fixed it:

When flushing the message queue of a soup-session, the messages have to be unpaused. This is because soup-session-async.c:process_queue_item() wont work with paused messages. So my fix is to unpause each message before canceling.

soup-session.c:


static void
flush_queue (SoupSession *session)
{
	SoupSessionPrivate *priv = SOUP_SESSION_GET_PRIVATE (session);
	SoupMessageQueueItem *item;

	for (item = soup_message_queue_first (priv->queue);
	     item;
	     item = soup_message_queue_next (priv->queue, item)) {
	        soup_session_unpause_message(session, item->msg);
		soup_session_cancel_message (session, item->msg,
					     SOUP_STATUS_CANCELLED);
	}
}


Best, Henry


Am 10.04.2012, 11:56 Uhr, schrieb Henry Högelow <h hoegelow raumfeld com>:

Hi,

I am Henry, working as Software Developer for Raumfeld (www.raumfeld.com). We are developing a multi room audio solution.

Currently, users tell us that audio streams are suddenly stopping and the system became less stable in general. We could see that all the users reporting such problems had the same critical libsoup message in their logs:

soup_message_queue_destroy: assertion `queue->head == NULL' failed

I found out, that the problem arises in soup_session_abort. The method tries to flush the message queue by canceling each of the pending messages. Obviously the developer assumed, that canceling a message will indirectly remove it from the queue. This is not always true. I could nail down a reproduction scenario to this command line call:

gst-launch-0.10 souphttpsrc location="http://www.google.com/"; ! fakesink

It doesn't matter there is no audio stream at the given location. The assertion is triggered when the gstreamer gives up the attempt to play the stream and destroys the SoupSession.

I am not sure, the assertion and our problems are related, but at least an assertion is normally a good start point to find out.

Best, Henry




--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]