Re: [Mesa-dev] [PATCH] mesa: don't attempt to unlock an unlocked debug state mutex
On Tue, Dec 20, 2016 at 11:52:26AM -0800, Kenneth Graunke wrote: > On Tuesday, December 20, 2016 12:08:06 PM PST Jonathan Gray wrote: > > Can someone push this to master? > > Pushed: > > To ssh://git.freedesktop.org/git/mesa/mesa >ab8ea1b..62b8bcd master -> master > > Have you thought about applying for commit access? Thanks, I'll look into that in future. I assume the part about only accepting rsa ssh keys on https://www.freedesktop.org/wiki/AccountRequests/ is outdated with ecdsa and ed25519 keys also being accepted? Though perhaps that is a question better put to the fdo admins. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: don't attempt to unlock an unlocked debug state mutex
On Tuesday, December 20, 2016 12:08:06 PM PST Jonathan Gray wrote: > Can someone push this to master? Pushed: To ssh://git.freedesktop.org/git/mesa/mesa ab8ea1b..62b8bcd master -> master Have you thought about applying for commit access? signature.asc Description: This is a digitally signed message part. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: don't attempt to unlock an unlocked debug state mutex
Can someone push this to master? On Sun, Dec 11, 2016 at 07:21:36PM +0100, Eduardo Lima Mitev wrote: > Looks good. > > Reviewed-by: Eduardo Lima Mitev > > On 12/11/2016 04:42 PM, Jonathan Gray wrote: > > Commit 929fcee47e46781c57f2a354ce0a013915c033d1 introduced code that > > attempts to unlock an unlocked mutex which is undefined behaviour. > > > > On OpenBSD this leads to an abort: > > > > 0 0x124dadfa96ba in thrkill () at :2 > > 1 0x124dadf3da39 in *_libc_abort () at > > /usr/src/lib/libc/stdlib/abort.c:52 > > 2 0x124d2c1165b5 in *_libpthread_pthread_mutex_unlock > > (mutexp=) > > at /usr/src/lib/librthread/rthread_sync.c:221 > > 3 0x124d279c02e4 in init_attrib_groups (ctx=0x124df0fda000) at > > main/context.c:825 > > 4 _mesa_initialize_context (ctx=ctx@entry=0x124df0fda000, > > api=api@entry=API_OPENGL_CORE, > > visual=visual@entry=0x7f7bdfd0, share_list=share_list@entry=0x0, > > driverFunctions=driverFunctions@entry=0x7f7bda60) at > > main/context.c:1204 > > 5 0x124d27b507ec in st_create_context (api=api@entry=API_OPENGL_CORE, > > pipe=pipe@entry=0x124dc491, visual=visual@entry=0x7f7bdfd0, > > share=share@entry=0x0, options=options@entry=0x7f7be128) > > at state_tracker/st_context.c:545 > > 6 0x124d27b8639f in st_api_create_context (stapi=, > > smapi=0x124d1b608800, attribs=0x7f7be100, error=0x7f7be0fc, > > shared_stctxi=0x0) > > at state_tracker/st_manager.c:669 > > 7 0x124d27cc5b9c in dri_create_context (api=, > > visual=0x124d8a0f8a00, > > cPriv=0x124de473f240, major_version=, > > minor_version=, > > flags=, notify_reset=false, error=0x7f7be2b4, > > sharedContextPrivate=0x0) at dri_context.c:123 > > 8 0x124d27cc5029 in driCreateContextAttribs (screen=0x124d8a0f8400, > > api=, config=0x124d8a0f8a00, shared=, > > num_attribs=, attribs=, > > error=0x7f7be2b4, > > data=0x124d77814a00) at dri_util.c:448 > > 9 0x124d8e109b00 in drisw_create_context_attribs (base=0x124df3e08700, > > config_base=0x124d7a0e7300, shareList=, > > num_attribs=, > > attribs=, error=0x7f7be2b4) at drisw_glx.c:476 > > 10 0x124d8e104b4a in glXCreateContextAttribsARB (dpy=0x124d533f, > > config=0x124d7a0e7300, share_context=0x0, direct=1, > > attrib_list=0x7f7be300) > > at create_context.c:78 > > > > Signed-off-by: Jonathan Gray > > --- > > src/mesa/main/debug_output.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/src/mesa/main/debug_output.c b/src/mesa/main/debug_output.c > > index 48dbbb3..bc933db 100644 > > --- a/src/mesa/main/debug_output.c > > +++ b/src/mesa/main/debug_output.c > > @@ -1282,14 +1282,13 @@ _mesa_init_debug_output(struct gl_context *ctx) > > */ > >struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); > >if (!debug) { > > - goto done; > > + return; > >} > >debug->DebugOutput = GL_TRUE; > >debug->LogToStderr = GL_TRUE; > >ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT; > > + _mesa_unlock_debug_state(ctx); > > } > > -done: > > - _mesa_unlock_debug_state(ctx); > > } > > > > > > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: don't attempt to unlock an unlocked debug state mutex
Previously there was no _mesa_unlock_debug_state() call at all, one is still retained here for the case where _mesa_lock_debug_state() is called and did not return NULL (which is documented as being unlocked). On Mon, Dec 12, 2016 at 11:40:32AM +1100, Edward O'Callaghan wrote: > Hold up.. > > Does this reintroduce the hang in glsl-fs-loop piglit test with > MESA_DEBUG=context though? Was that tested? I'm interested to know how > this got so muddled up in the first place. > > Kind Regards, > Edward. > > On 12/12/2016 05:21 AM, Eduardo Lima Mitev wrote: > > Looks good. > > > > Reviewed-by: Eduardo Lima Mitev > > > > On 12/11/2016 04:42 PM, Jonathan Gray wrote: > >> Commit 929fcee47e46781c57f2a354ce0a013915c033d1 introduced code that > >> attempts to unlock an unlocked mutex which is undefined behaviour. > >> > >> On OpenBSD this leads to an abort: > >> > >> 0 0x124dadfa96ba in thrkill () at :2 > >> 1 0x124dadf3da39 in *_libc_abort () at > >> /usr/src/lib/libc/stdlib/abort.c:52 > >> 2 0x124d2c1165b5 in *_libpthread_pthread_mutex_unlock > >> (mutexp=) > >> at /usr/src/lib/librthread/rthread_sync.c:221 > >> 3 0x124d279c02e4 in init_attrib_groups (ctx=0x124df0fda000) at > >> main/context.c:825 > >> 4 _mesa_initialize_context (ctx=ctx@entry=0x124df0fda000, > >> api=api@entry=API_OPENGL_CORE, > >> visual=visual@entry=0x7f7bdfd0, share_list=share_list@entry=0x0, > >> driverFunctions=driverFunctions@entry=0x7f7bda60) at > >> main/context.c:1204 > >> 5 0x124d27b507ec in st_create_context (api=api@entry=API_OPENGL_CORE, > >> pipe=pipe@entry=0x124dc491, visual=visual@entry=0x7f7bdfd0, > >> share=share@entry=0x0, options=options@entry=0x7f7be128) > >> at state_tracker/st_context.c:545 > >> 6 0x124d27b8639f in st_api_create_context (stapi=, > >> smapi=0x124d1b608800, attribs=0x7f7be100, error=0x7f7be0fc, > >> shared_stctxi=0x0) > >> at state_tracker/st_manager.c:669 > >> 7 0x124d27cc5b9c in dri_create_context (api=, > >> visual=0x124d8a0f8a00, > >> cPriv=0x124de473f240, major_version=, > >> minor_version=, > >> flags=, notify_reset=false, error=0x7f7be2b4, > >> sharedContextPrivate=0x0) at dri_context.c:123 > >> 8 0x124d27cc5029 in driCreateContextAttribs (screen=0x124d8a0f8400, > >> api=, config=0x124d8a0f8a00, shared=, > >> num_attribs=, attribs=, > >> error=0x7f7be2b4, > >> data=0x124d77814a00) at dri_util.c:448 > >> 9 0x124d8e109b00 in drisw_create_context_attribs (base=0x124df3e08700, > >> config_base=0x124d7a0e7300, shareList=, > >> num_attribs=, > >> attribs=, error=0x7f7be2b4) at drisw_glx.c:476 > >> 10 0x124d8e104b4a in glXCreateContextAttribsARB (dpy=0x124d533f, > >> config=0x124d7a0e7300, share_context=0x0, direct=1, > >> attrib_list=0x7f7be300) > >> at create_context.c:78 > >> > >> Signed-off-by: Jonathan Gray > >> --- > >> src/mesa/main/debug_output.c | 5 ++--- > >> 1 file changed, 2 insertions(+), 3 deletions(-) > >> > >> diff --git a/src/mesa/main/debug_output.c b/src/mesa/main/debug_output.c > >> index 48dbbb3..bc933db 100644 > >> --- a/src/mesa/main/debug_output.c > >> +++ b/src/mesa/main/debug_output.c > >> @@ -1282,14 +1282,13 @@ _mesa_init_debug_output(struct gl_context *ctx) > >> */ > >>struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); > >>if (!debug) { > >> - goto done; > >> + return; > >>} > >>debug->DebugOutput = GL_TRUE; > >>debug->LogToStderr = GL_TRUE; > >>ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT; > >> + _mesa_unlock_debug_state(ctx); > >> } > >> -done: > >> - _mesa_unlock_debug_state(ctx); > >> } > >> > >> > >> > > > > ___ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: don't attempt to unlock an unlocked debug state mutex
Hold up.. Does this reintroduce the hang in glsl-fs-loop piglit test with MESA_DEBUG=context though? Was that tested? I'm interested to know how this got so muddled up in the first place. Kind Regards, Edward. On 12/12/2016 05:21 AM, Eduardo Lima Mitev wrote: > Looks good. > > Reviewed-by: Eduardo Lima Mitev > > On 12/11/2016 04:42 PM, Jonathan Gray wrote: >> Commit 929fcee47e46781c57f2a354ce0a013915c033d1 introduced code that >> attempts to unlock an unlocked mutex which is undefined behaviour. >> >> On OpenBSD this leads to an abort: >> >> 0 0x124dadfa96ba in thrkill () at :2 >> 1 0x124dadf3da39 in *_libc_abort () at >> /usr/src/lib/libc/stdlib/abort.c:52 >> 2 0x124d2c1165b5 in *_libpthread_pthread_mutex_unlock >> (mutexp=) >> at /usr/src/lib/librthread/rthread_sync.c:221 >> 3 0x124d279c02e4 in init_attrib_groups (ctx=0x124df0fda000) at >> main/context.c:825 >> 4 _mesa_initialize_context (ctx=ctx@entry=0x124df0fda000, >> api=api@entry=API_OPENGL_CORE, >> visual=visual@entry=0x7f7bdfd0, share_list=share_list@entry=0x0, >> driverFunctions=driverFunctions@entry=0x7f7bda60) at >> main/context.c:1204 >> 5 0x124d27b507ec in st_create_context (api=api@entry=API_OPENGL_CORE, >> pipe=pipe@entry=0x124dc491, visual=visual@entry=0x7f7bdfd0, >> share=share@entry=0x0, options=options@entry=0x7f7be128) >> at state_tracker/st_context.c:545 >> 6 0x124d27b8639f in st_api_create_context (stapi=, >> smapi=0x124d1b608800, attribs=0x7f7be100, error=0x7f7be0fc, >> shared_stctxi=0x0) >> at state_tracker/st_manager.c:669 >> 7 0x124d27cc5b9c in dri_create_context (api=, >> visual=0x124d8a0f8a00, >> cPriv=0x124de473f240, major_version=, >> minor_version=, >> flags=, notify_reset=false, error=0x7f7be2b4, >> sharedContextPrivate=0x0) at dri_context.c:123 >> 8 0x124d27cc5029 in driCreateContextAttribs (screen=0x124d8a0f8400, >> api=, config=0x124d8a0f8a00, shared=, >> num_attribs=, attribs=, >> error=0x7f7be2b4, >> data=0x124d77814a00) at dri_util.c:448 >> 9 0x124d8e109b00 in drisw_create_context_attribs (base=0x124df3e08700, >> config_base=0x124d7a0e7300, shareList=, >> num_attribs=, >> attribs=, error=0x7f7be2b4) at drisw_glx.c:476 >> 10 0x124d8e104b4a in glXCreateContextAttribsARB (dpy=0x124d533f, >> config=0x124d7a0e7300, share_context=0x0, direct=1, >> attrib_list=0x7f7be300) >> at create_context.c:78 >> >> Signed-off-by: Jonathan Gray >> --- >> src/mesa/main/debug_output.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/src/mesa/main/debug_output.c b/src/mesa/main/debug_output.c >> index 48dbbb3..bc933db 100644 >> --- a/src/mesa/main/debug_output.c >> +++ b/src/mesa/main/debug_output.c >> @@ -1282,14 +1282,13 @@ _mesa_init_debug_output(struct gl_context *ctx) >> */ >>struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); >>if (!debug) { >> - goto done; >> + return; >>} >>debug->DebugOutput = GL_TRUE; >>debug->LogToStderr = GL_TRUE; >>ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT; >> + _mesa_unlock_debug_state(ctx); >> } >> -done: >> - _mesa_unlock_debug_state(ctx); >> } >> >> >> > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: don't attempt to unlock an unlocked debug state mutex
Looks good. Reviewed-by: Eduardo Lima Mitev On 12/11/2016 04:42 PM, Jonathan Gray wrote: > Commit 929fcee47e46781c57f2a354ce0a013915c033d1 introduced code that > attempts to unlock an unlocked mutex which is undefined behaviour. > > On OpenBSD this leads to an abort: > > 0 0x124dadfa96ba in thrkill () at :2 > 1 0x124dadf3da39 in *_libc_abort () at > /usr/src/lib/libc/stdlib/abort.c:52 > 2 0x124d2c1165b5 in *_libpthread_pthread_mutex_unlock (mutexp= out>) > at /usr/src/lib/librthread/rthread_sync.c:221 > 3 0x124d279c02e4 in init_attrib_groups (ctx=0x124df0fda000) at > main/context.c:825 > 4 _mesa_initialize_context (ctx=ctx@entry=0x124df0fda000, > api=api@entry=API_OPENGL_CORE, > visual=visual@entry=0x7f7bdfd0, share_list=share_list@entry=0x0, > driverFunctions=driverFunctions@entry=0x7f7bda60) at > main/context.c:1204 > 5 0x124d27b507ec in st_create_context (api=api@entry=API_OPENGL_CORE, > pipe=pipe@entry=0x124dc491, visual=visual@entry=0x7f7bdfd0, > share=share@entry=0x0, options=options@entry=0x7f7be128) > at state_tracker/st_context.c:545 > 6 0x124d27b8639f in st_api_create_context (stapi=, > smapi=0x124d1b608800, attribs=0x7f7be100, error=0x7f7be0fc, > shared_stctxi=0x0) > at state_tracker/st_manager.c:669 > 7 0x124d27cc5b9c in dri_create_context (api=, > visual=0x124d8a0f8a00, > cPriv=0x124de473f240, major_version=, > minor_version=, > flags=, notify_reset=false, error=0x7f7be2b4, > sharedContextPrivate=0x0) at dri_context.c:123 > 8 0x124d27cc5029 in driCreateContextAttribs (screen=0x124d8a0f8400, > api=, config=0x124d8a0f8a00, shared=, > num_attribs=, attribs=, > error=0x7f7be2b4, > data=0x124d77814a00) at dri_util.c:448 > 9 0x124d8e109b00 in drisw_create_context_attribs (base=0x124df3e08700, > config_base=0x124d7a0e7300, shareList=, > num_attribs=, > attribs=, error=0x7f7be2b4) at drisw_glx.c:476 > 10 0x124d8e104b4a in glXCreateContextAttribsARB (dpy=0x124d533f, > config=0x124d7a0e7300, share_context=0x0, direct=1, > attrib_list=0x7f7be300) > at create_context.c:78 > > Signed-off-by: Jonathan Gray > --- > src/mesa/main/debug_output.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/src/mesa/main/debug_output.c b/src/mesa/main/debug_output.c > index 48dbbb3..bc933db 100644 > --- a/src/mesa/main/debug_output.c > +++ b/src/mesa/main/debug_output.c > @@ -1282,14 +1282,13 @@ _mesa_init_debug_output(struct gl_context *ctx) > */ >struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); >if (!debug) { > - goto done; > + return; >} >debug->DebugOutput = GL_TRUE; >debug->LogToStderr = GL_TRUE; >ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT; > + _mesa_unlock_debug_state(ctx); > } > -done: > - _mesa_unlock_debug_state(ctx); > } > > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] mesa: don't attempt to unlock an unlocked debug state mutex
Commit 929fcee47e46781c57f2a354ce0a013915c033d1 introduced code that attempts to unlock an unlocked mutex which is undefined behaviour. On OpenBSD this leads to an abort: 0 0x124dadfa96ba in thrkill () at :2 1 0x124dadf3da39 in *_libc_abort () at /usr/src/lib/libc/stdlib/abort.c:52 2 0x124d2c1165b5 in *_libpthread_pthread_mutex_unlock (mutexp=) at /usr/src/lib/librthread/rthread_sync.c:221 3 0x124d279c02e4 in init_attrib_groups (ctx=0x124df0fda000) at main/context.c:825 4 _mesa_initialize_context (ctx=ctx@entry=0x124df0fda000, api=api@entry=API_OPENGL_CORE, visual=visual@entry=0x7f7bdfd0, share_list=share_list@entry=0x0, driverFunctions=driverFunctions@entry=0x7f7bda60) at main/context.c:1204 5 0x124d27b507ec in st_create_context (api=api@entry=API_OPENGL_CORE, pipe=pipe@entry=0x124dc491, visual=visual@entry=0x7f7bdfd0, share=share@entry=0x0, options=options@entry=0x7f7be128) at state_tracker/st_context.c:545 6 0x124d27b8639f in st_api_create_context (stapi=, smapi=0x124d1b608800, attribs=0x7f7be100, error=0x7f7be0fc, shared_stctxi=0x0) at state_tracker/st_manager.c:669 7 0x124d27cc5b9c in dri_create_context (api=, visual=0x124d8a0f8a00, cPriv=0x124de473f240, major_version=, minor_version=, flags=, notify_reset=false, error=0x7f7be2b4, sharedContextPrivate=0x0) at dri_context.c:123 8 0x124d27cc5029 in driCreateContextAttribs (screen=0x124d8a0f8400, api=, config=0x124d8a0f8a00, shared=, num_attribs=, attribs=, error=0x7f7be2b4, data=0x124d77814a00) at dri_util.c:448 9 0x124d8e109b00 in drisw_create_context_attribs (base=0x124df3e08700, config_base=0x124d7a0e7300, shareList=, num_attribs=, attribs=, error=0x7f7be2b4) at drisw_glx.c:476 10 0x124d8e104b4a in glXCreateContextAttribsARB (dpy=0x124d533f, config=0x124d7a0e7300, share_context=0x0, direct=1, attrib_list=0x7f7be300) at create_context.c:78 Signed-off-by: Jonathan Gray --- src/mesa/main/debug_output.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/debug_output.c b/src/mesa/main/debug_output.c index 48dbbb3..bc933db 100644 --- a/src/mesa/main/debug_output.c +++ b/src/mesa/main/debug_output.c @@ -1282,14 +1282,13 @@ _mesa_init_debug_output(struct gl_context *ctx) */ struct gl_debug_state *debug = _mesa_lock_debug_state(ctx); if (!debug) { - goto done; + return; } debug->DebugOutput = GL_TRUE; debug->LogToStderr = GL_TRUE; ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_DEBUG_BIT; + _mesa_unlock_debug_state(ctx); } -done: - _mesa_unlock_debug_state(ctx); } -- 2.10.2 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev