Skip to content

Segmentation fault #900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nemobis opened this issue Nov 20, 2019 · 6 comments
Closed

Segmentation fault #900

nemobis opened this issue Nov 20, 2019 · 6 comments
Labels
NEEDINFO Need more information from reporter

Comments

@nemobis
Copy link

nemobis commented Nov 20, 2019

$ lscpu
Segmentation fault

lscpu from util-linux 2.33.1
Linux 4.14.154-grsec-kapsi #1 SMP Sat Nov 16 21:42:59 EET 2019 x86_64 GNU/Linux
Dell R6515: AMD EPYC 7402P 2,8 GHz 24C/48T

Cf. lscpu crashs when /dev/mem is not stable to read , lscpu crashes on certain arm64 devices. I cannot test with another kernel or higher privileges, sorry.

@karelzak karelzak added the NEEDINFO Need more information from reporter label Nov 20, 2019
@karelzak
Copy link
Collaborator

Can you try "strace -e open,openat lscpu"? It sounds you have no /sys/firmware/dmi/tables/DMI at all.

@karelzak
Copy link
Collaborator

And do you have /sys/firmware/efi directory?

It sounds like on your system lscpu don't found /sys/firmware/dmi/tables/DMI, and then it found efi (/sys/firmware/efi/systab) and and it tries to read /dev/mem according stuff from the firmware.

For example on Cortex-A9:

stat64("/sys/firmware/dmi/tables/DMI", 0xbeff8ef0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/firmware/efi/systab", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/proc/efi/systab", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)

this is expected (no efi, no dmi, ignore /dev/mem).

@karelzak
Copy link
Collaborator

karelzak commented Nov 20, 2019

Uf, I see "AMD EPYC" ... it does not sound like ARM.

@nemobis
Copy link
Author

nemobis commented Nov 20, 2019 via email

@karelzak
Copy link
Collaborator

It's expected that /sys/firmware/dmi/tables/DMI is readable for root only. In this case it falls back to EFI, and if EFI not readable than it tries some hardcoded addresses in /dev/mem (for x86_64 and i386). It should be visible in strace output.

It seems your kernel use grsecurity, maybe it's reason why you see the problem.

Anyway, we need more information -- why and where in code it segfault. For now it's too generic report :-)

@nemobis
Copy link
Author

nemobis commented Nov 21, 2019

Anyway, we need more information -- why and where in code it segfault. For now it's too generic report :-)

Indeed, thank you. I'm only a user of this machine, so let's close this. If anyone in a similar situation is interested, now they know how to report it.

@nemobis nemobis closed this as completed Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NEEDINFO Need more information from reporter
Projects
None yet
Development

No branches or pull requests

2 participants