Skip to content

detect-mc-mapping.sh fails on kernel 4.10 with segfaults #15

@travisdowns

Description

@travisdowns

I am trying to run detect-mc-mapping.sh as described in the readme to detect the bank bits. I first tried on kernel 4.15 (the default for Ubuntu 16.04 with HWE), but it fails as described in issue #10.

So I booted into 4.10:

Linux 9550-linux 4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec 4 15:57:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

but now I get:

$ sudo ./detect-mc-mapping.sh 
mc-mapping: no process found
Run a background task on core1-3
./detect-mc-mapping.sh: line 7:  3982 Segmentation fault      ./mc-mapping -c 1 -i 100000000000 -b 0 -x &> /dev/null
./detect-mc-mapping.sh: line 7:  3983 Segmentation fault      ./mc-mapping -c 2 -i 100000000000 -b 0 -x &> /dev/null
./detect-mc-mapping.sh: line 7:  3984 Segmentation fault      ./mc-mapping -c 3 -i 100000000000 -b 0 -x &> /dev/null
Now run the test
Bit6: 141.80
Bit7: 140.23
Bit8: 143.74
Bit9: 144.22
Bit10: 141.69
Bit11: 144.26
Bit12: 141.70
Bit13: 140.32
Bit14: 139.21
Bit15: 145.27
Bit16: 141.87
Bit17: 140.40
Bit18: 145.22
Bit19: 143.68
Bit20: 141.45
Bit21: 145.47
Bit22: 142.03
Bit23: 139.57
mc-mapping: no process found

It seems the background processes fail to start due to segfault, which in turns makes the detection fail.

dmesg shows the following errors, corresponding to the segfaults:

[  176.603088] show_signal_msg: 15 callbacks suppressed
[  176.603090] mc-mapping[3984]: segfault at 7fdf07962ffc ip 0000000000400ca3 sp 00007ffc31b7acf0 error 4 in mc-mapping[400000+2000]
[  176.603107] x86/PAT: mc-mapping:3984 freeing invalid memtype [mem 0x80000000-0xa0ffffff]
[  176.603189] mc-mapping[3983]: segfault at 7f8b2274affc ip 0000000000400ca3 sp 00007ffdcbaf1840 error 4 in mc-mapping[400000+2000]
[  176.603201] x86/PAT: mc-mapping:3983 freeing invalid memtype [mem 0x80000000-0xa0ffffff]
[  176.603331] mc-mapping[3982]: segfault at 7f8e89419ffc ip 0000000000400ca3 sp 00007ffc97f08c70 error 4 in mc-mapping[400000+2000]
[  176.603341] x86/PAT: mc-mapping:3982 freeing invalid memtype [mem 0x80000000-0xa0ffffff]
[  181.661912] x86/PAT: mc-mapping:3987 freeing invalid memtype [mem 0x80000000-0xa0ffffff]
[  185.825739] x86/PAT: mc-mapping:3990 freeing invalid memtype [mem 0x80000000-0xa0ffffff]
[  189.889824] x86/PAT: mc-mapping:3993 freeing invalid memtype [mem 0x80000000-0xa0ffffff]
[  193.940241] x86/PAT: mc-mapping:3996 freeing invalid memtype [mem 0x80000000-0xa0ffffff]
[  198.062300] x86/PAT: mc-mapping:4001 freeing invalid memtype [mem 0x80000000-0xa0ffffff]

addr2line indicate the failure is at line 85 of mc-mapping:85:

addr2line -a 400ca3 -e mc-mapping
0x0000000000400ca3
.../mc-mapping.c:85

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions