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 bug in S3 where it ignores EOF #1178

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

allada
Copy link
Member

@allada allada commented Jul 19, 2024

Fixes an upload bug where it blindly accepts data without receiving EOF.


This change is Reviewable

Copy link
Member Author

@allada allada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+@aaronmondal

Reviewable status: 0 of 1 LGTMs obtained, and pending CI: Analyze (javascript-typescript), Analyze (python), Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Cargo Dev / ubuntu-22.04, Installation / macos-13, Installation / macos-14, Installation / ubuntu-22.04, Local / ubuntu-22.04, Publish image, Publish nativelink-worker-init, Publish nativelink-worker-lre-cc, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), macos-13, pre-commit-checks, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, vale, windows-2022 / stable (waiting on @aaronmondal)

Copy link
Member

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aww there goes my reason to implement fuzzing lol

:lgtm:

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: 1 of 1 LGTMs obtained, and pending CI: Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Cargo Dev / ubuntu-22.04, Installation / macos-13, Installation / macos-14, Installation / ubuntu-22.04, Publish image, Publish nativelink-worker-init, Publish nativelink-worker-lre-cc, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), macos-13, ubuntu-20.04 / stable, ubuntu-22.04, ubuntu-22.04 / stable, windows-2022 / stable, and 2 discussions need to be resolved


nativelink-store/src/s3_store.rs line 422 at r1 (raw file):

                                .map_ok_or_else(|e| Err(make_err!(Code::Aborted, "{e:?}")), |_| Ok(())),
                            // Stream all data from the reader channel to the writer channel.
                            tx.bind_bufferd(reader_ref)

nit: buffered


nativelink-util/src/buf_channel.rs line 134 at r1 (raw file):

                    .recv()
                    .await
                    .err_tip(|| "In DropCloserWriteHalf::bind::recv::eof")?;

nit: I believe this error message needs to be adjusted since the logs emitted via tracing already contain the function.

If this manual handling is intentional, we might want to be careful to ensure that we're referencing the correct symbol. Technically we're not raising this message in the implementation of ::eof.

@allada allada force-pushed the fixed-s3-ignoring-eof branch from a749a66 to 16cd589 Compare July 19, 2024 20:10
Fixes an upload bug where it blindly accepts data without
receiving EOF.
@allada allada force-pushed the fixed-s3-ignoring-eof branch from 16cd589 to f3e9863 Compare July 19, 2024 20:11
Copy link
Member Author

@allada allada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 1 of 1 LGTMs obtained, and pending CI: pre-commit-checks


nativelink-store/src/s3_store.rs line 422 at r1 (raw file):

Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…

nit: buffered

Done.


nativelink-util/src/buf_channel.rs line 134 at r1 (raw file):

Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…

nit: I believe this error message needs to be adjusted since the logs emitted via tracing already contain the function.

If this manual handling is intentional, we might want to be careful to ensure that we're referencing the correct symbol. Technically we're not raising this message in the implementation of ::eof.

Done.

Copy link
Member

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 3 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: 1 of 1 LGTMs obtained, and pending CI: Bazel Dev / ubuntu-22.04, Cargo Dev / macos-13, Installation / macos-13, Installation / macos-14, Installation / ubuntu-22.04, Publish image, Publish nativelink-worker-init, Publish nativelink-worker-lre-cc, Remote / large-ubuntu-22.04, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), integration-tests (20.04), integration-tests (22.04), macos-13, ubuntu-22.04, windows-2022 / stable

@allada allada merged commit f3e58a2 into TraceMachina:main Jul 19, 2024
29 checks passed
@allada allada deleted the fixed-s3-ignoring-eof branch July 19, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants