<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<h3>
Ben Gamari pushed to branch wip/tsan-ghc-8.10
at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d0a18f8944786888e77197b41a77c8cfef4964d1">d0a18f89</a></strong>
<div>
<span>by Viktor Dukhovni</span>
<i>at 2020-11-29T21:53:30-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">8.10 - dirty MVAR after mutating TSO queue head

While the original head and tail of the TSO queue may be in the same
generation as the MVAR, interior elements of the queue could be younger
after a GC run and may then be exposed by putMVar operation that updates
the queue head.

Resolves #18919

(cherry picked from commit 699facec0bc8dd7d5b82cc537fbf131b74f5bd2c)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/92c9bed7beabb6278d6bc3b228f3aa55e423e192">92c9bed7</a></strong>
<div>
<span>by Ömer Sinan Ağacan</span>
<i>at 2020-11-29T21:53:30-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix and enable object unloading in GHCi

Fixes #16525 by tracking dependencies between object file symbols and
marking symbol liveness during garbage collection

See Note [Object unloading] in CheckUnload.c for details.

(cherry picked from commit c34a4b98b1f09ea3096d39a839a86f2d7185c796)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2d72607e7b6346ad3e0a7fe39e86ceb8f85e557b">2d72607e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-29T21:53:30-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">gitlab-ci: Add VERBOSE environment variable

And change the make build system's default behavior to V=0, greatly
reducing build log sizes.

(cherry picked from commit 802e9180dd9a9a88c4e8869f0de1048e1edd6343)
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b7a1e0167874a00e673ff9fdb0dfc44c363a5ec0">b7a1e016</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:58-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">SMP.h: Add C11-style atomic operations
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/023e414e2d40b562ca6dfecfb0c340420f38651d">023e414e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:58-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Infrastructure for testing with ThreadSanitizer
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/631e1b83ca8318517c6b75cd7bfa2e695b41e964">631e1b83</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:58-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/CNF: Initialize all bdescrs in group

It seems wise and cheap to ensure that the whole bdescr of all blocks of
a compact group is valid, even if most cases only look at the flags
field.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/111afe5aacf48b8fe1c7c8fb65d77696c0d75217">111afe5a</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:58-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Capability: Intialize interrupt field

Previously this was left uninitialized.

Also clarify some comments.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/109affa5c7b58625c94f540957dfcf3157a7ca36">109affa5</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:58-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Task: Make comments proper Notes
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b67647ba3b06241aef2c984b29df17a1267a3910">b67647ba</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/SpinLock: Move to proper atomics

This is fairly straightforward; we just needed to use relaxed operations
for the PROF_SPIN counters and a release store instead of a write
barrier.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b69a1ebb208c3de41af12cecb24bfb489af52870">b69a1ebb</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/OSThreads: Fix data race

Previously we would race on the cached processor count. Avoiding this is
straightforward; just use relaxed operations.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/a20a219e8ec9f6a6e5a9ba91703a7b5130b075bf">a20a219e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/ClosureMaros: Use relaxed atomics
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/73d3117154647c3743ac1357bf577d4554ffad5d">73d31171</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Fix thread leak in hs_try_putmvar00[13]
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/efec08d11f9d88d58d01f1e438520aa2858c5482">efec08d1</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Introduce SET_HDR_RELEASE

Also ensure that we also store the info table pointer last to ensure
that the synchronization covers all stores.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1a16a63786685844182bbe0ca9ff7bf58156e8c8">1a16a637</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Factor out logic to identify a good capability for running a task

Not only does this make the control flow a bit clearer but it also
allows us to add a TSAN suppression on this logic, which requires
(harmless) data races.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/34e8fc56dabdead2154609c8ed1cfe125b5dbdb2">34e8fc56</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Annotate benign race in waitForCapability
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7f59fb10be658f02d8081f31dce32d4f321af823">7f59fb10</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Clarify locking behavior of releaseCapability_
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2497d63eac6ec339a836aa968f68d4ffc9f8542f">2497d63e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Add assertions for task ownership of capabilities
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/32b7a3f720de3306c7749d2d13ad4f9182c3d1a2">32b7a3f7</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Use relaxed atomics on n_returning_tasks

This mitigates the warning of a benign race on n_returning_tasks in
shouldYieldCapability.

See #17261.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/18c60ee885935a90857a7062abd25e8e6fb86b83">18c60ee8</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Mitigate races in capability interruption logic
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b87ffbe76793fd85bd160c9a20e211c1b2d232ef">b87ffbe7</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Capability: Use relaxed operations for last_free_capability
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/a5e0c4e79fc397a0926e991ea15730e458fd45ac">a5e0c4e7</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Use relaxed operations for cap->running_task (TODO)

This shouldn't be necessary since only the owning thread of the capability
should be touching this.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d462b09179d1de51999b57aa1034ef0cfeb79309">d462b091</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Schedule: Use relaxed operations for sched_state
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/be4440e6b32d5773f3b688a59ca64840a40fb151">be4440e6</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Accept data race in work-stealing implementation

This race is okay since the task is owned by the capability pushing it.
By Note [Ownership of Task] this means that the capability is free to
write to `task->cap` without taking `task->lock`.

Fixes #17276.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7a4a22154c24bc14aa4daf95fd1bf3e99c546d35">7a4a2215</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Eliminate data races on pending_sync
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6ca008dd81deaf99327f1d82e82d9d89f0c31e87">6ca008dd</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Schedule: Eliminate data races on recent_activity

We cannot safely use relaxed atomics here.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3963450921aaff75b973ed3ca226ca3cc45e50c6">39634509</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Avoid data races in message handling
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/70f51d2be7989fcef28882e3d497dde8cf780fd9">70f51d2b</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Messages: Drop incredibly fishy write barrier

executeMessage previously had a write barrier at the beginning of its
loop apparently in an attempt to synchronize with another thread's
writes to the Message. I would guess that the author had intended to use
a load barrier here given that there are no globally-visible writes done
in executeMessage.

I've removed the redundant barrier since the necessary load barrier is
now provided by the ACQUIRE_LOAD.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/03301a279ae355c726bd4981e27bcfee69d0cbcf">03301a27</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/ThreadPaused: Avoid data races
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f3a3abf8fd4b44ba0773d90c1d2979417de72ddf">f3a3abf8</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Schedule: Eliminate data races in run queue management
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3d7a97762abc01b0ffd8028d4828e8660005156b">3d7a9776</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Eliminate shutdown data race on task counters
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/14a7df427a61df55939e9a7c581afb578738ce1e">14a7df42</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Threads: Avoid data races (TODO)

Replace barriers with appropriate ordering. Drop redundant barrier in
tryWakeupThread (the RELEASE barrier will be provided by sendMessage's
mutex release).

We use relaxed operations on why_blocked and the stack although it's not
clear to me why this is necessary.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/064625cb7547db7c74b266b7b657e1b237c31292">064625cb</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:16:59-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Messages: Annotate benign race
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/4149887df9e134d2736a4a16c12e9307eca84673">4149887d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/RaiseAsync: Synchronize what_next read
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/4b1877075b1cb4ac1e4aed7ae04b080aa20b07fa">4b187707</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Task: Move debugTrace to avoid data race

Specifically, we need to hold all_tasks_mutex to read taskCount.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/cf52442a742dfa39a5ca2b9639281bfc5c456b35">cf52442a</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Disable flawed assertion
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/115cb7249820fe08a71d9896a6fef73526d6870f">115cb724</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Document schedulePushWork race
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9d53cff854fabcc70f21d4662c1e974b64a374b5">9d53cff8</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Capabiliity: Properly fix data race on n_returning_tasks

There is a real data race but can be made safe by using proper atomic
(but relaxed) accesses.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c09470715c232963467978e80f2c8054361f17ce">c0947071</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Make write of to_cap->inbox atomic

This is necessary since emptyInbox may read from to_cap->inbox without
taking cap->lock.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0b41ab725eab1a9dccb34c2671150e16630ffdcd">0b41ab72</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">gitlab-ci: Add nightly-x86_64-linux-deb9-tsan job
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9076f5c40e4161b5fb2d11922f1c5c4ecac6fa79">9076f5c4</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark setnumcapabilities001 as broken with TSAN

Due to #18808.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/fe840eceb8e416e7dd560b7310c97dbc4edb6d72">fe840ece</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Skip divbyzero and derefnull under TSAN

ThreadSanitizer changes the output of these tests.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/5650808a3bd822551f74ccd221a6a2c1e39f2f73">5650808a</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Skip high memory usage tests with TSAN

ThreadSanitizer significantly increases the memory footprint of tests,
so much so that it can send machines into OOM.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/a07163dd75837b08cff6f458fc2ad3ba0872e784">a07163dd</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark hie002 as high_memory_usage

This test has a peak residency of 1GByte; this is large enough to
classify as "high" in my book.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/04b2d5a79a673a0cea78e84e4326c2776c430ee7">04b2d5a7</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark T9872[abc] as high_memory_usage

These all have a maximum residency of over 2 GB.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c8c0c2dcda87e3b50e72f5afc50fc875944205ff">c8c0c2dc</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">gitlab-ci: Disable documentation in TSAN build

Haddock chews through enough memory to cause the CI builders to OOM and
there's frankly no reason to build documentation in this job anyways.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e420db5223c91252f231d68087cedd65b366fc16">e420db52</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">TSANUtils: Ensure that C11 atomics are supported
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/823408fdc8df8ee336f27eb15dcabca90d4cd389">823408fd</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark T3807 as broken with TSAN

Due to #18883.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/54e7da1cb3afd0b47394917f3820677dd57fffe5">54e7da1c</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">testsuite: Mark T13702 as broken with TSAN due to #18884
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1e9e797c6251ad0e0cddc88637ae4d7730085761">1e9e797c</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/BlockAlloc: Use relaxed operations
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2333e636f01ae39c2368f782a3b0a9e96438ccce">2333e636</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Rework handling of mutlist scavenging statistics
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2e7699fa7931dc7795b42626583d64493f71c157">2e7699fa</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Avoid data races in StablePtr implementation

This fixes two potentially problematic data races in the StablePtr
implementation:

 * We would fail to RELEASE the stable pointer table when enlarging it,
   causing other cores to potentially see uninitialized memory.

 * We would fail to ACQUIRE when dereferencing a stable pointer.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/73802c707ea088cf2c6d531c0518ae02b8d4558e">73802c70</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Storage: Use atomics
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/971af95f022be6c67e211eb1802d719dec6bfd97">971af95f</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Updates: Use proper atomic operations
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/57697340569719cbfec1a1555c3245d2a4fb2e9c">57697340</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:00-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Weak: Eliminate data races

By taking all_tasks_mutex in stat_exit. Also better-document the fact
that the task statistics are protected by all_tasks_mutex.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d7567dea0985f93249af003ed1e8a7c0d5079365">d7567dea</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/GC: Use atomics
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d0d61a614143a237db4d2b4b6475e231c33a010b">d0d61a61</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Use RELEASE ordering in unlockClosure
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/43b552676cddc0a3cedcc0651d87e9a125ac6c8c">43b55267</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Storage: Accept races on heap size counters
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e3d2418da650e1a5c333128884fd3bcd82d0ce3f">e3d2418d</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Join to concurrent mark thread during shutdown

Previously we would take all capabilities but fail to join on the thread
itself, potentially resulting in a leaked thread.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0da89a35cca70f2f4ff02158e7971f68bcf9185a">0da89a35</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Fix race in GC CPU time accounting

Ensure that the GC leader synchronizes with workers before calling
stat_endGC.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0a55e0dbdfc1838bfcc6d2815da96516ba20de50">0a55e0db</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/SpinLock: Separate out slow path

Not only is this in general a good idea, but it turns out that GCC
unrolls the retry loop, resulting is massive code bloat in critical
parts of the RTS (e.g. `evacuate`).
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2aae02ddb9c040e721704a683874053ccd6629b9">2aae02dd</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Use relaxed ordering on spinlock counters
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c2527bcd770a2ecf5ef591640eb7bea385fce1cb">c2527bcd</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Annotate hopefully "benign" races in freeGroup
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d2649d6e49871440b4b3b8fbb723d814509d2371">d2649d6e</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Strengthen ordering in releaseGCThreads
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/854884e1202557e4b9f687ce83d78f8147af1d89">854884e1</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/WSDeque: Rewrite with proper atomics

After a few attempts at shoring up the previous implementation, I ended
up turning to the literature and now use the proven implementation,

> N.M. Lê, A. Pop, A.Cohen, and F.Z. Nardelli. "Correct and Efficient
> Work-Stealing for Weak Memory Models". PPoPP'13, February 2013,
> ACM 978-1-4503-1922/13/02.

Note only is this approach formally proven correct under C11 semantics
but it is also proved to be a bit faster in practice.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/405c4e040d3c8023e95c2047dacb5d0873be687e">405c4e04</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Use relaxed atomics for whitehole spin stats
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d6f250fdd3847068a28668fa18f3ce43cfee25cc">d6f250fd</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Avoid lock order inversion during fork

Fixes #17275.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2fff334f149c1ea9e1bdc7d6841a37afc40d713d">2fff334f</a></strong>
<div>
<span>by GHC GitLab CI</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Use proper relaxe operations in getCurrentThreadCPUTime

Here we are doing lazy initialization; it's okay if we do the check more
than once, hence relaxed operation is fine.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/9e58ed8a645ea12904a12d354ba9ecc1d908c84d">9e58ed8a</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/STM: Use atomics

This fixes a potentially harmful race where we failed to synchronize
before looking at a TVar's current_value.

Also did a bit of refactoring to avoid abstract over management of
max_commits.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c0fe81b1711cd28248ebc727769cd0b7e91b1f6d">c0fe81b1</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/stm: Strengthen orderings to SEQ_CST instead of volatile

Previously the `current_value`, `first_watch_queue_entry`, and
`num_updates` fields of `StgTVar` were marked as `volatile` in an
attempt to provide strong ordering. Of course, this isn't sufficient.

We now use proper atomic operations. In most of these cases I strengthen
the ordering all the way to SEQ_CST although it's possible that some
could be weakened with some thought.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/fb378955014a9a9c824a500570bc45150e030a22">fb378955</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Mitigate data races in event manager startup/shutdown
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7852d6b82ade4fcd6b7d30afd5bf7743cbf489ca">7852d6b8</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Suppress data race due to close

This suppresses the other side of a race during shutdown.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/377d742a527e0478793fd28a8781c9dc63d3eb98">377d742a</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Accept benign races in Proftimer
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2d099438d9fa372a2de5aa440fba232f056a8372">2d099438</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Pause timer while changing capability count

This avoids #17289.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6e48304ca2fcebd2d2b851c189aab6685910211e">6e48304c</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Fix #17289
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/759ea6963f7111685d217389ff7b285d9b909f8f">759ea696</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:01-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">suppress #17289 (ticker) race
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/44cb606bd1216c2104c1c3f4bebda910e2258440">44cb606b</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:02-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Fix timer initialization

Previously `initScheduler` would attempt to pause the ticker and in so
doing acquire the ticker mutex. However, initTicker, which is
responsible for initializing said mutex, hadn't been called
yet.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/b780bf48f63393d3e71eed018036a0c899f25462">b780bf48</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:02-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Fix races in Pthread timer backend shudown

We can generally be pretty relaxed in the barriers here since the timer
thread is a loop.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/636bde8679a03921fce65a627b523e4a986d774b">636bde86</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:02-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Stats: Hide a few unused unnecessarily global functions
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/232dc4888e4971c4ecbc784402260ea9fa89f3d5">232dc488</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:02-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Stats: Protect with mutex

While on face value this seems a bit heavy, I think it's far better than
enforcing ordering on every access.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/40860e414ecdcba00199b70056ac33ffee324cae">40860e41</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:47-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts: Tear down stats_mutex after exitHeapProfiling

Since the latter wants to call getRTSStats.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/383bb46f9de2e5943ac7d5bc5722af9d36ede017">383bb46f</a></strong>
<div>
<span>by Ben Gamari</span>
<i>at 2020-11-30T19:17:49-05:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">rts/Stats: Reintroduce mut_user_time

Fix the previous backport; this function was dead code in master but is
still needed due to ProfHeap.c in ghc-8.10.
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#587d266bb27a4dc3022bbed44dfa19849df3044c">
.gitlab-ci.yml
</a>
</li>
<li class="file-stats">
<a href="#157f7634c25bc6366cb7c9c9edb48e819dce38db">
.gitlab/ci.sh
</a>
</li>
<li class="file-stats">
<a href="#47f4bea1d308dee249030e6063d92071b5aac240">
compiler/ghci/Linker.hs
</a>
</li>
<li class="file-stats">
<a href="#2eeb40f0acd6cb433ebe65e34262040b618908a7">
hadrian/hadrian.cabal
</a>
</li>
<li class="file-stats">
<a href="#1655041cfd1add79e4c335c656405ee3eb3bd0dd">
hadrian/src/Flavour.hs
</a>
</li>
<li class="file-stats">
<a href="#704958036ebddd9058fb1367e440b2ea1abb53e9">
hadrian/src/Settings.hs
</a>
</li>
<li class="file-stats">
<a href="#fbf853844dc48d850085cbef14c0af1e474cb087">
<span class="new-file">
+
hadrian/src/Settings/Flavours/ThreadSanitizer.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#40f83a2cddcbc1f8190b0551eb572ccf4ea88cc9">
includes/Rts.h
</a>
</li>
<li class="file-stats">
<a href="#452d5ee18aa2b91b6486a157ecf550dc84081872">
includes/rts/OSThreads.h
</a>
</li>
<li class="file-stats">
<a href="#397950c6118f4b5a74a10249b6bcc322ab8e2e25">
includes/rts/SpinLock.h
</a>
</li>
<li class="file-stats">
<a href="#0e9120c800f0c7864f3631f8fb8d7035a4778f97">
includes/rts/StablePtr.h
</a>
</li>
<li class="file-stats">
<a href="#32b24c17e385bd15c4751ab0da5f55876fd57f51">
<span class="new-file">
+
includes/rts/TSANUtils.h
</span>
</a>
</li>
<li class="file-stats">
<a href="#aa19e824b3a8c24a7bf37f8352997022b14a5a0c">
includes/rts/storage/ClosureMacros.h
</a>
</li>
<li class="file-stats">
<a href="#0ea78c0eb38d298692960f63f47248f6464a0479">
includes/rts/storage/Closures.h
</a>
</li>
<li class="file-stats">
<a href="#94ca41c5afbb3d932bd6f37ee16458322988fb69">
includes/rts/storage/GC.h
</a>
</li>
<li class="file-stats">
<a href="#fbe566a2918ba0562be9aceeb5d07448bf2f9ed0">
includes/stg/SMP.h
</a>
</li>
<li class="file-stats">
<a href="#e5d5c3eb2ba69f9a4ab3f56a8e9dab426c012963">
libraries/base/GHC/Event/Control.hs
</a>
</li>
<li class="file-stats">
<a href="#46661d25ba83700d4344aaa428308c552e201be8">
<span class="new-file">
+
rts/.tsan-suppressions
</span>
</a>
</li>
<li class="file-stats">
<a href="#33249795fee267712d5c3a7ecfa9f2edea260401">
rts/Capability.c
</a>
</li>
<li class="file-stats">
<a href="#62ec5569a8af1e443ae952b393d15b9dd1cea199">
rts/Capability.h
</a>
</li>
<li class="file-stats">
<a href="#ba1d62598dfbf5ddb817dd9c93461a02a0bba43d">
rts/CheckUnload.c
</a>
</li>
<li class="file-stats">
<a href="#67cc28da78ad5c427434fbe2efdcecffe61ae002">
rts/CheckUnload.h
</a>
</li>
<li class="file-stats">
<a href="#152b85a9ce66dcf385a199eab2acad9d98fd737b">
rts/Hash.c
</a>
</li>
<li class="file-stats">
<a href="#4352fec095ae082617e59e2f077ec6dc9e865ee7">
rts/Hash.h
</a>
</li>
<li class="file-stats">
<a href="#044fe9284335a9bfd17546e06c2e5c40a680dd3d">
rts/Linker.c
</a>
</li>
<li class="file-stats">
<a href="#687f0b17315e54a1692de64626391e572ca298e9">
rts/LinkerInternals.h
</a>
</li>
<li class="file-stats">
<a href="#63bb2dcb45bf7982130b0b95ecf366bf1a617e82">
rts/Messages.c
</a>
</li>
<li class="file-stats">
<a href="#6db965f97cbab901f493506a385bcf1283009921">
rts/PrimOps.cmm
</a>
</li>
<li class="file-stats">
<a href="#a3b0919403d8f328f07cda7c4a7f9817c369357c">
rts/Proftimer.c
</a>
</li>
<li class="file-stats">
<a href="#515f190a948b1d6c490c96f75a3f909580e927b0">
rts/RaiseAsync.c
</a>
</li>
</ul>
<h5>The diff was not included because it is too large.</h5>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/f6f0343bd8dc1ea5d8085ed551bcb3400b72b694...383bb46f9de2e5943ac7d5bc5722af9d36ede017">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.haskell.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.



</p>
</div>
</body>
</html>