Skip to content

Downcalls to witness table (e.g. destroy) hang on Linux x86_64 #97

Open
@ktoso

Description

@ktoso

See also the disabled test for this:

    // FIXME: The destroy witness table call hangs on x86_64 platforms during the destroy witness table call
    @Test
    @DisabledIf("isAmd64")
    public void arena_releaseClassOnClose_class_ok() {

I didn't check on intel mac yet, so it could be either an linux issue or an x86_64 issue.
This manifests as just "hanging" when we do the downcall:


"Test worker" #1 [18055] prio=5 os_prio=0 cpu=437570.63ms elapsed=437.65s tid=0x00007f263c02bbe0 nid=18055 runnable  [0x00007f2643b86000]
   java.lang.Thread.State: RUNNABLE
        at java.lang.invoke.LambdaForm$MH/0x00007f25c31e6400.invoke([email protected]/LambdaForm$MH)
        at java.lang.invoke.LambdaForm$MH/0x00007f25c31e8800.invokeExact_MT([email protected]/LambdaForm$MH)
        at jdk.internal.foreign.abi.DowncallStub/0x00007f25c31e6800.invoke([email protected]/Unknown Source)
        at java.lang.invoke.LambdaForm$DMH/0x00007f25c31e6c00.invokeStaticInit([email protected]/LambdaForm$DMH)
        at java.lang.invoke.LambdaForm$MH/0x00007f25c31e7c00.invoke([email protected]/LambdaForm$MH)
        at java.lang.invoke.LambdaForm$MH/0x00007f25c31e8000.invokeExact_MT([email protected]/LambdaForm$MH)
        at org.swift.swiftkit.SwiftValueWitnessTable.destroy(SwiftValueWitnessTable.java:221)
        at org.swift.swiftkit.SwiftHeapObjectCleanup.run(SwiftMemoryResourceCleanup.java:37)
        at org.swift.swiftkit.ConfinedSwiftMemorySession$ConfinedResourceList.cleanup(SwiftArena.java:140)
        at org.swift.swiftkit.ConfinedSwiftMemorySession.close(SwiftArena.java:104)
        at org.swift.swiftkit.SwiftArenaTest.arena_releaseClassOnClose_class_ok(SwiftArenaTest.java:50)

It readily reproduces in such docker container as well:

docker build --platform linux/amd64 --tag swift-java-x86_64 docker
docker run --rm -v$(pwd):/code -it --platform linux/amd64 swift-java-x86_64 /bin/bash

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingjextract-swiftIssues related to jextract-swift

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions