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
Sometimes during node shutdown we see such Slogan:
Slogan: System process <0.0.0> terminated: {badarg,[{erlang,halt,[undefined,undefined],[{error_info,#{cause=>badopt,module=>erl_erts_errors}}]},{erlang,halt,0,[]}]}
It seems that when init.erl calls halt() as the last step of shutdown, somehow it results in a halt(undefined, undefined)
There seem to be a possibility for race in BIF halt_2. If two or more calls are done "at the same time" only one will succeed the cmpxchg operation in erts_halt() at
if (-1==erts_atomic32_cmpxchg_acqb(&erts_halt_progress,
the other(s) will return from erts_halt and may actually do the scheduled halt(undefined,undefined) call, which is not supposed to happen, before the scheduler gets halted.
#8640 is a proposed fix that suspends the calling process.
Describe the bug
Sometimes during node shutdown we see such Slogan:
It seems that when init.erl calls halt() as the last step of shutdown, somehow it results in a halt(undefined, undefined)
We think it is caused by this line https://github.com/erlang/otp/blob/OTP-26.2.3/erts/emulator/beam/bif.c?fbclid=IwZXh0bgNhZW0CMTEAAR3G8wFBshuPgBzFHroABMARgLPYBKZZpU42C_f6CAwxYnTxsRIAT_a__l4_aem_sExFv1tZJSqb_KTxH1r0LQ#L4307
but not sure in which situation the line will (should) be called
To Reproduce
We haven't a way to reproduce it yet, just wonder what can be the cause so we can dive deeper, thanks!
Expected behavior
The node should be shut down gracefully
Affected versions
26.2.1
The text was updated successfully, but these errors were encountered: