You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It's technically not a bug as the inetrc Kernel variable is documented to be a string:
inetrc = Filename - The name (string) of an Inet user configuration file. For details, see section Inet Configuration in the ERTS User's Guide.
However, something has changed in OTP-27 that should be improved at least a bit: the error message.
We have been testing that using an atom works in the RabbitMQ test suite because some users were using atoms (it turns out that the RabbitMQ documentation was telling people to use single quotes, whoops). It breaks for OTP-27. I understand we should have been telling people to use double quotes, and that's fine to require that change.
What isn't expected however is to have so many obscure crashes when you provide an invalid value for the filename. Since using erl -kernel inetrc \"$FILE\" is a documented way of setting this value, and it's so easy to confuse single and double quotes (especially coming from outside the Erlang world), the VM should probably validate and error out early instead of the below.
In OTP-26 we could set inetrc as an atom:
$ cat /tmp/inetrc-ipv6.erl
{inet6,true}.
$ erl -kernel inetrc \'/tmp/inetrc-ipv6.erl\'
Erlang/OTP 26 [erts-14.2.5.2] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]
Eshell V14.2.5.2 (press Ctrl+G to abort, type help(). for help)
1>
Additional context
We will fix the RabbitMQ documentation. We will probably tell people to use the ERL_INETRC environment variable as it's less likely to lead to errors.
The text was updated successfully, but these errors were encountered:
Thanks for your report, I've opened a draft PR #8902 for maint that restores the old behavior specifically for this argument. I figured that it's better to do so than to raise an error, as the latter is bound to get very confusing regardless of how we word it.
Describe the bug
It's technically not a bug as the inetrc Kernel variable is documented to be a string:
However, something has changed in OTP-27 that should be improved at least a bit: the error message.
We have been testing that using an atom works in the RabbitMQ test suite because some users were using atoms (it turns out that the RabbitMQ documentation was telling people to use single quotes, whoops). It breaks for OTP-27. I understand we should have been telling people to use double quotes, and that's fine to require that change.
What isn't expected however is to have so many obscure crashes when you provide an invalid value for the filename. Since using
erl -kernel inetrc \"$FILE\"
is a documented way of setting this value, and it's so easy to confuse single and double quotes (especially coming from outside the Erlang world), the VM should probably validate and error out early instead of the below.In OTP-26 we could set
inetrc
as an atom:In OTP-27 we get horrible crashes:
Expected behavior
Better errors.
Affected versions
OTP-27.
Additional context
We will fix the RabbitMQ documentation. We will probably tell people to use the
ERL_INETRC
environment variable as it's less likely to lead to errors.The text was updated successfully, but these errors were encountered: