Re: [Mesa-dev] [PATCH 8/9] Revert "radeonsi: fix potential use-after-free of debug callbacks"

2018-04-24 Thread Marek Olšák
I just sent a patch that fixes the deadlock.

Marek

On Tue, Apr 24, 2018 at 4:40 PM, Marek Olšák  wrote:

> On Wed, Apr 18, 2018 at 6:11 AM, Nicolai Hähnle 
> wrote:
>
>> How can this possibly deadlock? Is this during process exit, like in the
>> case where we got a deadlock when LLVM called abort()?
>>
>
> No. It deadlocks at the start. All threads are waiting on the barrier. The
> barrier should unblock all threads, but it doesn't.
>
> Marek
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 8/9] Revert "radeonsi: fix potential use-after-free of debug callbacks"

2018-04-24 Thread Marek Olšák
On Wed, Apr 18, 2018 at 6:11 AM, Nicolai Hähnle  wrote:

> How can this possibly deadlock? Is this during process exit, like in the
> case where we got a deadlock when LLVM called abort()?
>

No. It deadlocks at the start. All threads are waiting on the barrier. The
barrier should unblock all threads, but it doesn't.

Marek
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 8/9] Revert "radeonsi: fix potential use-after-free of debug callbacks"

2018-04-18 Thread Nicolai Hähnle
How can this possibly deadlock? Is this during process exit, like in the 
case where we got a deadlock when LLVM called abort()?


The rest of the series is

Reviewed-by: Nicolai Hähnle 


On 17.04.2018 02:52, Marek Olšák wrote:

From: Marek Olšák 

This reverts commit b650fc09c3a35ca624aad5fe4b5c34867708f116.

There is a 100%-reproducible deadlock if I increase the number of compiler
queues.

Also:
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105379

Cc: 18.0 
---
  src/gallium/drivers/radeonsi/si_pipe.c | 4 
  1 file changed, 4 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c 
b/src/gallium/drivers/radeonsi/si_pipe.c
index 490a090da87..f1f1e3ad890 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -353,24 +353,20 @@ static void si_emit_string_marker(struct pipe_context 
*ctx,
dd_parse_apitrace_marker(string, len, >apitrace_call_number);
  
  	if (sctx->log)

u_log_printf(sctx->log, "\nString marker: %*s\n", len, string);
  }
  
  static void si_set_debug_callback(struct pipe_context *ctx,

  const struct pipe_debug_callback *cb)
  {
struct si_context *sctx = (struct si_context *)ctx;
-   struct si_screen *screen = sctx->screen;
-
-   util_queue_finish(>shader_compiler_queue);
-   util_queue_finish(>shader_compiler_queue_low_priority);
  
  	if (cb)

sctx->debug = *cb;
else
memset(>debug, 0, sizeof(sctx->debug));
  }
  
  static void si_set_log_context(struct pipe_context *ctx,

   struct u_log_context *log)
  {




--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 8/9] Revert "radeonsi: fix potential use-after-free of debug callbacks"

2018-04-16 Thread Marek Olšák
From: Marek Olšák 

This reverts commit b650fc09c3a35ca624aad5fe4b5c34867708f116.

There is a 100%-reproducible deadlock if I increase the number of compiler
queues.

Also:
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105379

Cc: 18.0 
---
 src/gallium/drivers/radeonsi/si_pipe.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_pipe.c 
b/src/gallium/drivers/radeonsi/si_pipe.c
index 490a090da87..f1f1e3ad890 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -353,24 +353,20 @@ static void si_emit_string_marker(struct pipe_context 
*ctx,
dd_parse_apitrace_marker(string, len, >apitrace_call_number);
 
if (sctx->log)
u_log_printf(sctx->log, "\nString marker: %*s\n", len, string);
 }
 
 static void si_set_debug_callback(struct pipe_context *ctx,
  const struct pipe_debug_callback *cb)
 {
struct si_context *sctx = (struct si_context *)ctx;
-   struct si_screen *screen = sctx->screen;
-
-   util_queue_finish(>shader_compiler_queue);
-   util_queue_finish(>shader_compiler_queue_low_priority);
 
if (cb)
sctx->debug = *cb;
else
memset(>debug, 0, sizeof(sctx->debug));
 }
 
 static void si_set_log_context(struct pipe_context *ctx,
   struct u_log_context *log)
 {
-- 
2.17.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev