Skip to content
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

CPU-X segfaults with vfio GPU #108

Closed
muncrief opened this issue Sep 13, 2019 · 8 comments
Closed

CPU-X segfaults with vfio GPU #108

muncrief opened this issue Sep 13, 2019 · 8 comments
Assignees
Labels

Comments

@muncrief
Copy link

Describe the bug/Expected behavior

I have a Radeon R9 390 GPU running with the mesa driver, and an Nvidia GT710 GPU I use for KVM passtrhough using the vfio driver. When I run cpu-x it crashes with the the following error output:

Your GPU driver is unknown: ../../../../../../bus/pci/drivers/vfio-pci

Oops, something was wrong! CPU-X has received signal 11 (Segmentation fault) and has crashed.
========================= Backtrace =========================
CPU-X 3.2.4 (Aug  7 2019 13:33:03, Linux x86_64, GNU 9.1.0)
# 1 /usr/lib/libc.so.6(+0x3a7e0) [0x7f1ec8b677e0]
# 2 /usr/lib/libc.so.6(+0x160a78) [0x7f1ec8c8da78]
# 3 cpu-x() [0x40d6b8]
# 4 cpu-x() [0x40fabf]
# 5 cpu-x() [0x40eae2]
# 6 cpu-x(fill_labels+0x5e7) [0x410527]
# 7 cpu-x(main+0x1824) [0x409864]
# 8 /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f1ec8b53ee3]
# 9 cpu-x(_start+0x2e) [0x409d3e]
======================== End Backtrace =======================

Additional information

  • Operating system name and version:
  • CPU-X installation type:
Manjaro 18.1.0 Juhraya
CPU-X installed with "yay -S cpu-x"

CPU-X dump

`Segmentation fault (core dumped)`
@TheTumultuousUnicornOfDarkness
Copy link
Owner

Hello, can you paste the cpu-x --issue-fmt output as root, please?

@muncrief
Copy link
Author

Yes, the CPU-X dump above was obtained with sudo cpu-x --issue-fmt. I also just logged in as root with su root and executed the above command and got the same output. For some reason when I run cpu-x as a normal user it outputs more information. I also tried the --issue-fmt option as a normal user but got the same backtrace as without the option. If you need me to do anything else please let me know. It's an awesome program!

@TheTumultuousUnicornOfDarkness
Copy link
Owner

Oh, the --issue-fmt option looks buggy in this version. 😞
Try with cpu-x --nocolor --verbose --dump (still as root).

@muncrief
Copy link
Author

Okay, that worked! Here it is:

Setting label names
Calling libcpuid for retrieving static data
Finding CPU technology
Calling libcpuid for retrieving CPU MSR static values
Calling dmidecode
Finding devices
Your GPU driver is unknown: ../../../../../../bus/pci/drivers/vfio-pci
Identifying running system
Calling libcpuid for retrieving dynamic data
Calling libcpuid for retrieving CPU MSR dynamic values
Calculating CPU usage
Retrieving CPU temperature in fallback mode
Calculating CPU multipliers
Calling bandwidth
Calling libprocps
Retrieving GPU clocks

Oops, something was wrong! CPU-X has received signal 11 (Segmentation fault) and has crashed.
========================= Backtrace =========================
CPU-X 3.2.4 (Aug  7 2019 13:33:03, Linux x86_64, GNU 9.1.0)
# 1 /usr/lib/libc.so.6(+0x3a7e0) [0x7f23803b37e0]
# 2 /usr/lib/libc.so.6(+0x160a78) [0x7f23804d9a78]
# 3 cpu-x() [0x40d6b8]
# 4 cpu-x() [0x40fabf]
# 5 cpu-x() [0x40eae2]
# 6 cpu-x(fill_labels+0x5e7) [0x410527]
# 7 cpu-x(main+0x1824) [0x409864]
# 8 /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f238039fee3]
# 9 cpu-x(_start+0x2e) [0x409d3e]
======================== End Backtrace =======================

@muncrief
Copy link
Author

muncrief commented Sep 13, 2019

EDIT: Oops! I forgot to turn off the NVIDIA blacklist. Here's the trace with the NVIDIA driver working.


I thought it might be useful for you if I provided a trace with vfio disabled. In this case the GT710 uses the nouveau driver and cpu-x works perfectly. Here's the good trace info:

Setting label names
Calling libcpuid for retrieving static data
Finding CPU technology
Calling libcpuid for retrieving CPU MSR static values
Calling dmidecode
Finding devices
Identifying running system
Calling libcpuid for retrieving dynamic data
Calling libcpuid for retrieving CPU MSR dynamic values
Calculating CPU usage
Retrieving CPU temperature in fallback mode
Calculating CPU multipliers
Calling bandwidth
Calling libprocps
Retrieving GPU clocks
Updating benchmark status
Dumping data...
  >>>>>>>>>> CPU <<<<<<<<<<

	***** Processor *****
          Vendor: AMD
       Code Name: Ryzen 7 (Matisse)
         Package: AM4
      Technology: 7 nm
         Voltage: 0.900 V
   Specification: AMD Ryzen 7 3700X 8-Core Processor 
          Family: 0XF
     Ext. Family: 0X17
           Model: 0X1
      Ext. Model: 0X71
           Temp.: 61.75°C
        Stepping: 0
    Instructions: HT, MMX(+), SSE(1, 2, 3, 3S, 4.1, 4.2, 4A), AVX(1, 2), FMA(3), AES, CLMUL, RdRand, AMD-V, x86-64

	***** Clocks *****
      Core Speed: 2103 MHz
      Multiplier: x21.1 (22-36)
       Bus Speed: 99.80 MHz
           Usage:   3.80 %

	***** Cache *****
         L1 Data: 8 x 32 kB, 8-way
        L1 Inst.: 8 x 32 kB, 8-way
         Level 2: 8 x 512 kB, 8-way
         Level 3: 32 MB, 

	***** * *****
       Socket(s): 1
         Core(s): 8
       Thread(s): 16


  >>>>>>>>>> Caches <<<<<<<<<<

	***** L1 Cache *****
            Size: 8 x 32 kB, 8-way associative, 64-bytes line size
           Speed: 124917.20 MB/s

	***** L2 Cache *****
            Size: 8 x 512 kB, 8-way associative, 64-bytes line size
           Speed: 127154.50 MB/s

	***** L3 Cache *****
            Size: 32 MB,  associative, 64-bytes line size
           Speed: 73486.30 MB/s


  >>>>>>>>>> Motherboard <<<<<<<<<<

	***** Motherboard *****
    Manufacturer: ASUSTeK COMPUTER INC.
           Model: TUF GAMING X570-PLUS
        Revision: Rev X.0x

	***** BIOS *****
           Brand: American Megatrends Inc.
         Version: 1005
            Date: 08/01/2019
        ROM Size: 64 kB / 16 MB

	***** Chipset *****
          Vendor: Advanced Micro Devices, Inc. [AMD]
           Model: FCH LPC Bridge


  >>>>>>>>>> Memory <<<<<<<<<<

	***** Bank 0 *****
       Reference: Corsair CMK16GX4M2Z3200C16  , 8192 MB @ 2666 MHz (DIMM DDR4)

	***** Bank 1 *****
       Reference: - - - - - - - - - - - - - - - - - - -

	***** Bank 2 *****
       Reference: Corsair CMK16GX4M2Z3200C16  , 8192 MB @ 2666 MHz (DIMM DDR4)

	***** Bank 3 *****
       Reference: - - - - - - - - - - - - - - - - - - -


  >>>>>>>>>> System <<<<<<<<<<

	***** Operating System *****
          Kernel: Linux 5.3.0-rc8-mainline
    Distribution: Manjaro Linux
        Hostname: Entropod
          Uptime: 0 days, 0 hours, 1 minutes, 51 seconds
        Compiler: cc (GCC) 9.1.0

	***** Memory *****
            Used:  1385 MB / 16304 MB
         Buffers:   439 MB / 16304 MB
          Cached:  1690 MB / 16304 MB
            Free: 12789 MB / 16304 MB
            Swap:     0 MB / 15624 MB


  >>>>>>>>>> Graphics <<<<<<<<<<

	***** Card 0 *****
          Vendor: AMD
           Model: Hawaii PRO [Radeon R9 290/390]
     Temperature: 43.00°C
           Usage: 0%
       GPU clock: 858 MHz
    Memory clock: 1500 MHz

	***** Card 1 *****
          Vendor: NVIDIA
           Model: GK208B [GeForce GT 710]
     Temperature: 37.00°C
           Usage: 
       GPU clock: 405 MHz
    Memory clock: 810 MHz


Freeing memory

@TheTumultuousUnicornOfDarkness
Copy link
Owner

Ok, I understand the problem. I think d36e869 should solve this issue (as a workaround).
I'm sorry, this is due to TODOs I need to do...

Can you test with the cpu-x-git package?

@muncrief
Copy link
Author

muncrief commented Sep 14, 2019

Oh wow, fantastic!

I just tested it and it works perfectly. It even reports that the NVIDIA GT710 exists, which is awesome. When I run it from the command line, and view the "Graphics" tab, there's a continuous info message stating "Your GPU driver is unknown: ../../../../../../bus/pci/drivers/vfio-pci", but this would help people who wonder why more detailed info isn't being displayed.

Thank you very much for fixing the problem so quickly. Do you have a PayPal donation address? As I said I love this program and would be happy to donate to its development. I don't have a lot of money but have $20 in my budget that I donate to worthy Linux projects on a rotating basis like clockwork on the 3rd of every month. I know it's not much, and I give more when I can, but I found if I don't specifically set something aside I end up conveniently forgetting to give anything :)

By the way, would it be possible to add more detailed DRAM timing info (RAS, CAS, etc.) to the program? If not do you know of any current programs that I could use? I've never found anything that outputs detailed information and always have to go into the BIOS/UEFI to see it, but then still have to wonder if it's being altered when running the OS.

Once again, thank you very much for fixing this problem so quickly.

@TheTumultuousUnicornOfDarkness
Copy link
Owner

TheTumultuousUnicornOfDarkness commented Sep 15, 2019

Also, can you give me that lspci -k when vfio-pci driver is used, please?


there's a continuous info message stating "Your GPU driver is unknown: ../../../../../../bus/pci/drivers/vfio-pci"

Ok, thanks for your feedback. It is improved in b551ecd.

Do you have a PayPal donation address? As I said I love this program and would be happy to donate to its development

No, I don't. It's very kind of you, but I can't accept donations. I appreciate that, but I don't actively maintain this software, so I prefer you spend your money for an other project.

By the way, would it be possible to add more detailed DRAM timing info (RAS, CAS, etc.) to the program?

It was a dream, but I am unable to do that, sorry. After some tests with /sys/bus/i2c/drivers/eeprom, I've decided to give up. You can find more information about that in #96.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants