Browse Source

Ignore a known race which does not pose problem in practice

Samuel Thibault 13 years ago
parent
commit
16471e94e8
2 changed files with 16 additions and 1 deletions
  1. 4 0
      src/core/dependencies/tags.c
  2. 12 1
      tools/valgrind/starpu.suppr

+ 4 - 0
src/core/dependencies/tags.c

@@ -128,6 +128,10 @@ void _starpu_tag_clear(void)
 {
 	_STARPU_PTHREAD_RWLOCK_WRLOCK(&tag_global_rwlock);
 
+	/* XXX: _starpu_tag_free takes the tag spinlocks while we are keeping
+	 * the global rwlock. This contradicts the lock order of
+	 * starpu_tag_wait_array. Should not be a problem in practice since
+	 * _starpu_tag_clear is called at shutdown only. */
 	_starpu_htbl_clear_tags(&tag_htbl, 0, _starpu_tag_free);
 
 	_STARPU_PTHREAD_RWLOCK_UNLOCK(&tag_global_rwlock);

+ 12 - 1
tools/valgrind/starpu.suppr

@@ -2,7 +2,7 @@
    config.running is not racy from starpu_shutdown
    Helgrind:Race
    fun:starpu_shutdown
-   fun:main
+   ...
 }
 
 {
@@ -25,3 +25,14 @@
    fun:_starpu_msi_cache_miss
    ...
 }
+
+{
+   known race, but not problematic in practice, see comment in _starpu_tag_clear()
+   Helgrind:Race
+   fun:_starpu_tag_free
+   fun:_starpu_htbl_clear_tags
+   ...
+   fun:_starpu_tag_clear
+   fun:starpu_shutdown
+   ...
+}