All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [Bug 75279] XCloseDisplay() takes one minute around nouveau_dri.so, freezing Firefox startup
Date: Wed, 05 Mar 2014 20:46:25 +0000	[thread overview]
Message-ID: <bug-75279-8800-ALvMUSShq6@http.bugs.freedesktop.org/> (raw)
In-Reply-To: <bug-75279-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>


[-- Attachment #1.1: Type: text/plain, Size: 1747 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=75279

--- Comment #35 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
(In reply to comment #33)
> The stack to the free() points to line 203 here, while the stack to where
> the free'd data is subsequently used points to line 205 here:
> 
> http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/nouveau/
> nouveau_fence.c?id=ce6dd69697ae62d9336bbd4f5808bc4d75cdcc04#n203
> 
> 
>    if (fence == screen->fence.current)
>       nouveau_fence_next(screen);
> 
>    do {
>       nouveau_fence_update(screen, FALSE);  // <--- free here!
> 
>       if (fence->state == NOUVEAU_FENCE_STATE_SIGNALLED) // <--
> use-after-free
>          return TRUE;
> 
> 
> So it seems like nouveau_fence_update (which was apparently inlined)
> destroys the fence object... do you need to call nouveau_fence_ref() to keep
> it alive?

This code is rather confusing. You have to keep in mind how it's used, which
among other things is from the kick handler. I tried to fix it up with

http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce6dd69697ae62d9336bbd4f5808bc4d75cdcc04

But I guess it was insufficient? I have an odd recollection that I felt like
the stuff in the context destroy was suspect, but I don't remember how. Since
it wasn't directly related to my problem, I left it alone (esp since I was
going under the assumption that it would only be triggered on exit, in which
case it's harder to care). Unfortunately it was a long enough time ago that
I've lost my context on this. I'm guessing that the key here is that there are
multiple contexts and one screen. (Someone should confirm that to be the case.)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2889 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

  parent reply	other threads:[~2014-03-05 20:46 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-75279-8800@http.bugs.freedesktop.org/>
     [not found] ` <bug-75279-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
2014-02-20 23:37   ` [Bug 75279] XCloseDisplay() takes one minute around nouveau_dri.so, freezing Firefox startup bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-20 23:40   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-20 23:48   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-21  0:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-21  0:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-21  0:20   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-21  0:26   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-21  7:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-21  7:36   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-21  7:40   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-21  7:45   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-21  9:58   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-21 13:44   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-22 20:34   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-23 22:12   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-23 22:15   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-23 22:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-23 22:25   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-24  8:19   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-25 14:22   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-25 16:39   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-25 17:17   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-25 18:02   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-01 10:18   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-01 12:17   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-01 12:20   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-01 13:53   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-01 14:38   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-01 15:26   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-05 20:09   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-05 20:10   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-05 20:12   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-05 20:16   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-05 20:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-05 20:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-05 20:46   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ [this message]
2014-03-05 20:51   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-05 20:53   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-05 20:57   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-05 20:59   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-06  3:14   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-06  3:30   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-03-18 19:09   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-04-19 13:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-02-20 20:45 [Bug 75279] New: " bugzilla-daemon
2014-02-20 23:37 ` [Bug 75279] " bugzilla-daemon

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=bug-75279-8800-ALvMUSShq6@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon-cc+yj3umiyqdupfqwhejaq@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.