[erlang-bugs] badmatch error when use cpu_sup in high load server

Yusong Gao <>
Wed Nov 13 04:28:37 CET 2013


Hello,

I got a badmatch error when use cpu_sup in high load server.

{{badmatch,{more,"~d",24,[164,6.017000e+01,1.002000e+02,1.223600e+02]}},[{cpu_sup,get_uint32_measurement,2,[{file,"cpu_sup.erl"},{line,226}]},{cpu_sup,measurement_server_loop,1,[{file,"cpu_sup.erl"},{line,585}]}]}

I read the code, and when /proc/loadavg is 252.64 163.23 74.37 127/4840
18828,

"{ok,D} = file:read(F,24)" gets 252.64 163.23 74.37 127/, and it is not
enough for io_lib:fread("~f ~f ~f ~d/~d", D).

so changing 24 to 48 may be a good idea.

Yusong Gao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20131113/f9628eb3/attachment-0001.html>


More information about the erlang-bugs mailing list