Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/panic #56

Merged
merged 4 commits into from
Mar 2, 2024
Merged

Fix/panic #56

merged 4 commits into from
Mar 2, 2024

Conversation

yukihirop
Copy link
Owner

@yukihirop yukihirop commented Mar 2, 2024

Summary

Resolve #55

Other Information

If there's anything else that's important and relevant to your pull
request, mention that information here. This could include
benchmarks, or other information.

If you are updating any of the CHANGELOG files or are asked to update the
CHANGELOG files by reviewers, please add the CHANGELOG entry at the top of the file.

Thanks for contributing to ultraman!

Work

#Procfile
exit_0: ./fixtures/exit_0.sh
exit_1: ./fixtures/exit_1.sh
loop: ./fixtures/loop.sh $MESSAGE
web: bundle exec puma -p $PORT -C ./config/puma.rb
early_out: seq 100
sleep: sleep 20

before

     Running `target/debug/ultraman start --procfile ./example/start/Procfile`
20:18:40 system       | sleep.1      start at pid: 68085
20:18:40 system       | exit_1.1     start at pid: 68082
20:18:40 system       | exit_0.1     start at pid: 68086
20:18:40 system       | web.1        start at pid: 68084
20:18:40 system       | early_out.1  start at pid: 68081
20:18:40 system       | loop.1       start at pid: 68083
20:18:40 exit_1.1     | zsh:1: no such file or directory: ./fixtures/exit_1.sh
20:18:40 loop.1       | zsh:1: no such file or directory: ./fixtures/loop.sh
20:18:40 exit_0.1     | zsh:1: no such file or directory: ./fixtures/exit_0.sh
20:18:40 early_out.1  | 1
20:18:40 early_out.1  | 2
20:18:40 early_out.1  | 3
20:18:40 early_out.1  | 4
20:18:40 early_out.1  | 5
20:18:40 early_out.1  | 6
20:18:40 early_out.1  | 7
thread '<unnamed>' panicked at src/stream_read.rs:44:38:
called `Result::unwrap()` on an `Err` value: "SendError(..)"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
20:18:40 early_out.1  | exited with code 0
20:18:40 system       | sending SIGTERM for sleep.1      at pid 68085
20:18:40 system       | sending SIGTERM for exit_1.1     at pid 68082
20:18:40 system       | sending SIGTERM for exit_0.1     at pid 68086
20:18:40 system       | sending SIGTERM for web.1        at pid 68084
20:18:40 system       | sending SIGTERM for loop.1       at pid 68083
20:18:40 sleep.1      | terminated by SIGTERM
20:18:40 web.1        | terminated by SIGTERM
20:18:40 exit_0.1     | exited with code 127
20:18:40 system       | sending SIGTERM for exit_1.1     at pid 68082
20:18:40 system       | sending SIGTERM for loop.1       at pid 68083
20:18:40 loop.1       | exited with code 127
20:18:40 system       | sending SIGTERM for exit_1.1     at pid 68082
20:18:40 exit_1.1     | exited with code 127

after

     Running `/Users/y.fukuda/RustProjects/ultraman/target/debug/ultraman start --procfile ./Procfile`
20:24:37 system       | exit_1.1     start at pid: 72899
20:24:37 system       | web.1        start at pid: 72902
20:24:37 system       | early_out.1  start at pid: 72901
20:24:37 system       | sleep.1      start at pid: 72904
20:24:37 system       | loop.1       start at pid: 72900
20:24:37 system       | exit_0.1     start at pid: 72903
20:24:37 early_out.1  | 1
20:24:37 early_out.1  | 2
20:24:37 early_out.1  | 3
20:24:37 early_out.1  | 4
20:24:37 early_out.1  | 5
20:24:37 early_out.1  | 6
20:24:37 early_out.1  | 7
20:24:37 early_out.1  | 8
Failed to send message: sending on a disconnected channel
20:24:37 early_out.1  | exited with code 0
20:24:37 system       | sending SIGTERM for exit_1.1     at pid 72899
20:24:37 system       | sending SIGTERM for web.1        at pid 72902
20:24:37 system       | sending SIGTERM for sleep.1      at pid 72904
20:24:37 system       | sending SIGTERM for loop.1       at pid 72900
20:24:37 system       | sending SIGTERM for exit_0.1     at pid 72903
20:24:37 web.1        | terminated by SIGTERM
20:24:37 sleep.1      | terminated by SIGTERM
20:24:37 loop.1       | terminated by SIGTERM
20:24:37 exit_0.1     | terminated by SIGTERM
20:24:37 exit_1.1     | terminated by SIGTERM

Test

  • cargo test
  • cargo build
  • cargo publish --dry-run

@yukihirop yukihirop added this to the v0.3.2 milestone Mar 2, 2024
@yukihirop yukihirop added the bug Something isn't working label Mar 2, 2024
@yukihirop yukihirop self-assigned this Mar 2, 2024
@yukihirop yukihirop merged commit 3dc86f7 into main Mar 2, 2024
4 checks passed
@yukihirop yukihirop deleted the fix/panic branch March 2, 2024 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ultraman panics if a process is exiting early while processing the stdio of that process
1 participant