- Mar 23, 2020
-
-
Alec Theriault authored
-
- Mar 20, 2020
-
-
Ben Gamari authored
-
Ben Gamari authored
-
- Mar 19, 2020
-
-
Ben Gamari authored
-
Ben Gamari authored
-
- Mar 18, 2020
-
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
Apparently it isn't supported by some slightly older Python versions.
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
This exposes a set of interfaces from the GHC API for configuring EventLogWriters. These can be used by consumers like [ghc-eventlog-socket](https://github.com/bgamari/ghc-eventlog-socket). (cherry picked from commit e43e6ece)
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
Fixes Darwin build failure due to CPP whitespace.
-
- Mar 17, 2020
-
-
Ben Gamari authored
-
Ben Gamari authored
To ensure we have a new enough process version.
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
-
- Mar 16, 2020
-
-
Richard Eisenberg authored
-
- Mar 15, 2020
-
-
Ben Gamari authored
-
Ben Gamari authored
In System.Environment.ExecutablePath that was only compiled on Windows.
-
(backport for 8.10)
-
- Mar 14, 2020
-
-
Ben Gamari authored
-
Ömer Sinan Ağacan authored
Fixes #17785 Here's how the problem occurs: - In generation 0 we have a TSO that is finished (i.e. it has no more work to do or it is killed). - The TSO only becomes reachable after collectDeadWeakPtrs(). - After collectDeadWeakPtrs() we switch to WeakDone phase where we don't move TSOs to different lists anymore (like the next gen's thread list or the resurrected_threads list). - So the TSO will never be moved to a generation's thread list, but it will be promoted to generation 1. - Generation 1 collected via mark-compact, and because the TSO is reachable it is marked, and its `global_link` field, which is bogus at this point (because the TSO is not in a list), will be threaded. - Chaos ensues. In other words, when these conditions hold: - A TSO is reachable only after collectDeadWeakPtrs() - It's finished (what_next is ThreadComplete or ThreadKilled) - It's retained by mark-compact collector (moving collector doesn't evacuate the global_list field) We end up doing random mutations on the heap because the TSO's global_list field is not valid, but it still looks like a heap pointer so we thread it during compacting GC. The fix is simple: when we traverse old_threads lists to resurrect unreachable threads the threads that won't be resurrected currently stays on the old_threads lists. Those threads will never be visited again by MarkWeak so we now reset the global_list fields. This way compacting GC does not thread pointers to nowhere. Testing ------- The reproducer in #17785 is quite large and hard to build, because of the dependencies, so I'm not adding a regression test. In my testing the reproducer would take a less than 5 seconds to run, and once in every ~5 runs would fail with a segfault or an assertion error. In other cases it also fails with a test failure. Because the tests never fail with the bug fix, assuming the code is correct, this also means that this bug can sometimes lead to incorrect runtime results. After the fix I was able to run the reproducer repeatedly for about an hour, with no runtime crashes or test failures. To run the reproducer clone the git repo: $ git clone https://github.com/osa1/streamly --branch ghc-segfault Then clone primitive and atomic-primops from their git repos and point to the clones in cabal.project.local. The project should then be buildable using GHC HEAD. Run the executable `properties` with `+RTS -c -DZ`. In addition to the reproducer above I run the test suite using: $ make slowtest EXTRA_HC_OPTS="-debug -with-rtsopts=-DS \ -with-rtsopts=-c +RTS -c -RTS" SKIPWAY='nonmoving nonmoving_thr' This enables compacting GC always in both GHC when building the test programs and when running the test programs, and also enables sanity checking when running the test programs. These set of flags are not compatible for all tests so there are some failures, but I got the same set of failures with this patch compared to GHC HEAD. (cherry picked from commit 2e4d572e)
-
Ben Gamari authored
-
Ben Gamari authored
Avoid unreachable case alternative warning on Windows.
-
- Mar 13, 2020
-
-
Ben Gamari authored
Closes #16144.
-
- Mar 12, 2020
-
-
Ben Gamari authored
Works around #17895.
-
Ben Gamari authored
Fixes typo in changelog.
-
- Mar 11, 2020
-
-
Ben Gamari authored
Use a push option instead of tagging.
-
- Mar 10, 2020
-
-
(cherry picked from commit 5670881d)
-
- Mar 09, 2020
-
-
Ben Gamari authored
This reverts commit 9612e91c.
-
- Mar 04, 2020
-
-
Ben Gamari authored
Previously sparks living in the non-moving heap would be promptly GC'd by the minor collector since pruneSparkQueue uses the BF_EVACUATED flag, which non-moving heap blocks do not have set. Fix this by implementing proper support in pruneSparkQueue for determining reachability in the non-moving heap. The story is told in Note [Spark management in the nonmoving heap].
-
Ben Gamari authored
The non-moving collector would previously walk the entire filled segment list during the preparatory pause. However, this is far more work than is strictly necessary. We can rather get away with merely collecting the allocators' filled segment list heads and process the lists themselves during the concurrent phase. This can significantly reduce the maximum gen1 GC pause time in programs with high rates of long-lived allocations. (cherry picked from commit 927b7a3d)
-
Ben Gamari authored
Previously we would clear the bitmaps of segments which we are going to sweep during the preparatory pause. However, this is unnecessary: the existence of the mark epoch ensures that the sweep will correctly identify non-reachable objects, even if we do not clear the bitmap. We now defer clearing the bitmap to sweep, which happens concurrently with mutation. (cherry picked from commit 69001f54)
-
Ben Gamari authored
Previously we were tracing the object we were asked to mark, even if it lives in a compact region. However, there is no need to do this; we need only to mark the region itself as live. I have seen a segfault due to this due to the concurrent mark seeing a an object in the process of being compacted by the mutator. (cherry picked from commit e4e9a7ba)
-
- Feb 25, 2020
-
-
Sylvain Henry authored
-