summaryrefslogtreecommitdiff
path: root/rts/Schedule.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2016-05-11 15:38:25 +0100
committerSimon Marlow <marlowsd@gmail.com>2016-05-11 17:05:10 +0100
commitcfc5df43a7789832a2789e517d8270650cc31b7f (patch)
tree782040443734324cfaa38ae0bae7b884bd144286 /rts/Schedule.c
parent3edbd091341ab0ab60862ba18d3107f34c7fc876 (diff)
downloadhaskell-cfc5df43a7789832a2789e517d8270650cc31b7f.tar.gz
Fix ASSERT failure and re-enable setnumcapabilities001
The assertion failure was fairly benign, I think, but this fixes it. I've been running the test repeatedly for the last 30 mins and it hasn't triggered. There are other problems exposed by this test (see #12038), but I've worked around those in the test itself for now. I also copied the relevant bits of the parallel library here so that we don't need parallel for the test to run.
Diffstat (limited to 'rts/Schedule.c')
-rw-r--r--rts/Schedule.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c
index d077ce2d5a..0db9ff8e9b 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -1626,11 +1626,14 @@ scheduleDoGC (Capability **pcap, Task *task USED_IF_THREADS,
if (was_syncing) {
stgFree(idle_cap);
}
- if (was_syncing && (prev_sync == SYNC_GC_SEQ ||
- prev_sync == SYNC_GC_PAR)) {
+ if (was_syncing &&
+ (prev_sync == SYNC_GC_SEQ || prev_sync == SYNC_GC_PAR) &&
+ !(sched_state == SCHED_INTERRUPTING && force_major)) {
// someone else had a pending sync request for a GC, so
// let's assume GC has been done and we don't need to GC
// again.
+ // Exception to this: if SCHED_INTERRUPTING, then we still
+ // need to do the final GC.
return;
}
if (sched_state == SCHED_SHUTTING_DOWN) {