Skip to content

SCCACHE_ERROR_LOG + trace logs == doesn't work on windows #80

Closed
@alexcrichton

Description

@alexcrichton

Unfortuantely with SCCACHE_ERROR_LOG and a trace log level nothing's actually emitted on Windows.

In libstd we fetch and cache stderr in a global. This means that when the process starts with a missing handle (via the spawning of the server process in sccache) if stderr() is used then libstd will cache a missing handle and forever not print anything to stderr.

That means that later when SetStdHandle is called this doesn't actually propagate back into the standard library and logs still don't show up.

Conveniently debug logs don't attempt to print anything until after SetStdHandle is called, but trace logs cause attempts to print (and caching a stale value) ahead of time and cache an empty handle.

I'd consider this also a bug in libtsd, but figured I'd open here as well if anyone's running into the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions