Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Command stdout being closed early #48

@guybedford

Description

@guybedford

I have a large binary (as opposed to a reduced test case) where the stdout descriptor is somehow being set to a Descriptor::Closed value. Initial fd_write calls are ok, but later fd_write calls to stdout then fail, but the failure is also being swallowed resulting in an ok completion and no indication of the failure.

In this scenario, there is no fd_close call, in fact the only other host call happening is monotonic clock calls. So I'm not sure exactly why the Descriptor::Closed value is appearing. I can see that the stdout descriptor is running through the Descriptor Drop though which might be the culprit. Perhaps due to the overwriting approach being done for commands, I'm not sure.

I'm going to test out a non-command case tomorrow and will report back if this works around the issue, but wanted to post up the bug for now at least. The second bug that the fd_write error is not being propagated also seems like an important one to fix, it would be more useful to always treat errors as errors of the command function itself I think.

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