[all-commits] [llvm/llvm-project] dd8723: [OpenMP] Fix shutdown hang/race bug

Jonathan Peyton via All-commits all-commits at lists.llvm.org
Wed Nov 11 11:48:32 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: dd8723d348c9e6182155233a62769024dd345c6b
      https://github.com/llvm/llvm-project/commit/dd8723d348c9e6182155233a62769024dd345c6b
  Author: Peyton, Jonathan L <jonathan.l.peyton at intel.com>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M openmp/runtime/src/kmp_runtime.cpp

  Log Message:
  -----------
  [OpenMP] Fix shutdown hang/race bug

The deadlock/race happens when primary thread gets initz lock and tries to join
the worker thread which waits for the same lock in TLS key destructor.
The patch removes the lock and the code of setting TLS value which needed
the lock. Also removed setting TLS from __kmp_unregister_root_current_thread.

Differential Revision: https://reviews.llvm.org/D90647




More information about the All-commits mailing list