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

Robustify fork server launching & problem detection, part 1#536

Open
copybara-service[bot] wants to merge 1 commit intomainfrom
pr_516385634
Open

Robustify fork server launching & problem detection, part 1#536
copybara-service[bot] wants to merge 1 commit intomainfrom
pr_516385634

Conversation

@copybara-service
Copy link
Copy Markdown

Robustify fork server launching & problem detection, part 1

This change addresses the problems (1) and (4) from the bug:

  1. The fork server launches the command in the background like this:

    int ret = system("command &");
    CHECK_EQ(ret, 0);
    

    However, system() always returns success in this case, provided it can just parse the command, because the command is run in the background and doesn't return its exit code to the subshell.

  2. Even if started successfully, the fork server can still die at any moment. Centepede doesn't attempt to detect this, instead sending execution requests to an absent process, never receiving a reply, and eventually timing out.

This change addresses the problems (1) and (4) from the bug:

1. The fork server launches the command in the background like this:
   ```
   int ret = system("command &");
   CHECK_EQ(ret, 0);
   ```
   However, `system()` always returns success in this case, provided it can just parse the command, because the command is run in the background and doesn't return its exit code to the subshell.

4. Even if started successfully, the fork server can still die at any moment. Centepede doesn't attempt to detect this, instead sending execution requests to an absent process, never receiving a reply, and eventually timing out.

PiperOrigin-RevId: 516385634
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant