Skip to content

GC Boehm Error with more than 8 threads #167

Open
@Shadowfall357

Description

@Shadowfall357

Hello,

is it possible to use Weave with gc Boehm? I wrote this simple program:

import weave
import os

proc main(): void =
    putEnv("WEAVE_NUM_THREADS", "9")
    init(Weave)
    exit(Weave)

main()

Unfortunately I get this error when compiling with Boehm GC with more than 8 threads:

Error: unhandled exception: /home/.nimble/pkgs/weave-0.4.0/weave/instrumentation/contracts.nim(86, 15)

localCtx == default(TLContext)
    Contract violated for pre-condition at scheduler.nim:252
        localCtx == default(TLContext)
    The following values are contrary to expectations:
        (worker: (ID: 8, left: -1, right: -1, parent: 3, workSharingRequests: (front: 0, back: 0, buffer: ...), deque: (pendingTasks: 0, head: ..., tail: (fn: ..., parent: ..., prev: ..., next: ..., start: 0, cur: 0, stop: 0, stride: 0, futures: ..., futureSize: 0, hasFuture: false, isLoop: false, isInitialIter: false, data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])), currentTask: ..., leftIsWaiting: true, rightIsWaiting: true, isWaiting: false), thefts: (outstanding: 0, dropped: 0, rng: (s0: 11568752105299578744, s1: 5231855230099380833, s2: 13070411628727900855, s3: 17390588265438726597), stealHalf: false, recentTasks: 0, recentThefts: 0), taskCache: (top: ..., freeFn: ..., count: 0, recentAsk: 0, registeredAt: ...), stealCache: (stack: ..., rawMem: ..., len: 1), runtimeIsQuiescent: false, signaledTerminate: false) == default(TLContext)  [Worker 8]
 [AssertionDefect]

Am I doing something wrong or does the boehm gc not work with weave?

Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions