Skip to content

waitUntilQueued times out due to the pin internal lock #57

Open
@arodchen

Description

@arodchen

When syscallLeave is called from SyscallEnter waitUntilQueued can time out if the woken thread is about to call SyscallEnter before reaching sleeping point on schedLock futex. The reason for that is that before calling the function registered in PIN_AddSyscallEntryFunction the pin client lock is obtained as it is written in the Pin documentation.

It is possible to move some functionality from SyscallEnter to another function without a lock by adding instrumentation on INS_IsSyscall condition. I tried to move call to syscallLeave to the unlocked function which is called before SyscallEnter but ZSim failed with panic("Wakeup race in barrier?").

Do you have any ideas how to solve that problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions