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

Port.command changes to UDP driver #42

Open
sb8244 opened this issue Jun 21, 2019 · 5 comments
Open

Port.command changes to UDP driver #42

sb8244 opened this issue Jun 21, 2019 · 5 comments

Comments

@sb8244
Copy link

sb8244 commented Jun 21, 2019

It looks like the UDP driver has changed in Erlang 21.3.8.4 which causes all Statix calls to fail. It appears that changing Port.command :gen_udp.send would fix this issue. Is there a reason to not use :gen_udp.send here? One benefit of :gen_udp.send is that the packet creation becomes a bit simpler.

21.3.8.3 - https://github.com/erlang/otp/blob/OTP-21.3.8.3/erts/preloaded/src/prim_inet.erl#L561
21.3.8.4 - https://github.com/erlang/otp/blob/OTP-21.3.8.4/erts/preloaded/src/prim_inet.erl#L568

@sb8244
Copy link
Author

sb8244 commented Jun 24, 2019

Erlang bug tracker has indicated this as "not a bug" because the interface was internal https://bugs.erlang.org/browse/ERL-982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14803#comment-14803

Statix will need to conditionally support the new driver format, or use gen_udp. I'd be happy to PR a :gen_udp swap

@jeffutter
Copy link

I've created a fork over at https://github.com/bleacherreport/statix that has a couple of commits merged in that we use. I also have a branch that fixes OTP-21.3.8.4 here: https://github.com/bleacherreport/statix/tree/otp-21.3.8.4-support I think it works, but it probably needs some cleanup and testing.

If anyone is running into this issue with OTP-21.3.8.4 and wants to give it a try that would be appreciated.

samschlegel added a commit to discord/instruments that referenced this issue Jul 30, 2019
This is needed for compatibility with newer ERTS releases
lexmag/statix#42. We should also look into
maybe using bleacherreport's fork as I'm not a fan of calling
Port.command directly instead of using `:gen_udp.send`
@Shayon
Copy link

Shayon commented Sep 4, 2019

@lexmag Do you feel confident this library will end up solving this issue? Or should I be looking elsewhere?

@dcaixinha
Copy link

Beyond the Erlang/OTP versions affected by this bug reported by @sb8244, I was just bitten by this on Erlang/OTP 21.3.8.6: https://github.com/erlang/otp/blob/OTP-21.3.8.6/erts/preloaded/src/prim_inet.erl#L568

Upgrading to v1.2.1 fixed it, so I guess this issue could be closed @lexmag?

zorkian pushed a commit to discord/instruments that referenced this issue Dec 27, 2019
This is needed for compatibility with newer ERTS releases
lexmag/statix#42. We should also look into
maybe using bleacherreport's fork as I'm not a fan of calling
Port.command directly instead of using `:gen_udp.send`
@renatoaguiar
Copy link

It is happening again with OTP26: erlang/otp#7130

Any plans to move to :gen_udp.send?

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

No branches or pull requests

5 participants