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
I am using the [Alpine Erlang Docker Image|https://github.com/erlang/docker-erlang-otp/tree/3765be4573e249004e48a5de9c94127a214b1e6f/21/alpine]. I encountered the problem mentioned in the title, the root cause could be "%Lu" is not supported by Alpine OS.
I fix it by replaceing "%Lu" with "%llu" at in cpu_sup.c:362
{code:c}
sscanf(buffer, "cpu%u %Lu %Lu %Lu %Lu %Lu %Lu %Lu %Lu",
&(cpu->id),
&(cpu->user),
&(cpu->nice_user),
&(cpu->kernel),
&(cpu->idle),
&(cpu->io_wait),
&(cpu->hard_irq),
&(cpu->soft_irq),
&(cpu->steal));
return cpu;
{code}
The text was updated successfully, but these errors were encountered:
{{%L}} is a non-standard feature, supported by GNU libc but not e.g. musl. {{%ll}} is appropriate here (the code is ifdef linux so no need to switch to int64_t and SCNu64).
[~Zhouzb] I've opened a PR with the fix here: https://github.com/erlang/otp/pull/2340
In the future, if a fix is important to you to get fixed it is quicker to just submit a pr yourself.
Thanks for the bug report! The fix should be part of the next maintenance release.
Original reporter:
zhouzb
Affected version:
OTP-21.0
Fixed in version:
OTP-22.1
Component:
os_mon
Migrated from: https://bugs.erlang.org/browse/ERL-1012
The text was updated successfully, but these errors were encountered: