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

V4.1 - XMRIG throws SIGSEGV (Address boundary error) #1424

Closed
ajboni opened this issue Mar 24, 2021 · 6 comments
Closed

V4.1 - XMRIG throws SIGSEGV (Address boundary error) #1424

ajboni opened this issue Mar 24, 2021 · 6 comments

Comments

@ajboni
Copy link

ajboni commented Mar 24, 2021

Describe the bug
It was all wotking great before ROCm v4.1 now it gives me the following error:

~/crypto/xmrig-6.10.0  sudo ./xmrig                                                                                                                                             02:12:46
 * ABOUT        XMRig/6.10.0 gcc/9.3.0
 * LIBS         libuv/1.41.0 OpenSSL/1.1.1j hwloc/2.4.1
 * HUGE PAGES   supported
 * 1GB PAGES    supported
 * CPU          AMD Ryzen 7 2700 Eight-Core Processor (1) 64-bit AES
                L2:4.0 MB L3:16.0 MB 8C/16T NUMA:1
 * MEMORY       4.4/15.6 GB (28%)
                DIMM_A1: <empty>
                DIMM_A2: 8 GB DDR4 @ 2400 MHz 9905702-012.A00G    
                DIMM_B1: <empty>
                DIMM_B2: 8 GB DDR4 @ 2400 MHz 9905702-012.A00G    
 * MOTHERBOARD  ASUSTeK COMPUTER INC. - PRIME B450M-A
 * DONATE       1%
 * ASSEMBLY     ryzen
 * POOL #1      haven.herominers.com:10451 algo cn-heavy/xhv
 * COMMANDS     hashrate, pause, resume, results, connection
 * ADL          press e for health report
 * OPENCL       #0 AMD Accelerated Parallel Processing/OpenCL 2.0 AMD-APP (3241.0)
 * OPENCL GPU   #0 08:00.0 Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (gfx803) 1405 MHz cu:36 mem:6963/8192 MB
 * CUDA         disabled
[2021-03-24 02:13:23.679]  net      use pool haven.herominers.com:10451 TLSv1.2 168.119.11.231
[2021-03-24 02:13:23.679]  net      fingerprint (SHA-256): "fece0801e2afe588c90685d695abe4948126c1bde1a41b654fda89de59eca276"
[2021-03-24 02:13:23.679]  net      new job from haven.herominers.com:10451 diff 30000 algo cn-heavy/xhv height 817791
[2021-03-24 02:13:23.683]  msr      register values for "ryzen_17h" preset have been set successfully (4 ms)
[2021-03-24 02:13:23.683]  cpu      use profile  cn-heavy  (4 threads) scratchpad 4096 KB
[2021-03-24 02:13:23.684]  opencl   use profile  cn-heavy  (2 threads) scratchpad 4096 KB
|  # | GPU |  BUS ID | INTENSITY | WSIZE | MEMORY | NAME
|  0 |   0 | 08:00.0 |       864 |     8 |   3456 | Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (gfx803)
|  1 |   0 | 08:00.0 |       864 |     8 |   3456 | Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (gfx803)
[2021-03-24 02:13:23.834]  cpu      READY threads 4/4 (4) huge pages 100% 8/8 memory 16384 KB (151 ms)
fish: Job 1, 'sudo ./xmrig' terminated by signal SIGSEGV (Address boundary error)
 139  ~/crypto/xmrig-6.10.0                                                                                                                                            1598ms  02:13:24

 ~/crypto/xmrig-6.10.0  /opt/rocm/bin/rocminfo                                                                                                                                   02:16:26
ROCk module is loaded
=====================    
HSA System Attributes    
=====================    
Runtime Version:         1.1
System Timestamp Freq.:  1000.000000MHz
Sig. Max Wait Duration:  18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count)
Machine Model:           LARGE                              
System Endianness:       LITTLE                             

==========               
HSA Agents               
==========               
*******                  
Agent 1                  
*******                  
  Name:                    AMD Ryzen 7 2700 Eight-Core Processor
  Uuid:                    CPU-XX                             
  Marketing Name:          AMD Ryzen 7 2700 Eight-Core Processor
  Vendor Name:             CPU                                
  Feature:                 None specified                     
  Profile:                 FULL_PROFILE                       
  Float Round Mode:        NEAR                               
  Max Queue Number:        0(0x0)                             
  Queue Min Size:          0(0x0)                             
  Queue Max Size:          0(0x0)                             
  Queue Type:              MULTI                              
  Node:                    0                                  
  Device Type:             CPU                                
  Cache Info:              
    L1:                      32768(0x8000) KB                   
  Chip ID:                 0(0x0)                             
  Cacheline Size:          64(0x40)                           
  Max Clock Freq. (MHz):   3200                               
  BDFID:                   0                                  
  Internal Node ID:        0                                  
  Compute Unit:            16                                 
  SIMDs per CU:            0                                  
  Shader Engines:          0                                  
  Shader Arrs. per Eng.:   0                                  
  WatchPts on Addr. Ranges:1                                  
  Features:                None
  Pool Info:               
    Pool 1                   
      Segment:                 GLOBAL; FLAGS: KERNARG, FINE GRAINED
      Size:                    16392024(0xfa1f58) KB              
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Alignment:         4KB                                
      Accessible by all:       TRUE                               
    Pool 2                   
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED      
      Size:                    16392024(0xfa1f58) KB              
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Alignment:         4KB                                
      Accessible by all:       TRUE                               
  ISA Info:                
    N/A                      
*******                  
Agent 2                  
*******                  
  Name:                    gfx803                             
  Uuid:                    GPU-XX                             
  Marketing Name:          Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
  Vendor Name:             AMD                                
  Feature:                 KERNEL_DISPATCH                    
  Profile:                 BASE_PROFILE                       
  Float Round Mode:        NEAR                               
  Max Queue Number:        128(0x80)                          
  Queue Min Size:          4096(0x1000)                       
  Queue Max Size:          131072(0x20000)                    
  Queue Type:              MULTI                              
  Node:                    1                                  
  Device Type:             GPU                                
  Cache Info:              
    L1:                      16(0x10) KB                        
  Chip ID:                 26591(0x67df)                      
  Cacheline Size:          64(0x40)                           
  Max Clock Freq. (MHz):   1405                               
  BDFID:                   2048                               
  Internal Node ID:        1                                  
  Compute Unit:            36                                 
  SIMDs per CU:            4                                  
  Shader Engines:          4                                  
  Shader Arrs. per Eng.:   1                                  
  WatchPts on Addr. Ranges:4                                  
  Features:                KERNEL_DISPATCH 
  Fast F16 Operation:      FALSE                              
  Wavefront Size:          64(0x40)                           
  Workgroup Max Size:      1024(0x400)                        
  Workgroup Max Size per Dimension:
    x                        1024(0x400)                        
    y                        1024(0x400)                        
    z                        1024(0x400)                        
  Max Waves Per CU:        40(0x28)                           
  Max Work-item Per CU:    2560(0xa00)                        
  Grid Max Size:           4294967295(0xffffffff)             
  Grid Max Size per Dimension:
    x                        4294967295(0xffffffff)             
    y                        4294967295(0xffffffff)             
    z                        4294967295(0xffffffff)             
  Max fbarriers/Workgrp:   32                                 
  Pool Info:               
    Pool 1                   
      Segment:                 GLOBAL; FLAGS: COARSE GRAINED      
      Size:                    8388608(0x800000) KB               
      Allocatable:             TRUE                               
      Alloc Granule:           4KB                                
      Alloc Alignment:         4KB                                
      Accessible by all:       FALSE                              
    Pool 2                   
      Segment:                 GROUP                              
      Size:                    64(0x40) KB                        
      Allocatable:             FALSE                              
      Alloc Granule:           0KB                                
      Alloc Alignment:         0KB                                
      Accessible by all:       FALSE                              
  ISA Info:                
    ISA 1                    
      Name:                    amdgcn-amd-amdhsa--gfx803          
      Machine Models:          HSA_MACHINE_MODEL_LARGE            
      Profiles:                HSA_PROFILE_BASE                   
      Default Rounding Mode:   NEAR                               
      Default Rounding Mode:   NEAR                               
      Fast f16:                TRUE                               
      Workgroup Max Size:      1024(0x400)                        
      Workgroup Max Size per Dimension:
        x                        1024(0x400)                        
        y                        1024(0x400)                        
        z                        1024(0x400)                        
      Grid Max Size:           4294967295(0xffffffff)             
      Grid Max Size per Dimension:
        x                        4294967295(0xffffffff)             
        y                        4294967295(0xffffffff)             
        z                        4294967295(0xffffffff)             
      FBarrier Max Size:       32                                 
*** Done ***             
 ~/crypto/xmrig-6.10.0             

I really don't know how to troubleshoot this.
Thanks

@ROCmSupport
Copy link

Thanks @ajboni for reaching out.
I can not comment on gfx8 device as we are not supporting it officially.
But I will try to reproduce this on gfx9 device like Vega10 and share an update.
Before that, I need the exact steps to reproduce the problem.
Thank you.

@ajboni
Copy link
Author

ajboni commented Mar 24, 2021

Thanks! here are the steps:

  1. (uninstall old rocm version)
  2. Install latest rocm
  3. wget https://github.com/xmrig/xmrig/releases/download/v6.10.0/xmrig-6.10.0-linux-x64.tar.gz
  4. tar -xf xmrig-6.10.0-linux-x64.tar.gz
  5. cd xmrig-6.10.0/
  6. edit config.json and set opencl to true
  7. run ./xmrig

@ROCmSupport
Copy link

ROCmSupport commented Mar 25, 2021

After changing opencl to "true" also, its no detecting in my case.
Please help me with resolving this issue.

taccuser@taccuser-X399-DESIGNARE-EX:~/xmrig-6.10.0$ ./xmrig

  • ABOUT XMRig/6.10.0 gcc/5.4.0
  • LIBS libuv/1.41.0 OpenSSL/1.1.1j hwloc/2.4.1
  • HUGE PAGES supported
  • 1GB PAGES disabled
  • CPU AMD Ryzen Threadripper 2990WX 32-Core Processor (1) 64-bit AES
    L2:16.0 MB L3:64.0 MB 32C/64T NUMA:4
  • MEMORY 1.7/31.3 GB (5%)
  • DONATE 1%
  • ASSEMBLY auto:ryzen
  • POOL README.md cleanup from release #1 donate.v2.xmrig.com:3333 algo auto
  • COMMANDS hashrate, pause, resume, results, connection
    [2021-03-25 15:36:19.307] config configuration saved to: "/home/taccuser/xmrig-6.10.0/config.json"
    OPENCL disabled (failed to load OpenCL runtime)
  • CUDA disabled
    [2021-03-25 15:36:19.720] net use pool donate.v2.xmrig.com:3333 199.247.27.41
    [2021-03-25 15:36:19.720] net new job from donate.v2.xmrig.com:3333 diff 1000K algo rx/0 height 2324610
    [2021-03-25 15:36:19.720] cpu use argon2 implementation AVX2
    [2021-03-25 15:36:19.799] msr msr kernel module is not available
    [2021-03-25 15:36:19.799] msr FAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW
    [2021-03-25 15:36:19.799] randomx init dataset algo rx/0 (64 threads) seed fdedc07141ec5024...
    [2021-03-25 15:36:19.800] randomx #0 allocated 2080 MB huge pages 0% (1 ms)
    [2021-03-25 15:36:19.802] randomx #0 allocated 256 MB huge pages 0% +JIT (2 ms)
    [2021-03-25 15:36:19.802] randomx -- allocated 2336 MB huge pages 0% 0/1168 (3 ms)
    [2021-03-25 15:36:24.080] randomx #0 dataset ready (4278 ms)
    [2021-03-25 15:36:24.081] cpu use profile rx (32 threads) scratchpad 2048 KB
    [2021-03-25 15:36:24.082] CPU rocm 1.1.1 removed rocm-smi #16 warning: "can't bind memory"

@ajboni
Copy link
Author

ajboni commented Mar 27, 2021

I tried blender and its showing no compatible GPU
also clinfo ends with ERROR: clBuildProgram(-11)
I've read RX580 is no longer supported on v4, is there any way to go back to previous version?

Thanks!

clinfo                                                                                                                                                                       15:45:43
Number of platforms:				 1
  Platform Profile:				 FULL_PROFILE
  Platform Version:				 OpenCL 2.0 AMD-APP (3241.0)
  Platform Name:				 AMD Accelerated Parallel Processing
  Platform Vendor:				 Advanced Micro Devices, Inc.
  Platform Extensions:				 cl_khr_icd cl_amd_event_callback 


  Platform Name:				 AMD Accelerated Parallel Processing
Number of devices:				 1
  Device Type:					 CL_DEVICE_TYPE_GPU
  Vendor ID:					 1002h
  Board name:					 Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
  Device Topology:				 PCI[ B#8, D#0, F#0 ]
  Max compute units:				 36
  Max work items dimensions:			 3
    Max work items[0]:				 1024
    Max work items[1]:				 1024
    Max work items[2]:				 1024
  Max work group size:				 256
  Preferred vector width char:			 4
  Preferred vector width short:			 2
  Preferred vector width int:			 1
  Preferred vector width long:			 1
  Preferred vector width float:			 1
  Preferred vector width double:		 1
  Native vector width char:			 4
  Native vector width short:			 2
  Native vector width int:			 1
  Native vector width long:			 1
  Native vector width float:			 1
  Native vector width double:			 1
  Max clock frequency:				 1405Mhz
  Address bits:					 64
  Max memory allocation:			 7301444400
  Image support:				 Yes
  Max number of images read arguments:		 128
  Max number of images write arguments:		 8
  Max image 2D width:				 16384
  Max image 2D height:				 16384
  Max image 3D width:				 16384
  Max image 3D height:				 16384
  Max image 3D depth:				 8192
  Max samplers within kernel:			 26591
  Max size of kernel argument:			 1024
  Alignment (bits) of base address:		 1024
  Minimum alignment (bytes) for any datatype:	 128
  Single precision floating point capability
    Denorms:					 No
    Quiet NaNs:					 Yes
    Round to nearest even:			 Yes
    Round to zero:				 Yes
    Round to +ve and infinity:			 Yes
    IEEE754-2008 fused multiply-add:		 Yes
  Cache type:					 Read/Write
  Cache line size:				 64
  Cache size:					 16384
  Global memory size:				 8589934592
  Constant buffer size:				 7301444400
  Max number of constant args:			 8
  Local memory type:				 Scratchpad
  Local memory size:				 65536
  Max pipe arguments:				 16
  Max pipe active reservations:			 16
  Max pipe packet size:				 3006477104
  Max global variable size:			 7301444400
  Max global variable preferred total size:	 8589934592
  Max read/write image args:			 64
  Max on device events:				 1024
  Queue on device max size:			 8388608
  Max on device queues:				 1
  Queue on device preferred size:		 262144
  SVM capabilities:				 
    Coarse grain buffer:			 Yes
    Fine grain buffer:				 Yes
    Fine grain system:				 No
    Atomics:					 No
  Preferred platform atomic alignment:		 0
  Preferred global atomic alignment:		 0
  Preferred local atomic alignment:		 0
ERROR: clBuildProgram(-11)

@briansp2020
Copy link

I think you can point to the previous version of repo directly (see #768 (comment))

So, instead of

echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/debian/ xenial main' | sudo tee /etc/apt/sources.list.d/rocm.list

Do

echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/3.9.1/ xenial main' | sudo tee /etc/apt/sources.list.d/rocm.list

@ajboni
Copy link
Author

ajboni commented Mar 28, 2021

Thanks!
Tried to get back, but I face a lot of dependencies issues and couldnt even got clinfo to work.
I finally gave up and went with standard amdgpu-pro
./amdgpu-pro-install --opencl=legacy,pal --headless --no-dkms

@ajboni ajboni closed this as completed Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants