-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Data race on ioctl #156
Comments
sio
added a commit
to sio/creack-pty
that referenced
this issue
Apr 28, 2023
When compiled with go older than 1.12 creack/pty will not include a fix for blocking Read() and will be prone to data races - but at least it will work For more information see issues: creack#88 creack#114 creack#156 creack#162
sio
added a commit
to sio/creack-pty
that referenced
this issue
Apr 28, 2023
When compiled with go older than 1.12 creack/pty will not include a fix for blocking Read() and will be prone to data races - but at least it will work For more information see issues: creack#88 creack#114 creack#156 creack#162
aymanbagabas
pushed a commit
to aymanbagabas/pty
that referenced
this issue
Sep 22, 2023
When compiled with go older than 1.12 creack/pty will not include a fix for blocking Read() and will be prone to data races - but at least it will work For more information see issues: creack#88 creack#114 creack#156 creack#162
Closed with #167 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm seeing data races when calling
pty.Setsize
, c.f. coder/coder#3236I think what's going on here is that calling
Fd()
on anos.File
is inherently racy if multiple goroutines have reference to the file. WhileRead()
andWrite()
go through the fdmutex,Fd()
does not.I believe the correct fix is to wrap calls like
ioctl
in SyscallConn.In testing this out locally, I noticed that it breaks riscv builds, which are apparently still on Go 1.6. I saw #149 mention that it should be possible to get riscv builds natively, so hopefully this isn't a blocker.
Does that sound right to you and would you be interested in a PR?
The text was updated successfully, but these errors were encountered: