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
LTA: giving Proc's :err wrongly-opened handle fails silently #2197
Comments
|
Still seeing this with 2020.12 . And I get the same error with the following : |
|
I can repro, I get the error |
MasterDuke17
added a commit
to MasterDuke17/MoarVM
that referenced
this issue
Apr 19, 2021
In 3734a1d it was changed to cast to `int`, but that can go negative for large values, which causes a 'Bad address' error. `raku -e 'say "H" x 2147483647' | wc` now correctly reports 2147483648 characters written. Fixes the second error reported in rakudo/rakudo#2197 (comment), but not the original error of that issue.
MasterDuke17
added a commit
to MasterDuke17/MoarVM
that referenced
this issue
Apr 19, 2021
In 3734a1d and a9cb250 they were changed to cast to `int`, but that can go negative for large values, which causes a 'Bad address' error in the write() case. `raku -e 'say "H" x 2147483647' | wc` now correctly reports 2147483648 characters written. Fixes the second error reported in rakudo/rakudo#2197 (comment), but not the original error of that issue.
MasterDuke17
added a commit
to MasterDuke17/MoarVM
that referenced
this issue
Apr 22, 2021
In 3734a1d and a9cb250 they were changed to cast to `int`, but that can go negative for large values, which causes a 'Bad address' error in the write() case. Instead, if the value is too big, pass a smaller value and take advantage of the looping we're already doing. The max value for write() was suggested by nwc10++ "by the time you're attempting to write blobs of 1G or greater, it seems a bit nuts to presume that it matters whether it's 1 system call. It's certainly not going to be atomic at any lower level" The max value for send() came from https://www.ibm.com/docs/en/ztpf/2020?topic=apis-send-send-data-connected-socket as the minimum of the maximums of the various socket types. `raku -e 'say "H" x 2147483647' | wc` now correctly reports 2147483648 characters written. Fixes the second error reported in rakudo/rakudo#2197 (comment), but not the original error of that issue.
MasterDuke17
added a commit
to MasterDuke17/MoarVM
that referenced
this issue
Apr 24, 2021
In 3734a1d and a9cb250 they were changed to cast to `int`, but that can go negative for large values, which causes a 'Bad address' error in the write() case. Instead, if the value is too big, pass a smaller value and take advantage of the looping we're already doing. The max value was suggested by nwc10++ "by the time you're attempting to write blobs of 1G or greater, it seems a bit nuts to presume that it matters whether it's 1 system call. It's certainly not going to be atomic at any lower level" and MoarVM#1474 (comment) `raku -e 'say "H" x 2147483647' | wc` now correctly reports 2147483648 characters written. Fixes the second error reported in rakudo/rakudo#2197 (comment), but not the original error of that issue.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't know if it's some quirk of the system/shell, but feels buggy:
Here, we open the handle in read mode and give it to
Proc's:out/:err.When given to
:out, we get an error about failed write, but if we give the same handle to:err, we get silence:The text was updated successfully, but these errors were encountered: