statix icon indicating copy to clipboard operation
statix copied to clipboard

Broken in Erlang 26 (Port.command / :port_command)

Open lucas-nelson opened this issue 1 year ago • 4 comments

Running in Elixir 1.14.5 and Erlang 26.0, I was experiencing the call to increment hanging, and then other calls in other processes erroring with lost value 1 due to port closure.

Trying to work out what was going on, I got down to:

iex(1)> init_conn = Statix.Conn.new(System.get_env("STATSD_HOST"), String.to_integer(System.get_env("STATSD_PORT")))
%Statix.Conn{sock: nil, header: [1, 31, 189, 172, 16, 138, 8, 0, 0, 0, 0]}
iex(2)> open_conn = Statix.Conn.open(init_conn)
%Statix.Conn{
  sock: #Port<0.27>,
  header: [1, 31, 189, 172, 16, 138, 8, 0, 0, 0, 0]
}
iex(3)> Statix.Conn.transmit(open_conn, :counter, "counter.testing", "1", [])
** (EXIT from #PID<0.857.0>) shell process exited with reason: :einval

This seems related to https://github.com/erlang/otp/issues/7130 which won't be fixed.

After downgrading to Erlang 25, that sequence above works with an :ok result.

Is this project still maintained? Could the call to Port.command be changed / fixed?

lucas-nelson avatar Jun 15 '23 07:06 lucas-nelson

We're seeing the same thing

aselder avatar Jun 15 '23 17:06 aselder

same

hexchung avatar Jun 16 '23 18:06 hexchung

@lexmag I have the same problem.

Stanislav-Lapata avatar Jul 02 '23 20:07 Stanislav-Lapata

Same thing here

Billzabob avatar Jul 06 '23 17:07 Billzabob