<!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 data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: 0.875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";'>
<div class="content">
<h3 style="margin-top: 20px; margin-bottom: 10px;">
Ben Gamari pushed to branch wip/tsan/fixes at <a href="https://gitlab.haskell.org/ghc/ghc" style="color: #1068bf;">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
Commits:
</h4>
<ul>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1865aed502266c61f992dfa95f359de68acd3755" style="color: #1068bf;">1865aed5</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>rts: Introduce getNumCapabilities
And ensure accesses to n_capabilities are atomic (although with relaxed
ordering). This is necessary as RTS API callers may concurrently call
into the RTS without holding a capability.
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/43c565ae541c1c6387607c5479db0d8ca15d51e5" style="color: #1068bf;">43c565ae</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>ghc: Fix data race in dump file handling
Previously the dump filename cache would use a non-atomic update which
could potentially result in lost dump contents. Note that this is still
a bit racy since the first writer may lag behind a later appending
writer.
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/1be059e337bab619d64529f5c7271d7e6671973d" style="color: #1068bf;">1be059e3</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>rts: Always use atomics for context_switch and interrupt
Since these are modified by the timer handler.
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d0dbbd4984e6cf05836fbf0ca6e8912764ce786a" style="color: #1068bf;">d0dbbd49</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>rts/Timer: Always use atomic operations
As noted in #22447, the existence of the pthread-based ITimer
implementation means that we cannot assume that the program is
single-threaded.
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/370463432da9e41770bd6a45efead661c31915ea" style="color: #1068bf;">37046343</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>rts: Encapsulate recent_activity access
This makes it easier to ensure that it is accessed using the necessary
atomic operations.
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/bee3c827de67108b2b00142eb5df86d468f39144" style="color: #1068bf;">bee3c827</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>rts: Encapsulate access to capabilities array
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/465fbb2272ecdbc23fb3703be94bb7e4527f69b7" style="color: #1068bf;">465fbb22</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>rts: Encapsulate sched_state
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6f6e960b9dde1b4fdeb0f8bb7ecbb26a4d87914f" style="color: #1068bf;">6f6e960b</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>PrimOps: Fix benign MutVar race
Relaxed ordering is fine here since the later CAS implies a release.
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/61f765273ed8ff22891057a6f302175073f9f696" style="color: #1068bf;">61f76527</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>rts: Style fix
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/f34d779511774417d141c341babeb56c429b38be" style="color: #1068bf;">f34d7795</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>compiler: Use release store in eager blackholing
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8e81b6b5fae6056d6334726f813af7c8d638a8b0" style="color: #1068bf;">8e81b6b5</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>rts: Fix ordering of makeStableName
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/e9254737392d53431277585d05031cc2d117f09f" style="color: #1068bf;">e9254737</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>rts: Use ordered accesses instead of explicit barriers
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/6ca2af2367055f0a76649ebfdb0e5f5c2cec0d4b" style="color: #1068bf;">6ca2af23</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>rts: Statically allocate capabilities
This is a rather simplistic way of solving #17289.
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/81be6c6924fee89f15b12ecd55e1b2e514bc11a5" style="color: #1068bf;">81be6c69</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>rts: Ensure that all accesses to pending_sync are atomic
</pre>
</li>
<li>
<strong style="font-weight: bold;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/985cb0ac8c08fd6455fe9a4aaae407a7af87914d" style="color: #1068bf;">985cb0ac</a></strong>
<div>
<span> by Ben Gamari </span> <i> at 2022-11-22T08:56:51-05:00 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 0.8125rem; color: #303030; position: relative; font-family: "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; word-break: break-all; word-wrap: break-word; background-color: #fafafa; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dbdbdb;'>rts: Note race with wakeBlockingQueue
</pre>
</li>
</ul>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
30 changed files:
</h4>
<ul>
<li class="file-stats">
<a href="#2f341f858154eb8e1900d5bd92a156b13ddd06f3" style="color: #1068bf;">
compiler/GHC/StgToCmm/Bind.hs
</a>
</li>
<li class="file-stats">
<a href="#b62120081f64009b94c12d04ded5c68870d8c647" style="color: #1068bf;">
compiler/GHC/Utils/Logger.hs
</a>
</li>
<li class="file-stats">
<a href="#33249795fee267712d5c3a7ecfa9f2edea260401" style="color: #1068bf;">
rts/Capability.c
</a>
</li>
<li class="file-stats">
<a href="#62ec5569a8af1e443ae952b393d15b9dd1cea199" style="color: #1068bf;">
rts/Capability.h
</a>
</li>
<li class="file-stats">
<a href="#c295ca8b90dc6b200fb3e0cbd3dfdc5df307bbc7" style="color: #1068bf;">
rts/HeapStackCheck.cmm
</a>
</li>
<li class="file-stats">
<a href="#21820a0711a9c884bfa6b2b4da517468f952f558" style="color: #1068bf;">
rts/IOManager.c
</a>
</li>
<li class="file-stats">
<a href="#f639149fde351603cc3df9c8c4ba87744bcfc523" style="color: #1068bf;">
rts/Messages.h
</a>
</li>
<li class="file-stats">
<a href="#6db965f97cbab901f493506a385bcf1283009921" style="color: #1068bf;">
rts/PrimOps.cmm
</a>
</li>
<li class="file-stats">
<a href="#1f366bc5cc9fea123d6a6ab6c25b1483994867d5" style="color: #1068bf;">
rts/Printer.c
</a>
</li>
<li class="file-stats">
<a href="#49d63c99feec397a2d9c3692f6d9f1c7698c81d0" style="color: #1068bf;">
rts/ProfHeap.c
</a>
</li>
<li class="file-stats">
<a href="#d73564be64963aad4930e9425a9616251df23fe1" style="color: #1068bf;">
rts/ProfilerReport.c
</a>
</li>
<li class="file-stats">
<a href="#605f52d03439651513ba770e8381aafe2a507e69" style="color: #1068bf;">
rts/ProfilerReportJson.c
</a>
</li>
<li class="file-stats">
<a href="#048e6e2c1b60f55338d1b9dd1ac1beb4e4697b8d" style="color: #1068bf;">
rts/Profiling.c
</a>
</li>
<li class="file-stats">
<a href="#a3b0919403d8f328f07cda7c4a7f9817c369357c" style="color: #1068bf;">
rts/Proftimer.c
</a>
</li>
<li class="file-stats">
<a href="#f704201810bbaf922015f683d87a6da6978e325a" style="color: #1068bf;">
rts/RetainerProfile.c
</a>
</li>
<li class="file-stats">
<a href="#52cbed6d5a31a2e77e689138af4477c2a62f413b" style="color: #1068bf;">
rts/RtsAPI.c
</a>
</li>
<li class="file-stats">
<a href="#9ed11d0519762dae04656481b089dbb5b05acf98" style="color: #1068bf;">
rts/RtsStartup.c
</a>
</li>
<li class="file-stats">
<a href="#632a1fac336e62e26d0af2de3f023c11a62c927a" style="color: #1068bf;">
rts/SMPClosureOps.h
</a>
</li>
<li class="file-stats">
<a href="#e137645f8a9be9fa32cc764e19cea2b492e33d9c" style="color: #1068bf;">
rts/STM.c
</a>
</li>
<li class="file-stats">
<a href="#7d6961cb073b9fe3df3a81f0ad5cf36eed293c42" style="color: #1068bf;">
rts/Schedule.c
</a>
</li>
<li class="file-stats">
<a href="#52526efc348b52718c69d51f8df6e5425ff68d48" style="color: #1068bf;">
rts/Schedule.h
</a>
</li>
<li class="file-stats">
<a href="#6c6e266b51f1c94d2ebf5aa2052f408397451f94" style="color: #1068bf;">
rts/Stats.c
</a>
</li>
<li class="file-stats">
<a href="#6ca006a5d6dfdfdb97d0dd72db322e3f6eaa6214" style="color: #1068bf;">
rts/StgMiscClosures.cmm
</a>
</li>
<li class="file-stats">
<a href="#2dcc6eaccbc1470a4453e6040e4a5dcfd0ba0a14" style="color: #1068bf;">
rts/Task.c
</a>
</li>
<li class="file-stats">
<a href="#a5d219117032120cc7bde9f13451d9627cff5614" style="color: #1068bf;">
rts/Threads.c
</a>
</li>
<li class="file-stats">
<a href="#fd2da1c8cf8253388466e15a3258c85e18636790" style="color: #1068bf;">
rts/Timer.c
</a>
</li>
<li class="file-stats">
<a href="#bc180b2947a591ed637c69fdae89b63d91cdf3bf" style="color: #1068bf;">
rts/TraverseHeap.c
</a>
</li>
<li class="file-stats">
<a href="#4bef7d0c5d4ce46744aaacac2800349746d7e44f" style="color: #1068bf;">
rts/eventlog/EventLog.c
</a>
</li>
<li class="file-stats">
<a href="#c708228c323bbd92b351d36d6ac9aea802512420" style="color: #1068bf;">
rts/hooks/LongGCSync.c
</a>
</li>
<li class="file-stats">
<a href="#1ce50078fc531487782432592488ae95c6156df4" style="color: #1068bf;">
rts/include/Cmm.h
</a>
</li>
</ul>
<h5 style="margin-top: 10px; margin-bottom: 10px; font-size: 0.875rem;">
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/f36461543dddf16849673675a23d93a9c986e168...985cb0ac8c08fd6455fe9a4aaae407a7af87914d" style="color: #1068bf;">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.haskell.org" style="color: #1068bf;">gitlab.haskell.org</a>. <a href="https://gitlab.haskell.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link" style="color: #1068bf;">Manage all notifications</a> · <a href="https://gitlab.haskell.org/help" target="_blank" rel="noopener noreferrer" class="help-link" style="color: #1068bf;">Help</a>
</p>
</div>
</body>
</html>