virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: David Airlie <airlied@linux.ie>, Jiri Slaby <jslaby@suse.cz>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org
Subject: Re: BUG: 'list_empty(&vgdev->free_vbufs)' is true!
Date: Wed, 09 Nov 2016 09:01:57 +0100	[thread overview]
Message-ID: <1478678517.2078.12.camel@redhat.com> (raw)
In-Reply-To: <20161108223153-mutt-send-email-mst@kernel.org>

On Di, 2016-11-08 at 22:37 +0200, Michael S. Tsirkin wrote:
> On Mon, Nov 07, 2016 at 09:43:24AM +0100, Jiri Slaby wrote:
> > Hi,
> > 
> > I can relatively easily reproduce this bug:

How?

> > BUG: 'list_empty(&vgdev->free_vbufs)' is true!

> The following might be helpful for debugging - if kernel still will
> not stop panicing, we are looking at some kind
> of memory corruption.

Looking carefully through the code I think it isn't impossible to
trigger this, but you need for that:

  (1) command queue full (quite possible),
  (2) cursor queue full too (unlikely), and
  (3) multiple threads trying to submit commands and waiting for free
      space in the command queue (possible with virgl enabled).

Do things improve if you allocate some extra bufs?

 int virtio_gpu_alloc_vbufs(struct virtio_gpu_device *vgdev)
 {
        struct virtio_gpu_vbuffer *vbuf;
-       int i, size, count = 0;
+       int i, size, count = 16;
        void *ptr;
 
        INIT_LIST_HEAD(&vgdev->free_vbufs);

Memory corruption sounds plausible too.

Redirect console to ttyS0 for trouble-shooting, trying to dump the oops
to the display device which triggered the oops in the first place isn't
going to work very well ...

cheers,
  Gerd

  parent reply	other threads:[~2016-11-09  8:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07  8:43 BUG: 'list_empty(&vgdev->free_vbufs)' is true! Jiri Slaby
2016-11-08 20:37 ` Michael S. Tsirkin
     [not found] ` <20161108223153-mutt-send-email-mst@kernel.org>
2016-11-09  8:01   ` Gerd Hoffmann [this message]
2016-11-11 16:28     ` Jiri Slaby
     [not found]     ` <f006e3a6-51d2-4092-57b6-eea7ff64f58f@suse.cz>
2016-11-15  8:46       ` Gerd Hoffmann
     [not found]       ` <1479199588.32639.16.camel@redhat.com>
2016-11-15  8:55         ` Jiri Slaby
     [not found]         ` <18ae4a55-7c36-b55c-0ce3-03aef0bab1ec@suse.cz>
2016-11-15  9:05           ` Gerd Hoffmann
2016-11-16 13:12       ` Gerd Hoffmann
2016-11-24  2:57         ` virtio gpu sparse warning Michael S. Tsirkin
2016-11-28  7:50           ` Gerd Hoffmann
2016-12-15 13:01         ` BUG: 'list_empty(&vgdev->free_vbufs)' is true! Jiri Slaby
2016-11-11 14:35   ` Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478678517.2078.12.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).