rasdaemon icon indicating copy to clipboard operation
rasdaemon copied to clipboard

ras-mc-ctl --layout makes use of unititialized values and shows 0 MB

Open evils opened this issue 3 years ago • 1 comments

occurs in my nix package which uses v0.6.6-21-gb4764d4 (current master HEAD) running on nixos-unstable (plus that PR)

> ras-mc-ctl --layout                                                                                   
Use of uninitialized value $max_pos[3] in modulus (%) at /run/current-system/sw/bin/ras-mc-ctl line 882.
Use of uninitialized value $d in numeric ge (>=) at /run/current-system/sw/bin/ras-mc-ctl line 883.
Use of uninitialized value $d in sprintf at /run/current-system/sw/bin/ras-mc-ctl line 886.
Use of uninitialized value $pos[3] in join or string at /run/current-system/sw/bin/ras-mc-ctl line 805.
Use of uninitialized value $pos[3] in join or string at /run/current-system/sw/bin/ras-mc-ctl line 805.
Use of uninitialized value $pos[3] in join or string at /run/current-system/sw/bin/ras-mc-ctl line 805.
Use of uninitialized value $pos[3] in join or string at /run/current-system/sw/bin/ras-mc-ctl line 805.
Use of uninitialized value $pos[3] in join or string at /run/current-system/sw/bin/ras-mc-ctl line 805.
Use of uninitialized value $pos[3] in join or string at /run/current-system/sw/bin/ras-mc-ctl line 805.
Use of uninitialized value $pos[3] in join or string at /run/current-system/sw/bin/ras-mc-ctl line 805.
Use of uninitialized value $pos[3] in join or string at /run/current-system/sw/bin/ras-mc-ctl line 805.
    +-----------------------------------------------------------------------------------------------+
    |                                              mc0                                              |
    |        csrow0         |        csrow1         |        csrow2         |        csrow3         |
    | channel0  | channel1  | channel0  | channel1  | channel0  | channel1  | channel0  | channel1  |
----+-----------------------------------------------------------------------------------------------+

0: |     0 MB  |     0 MB  |     0 MB  |     0 MB  |     0 MB  |     0 MB  |     0 MB  |     0 MB  |
----+-----------------------------------------------------------------------------------------------+

i'm not familiar with perl, but it doesn't seem impossible the perl interpreter in nixpkgs is set to be a bit more strict/verbose than the one used to develop this script

i also suspect the result of the script is incorrect, as i do in fact have memory in my system (ryzen 7 2700 with two 16gb sticks of unregistered ECC RAM on separate channels (asrock b450m pro4))

i do seem to recall getting some non-zero result from this script on NixOS on this hardware, but can't seem to replicate it, maybe this is due to now running on a newer kernel? (i think i also set up an attempt at /etc/ras/{mainboard, dimm_labels.d} since then)

evils avatar May 18 '21 07:05 evils

submitted patch "https://patchwork.kernel.org/project/linux-edac/patch/[email protected]/" to fix the issue.

ghost avatar Aug 11 '21 07:08 ghost

this appears to be fixed in 0.6.8

evils avatar Nov 02 '22 19:11 evils