You are not logged in.

#1 2019-06-25 13:41:42

vic-t
Member
Registered: 2016-12-11
Posts: 28

Ethminer crashes Arch

More for the purposes of curiousity than anything else, I'd like to have a go at mining. Which means I'm absolutely new to this.

I have an updated Arch Linux with an AMD Vega64 card installed, I'm using the free AMDGPU driver.

# sudo pacman -Qs amdgpu
local/amdgpu-core-meta 19.20_812932-1 (Radeon_Software_for_Linux)
    Config file /etc/ld.so.conf.d/20-amdgpu.conf
local/lib32-libdrm-amdgpu 19.20_812932-1 (Radeon_Software_for_Linux)
    Userspace interface to amdgpu-specific kernel DRM services -- runtime (32-bit)
local/libdrm-amdgpu 19.20_812932-1 (Radeon_Software_for_Linux)
    Userspace interface to amdgpu-specific kernel DRM services -- runtime
local/xf86-video-amdgpu 19.0.1-1 (xorg-drivers)
    X.org amdgpu video driver

As I understand, ethminer needs OpenCL to work, so in accordance with the Wiki I installed the packages opencl-mesa, ocl-icd, and clinfo. clinfo now shows 1 platform (called clover) but ethminer crashes because it cannot use OpenCL 1.1 which is what opencl-mesa installed, apparently.

Staying in the wiki, it seems that for Vega cards, one needs to use the "rocm" OpenCL drivers. So, from AUR, I downloaded and installed the following packages:

  • roct-thunk-interface (dependency for rocr-runtime)

  • rocr-runtime (depencency for rocm-opencl-runtime)

  • rocm-opencl-runtime

Now, clinfo will show 2 platforms:

 $ clinfo
Number of platforms                               2
  Platform Name                                   AMD Accelerated Parallel Processing
  Platform Vendor                                 Advanced Micro Devices, Inc.
  Platform Version                                OpenCL 2.0 AMD-APP.internal (2874.0)
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd cl_amd_object_metadata cl_amd_event_callback
  Platform Max metadata object keys (AMD)         8
  Platform Extensions function suffix             AMD

  Platform Name                                   Clover
  Platform Vendor                                 Mesa
  Platform Version                                OpenCL 1.1 Mesa 19.1.0
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_icd
  Platform Extensions function suffix             MESA

  Platform Name                                   AMD Accelerated Parallel Processing
Number of devices                                 1
  Device Name                                     gfx900
  Device Vendor                                   Advanced Micro Devices, Inc.
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 2.0
  Driver Version                                  2874.0 (HSA1.1,LC)
  Device OpenCL C Version                         OpenCL C 2.0
  Device Type                                     GPU
  Device Board Name (AMD)                         Vega 10 XL/XT [Radeon RX Vega 56/64]
  Device Topology (AMD)                           PCI-E, 07:00.0
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               64
  SIMD per compute unit (AMD)                     4
  SIMD width (AMD)                                16
  SIMD instruction width (AMD)                    1
  Max clock frequency                             1630MHz
  Graphics IP (AMD)                               9.0
  Device Partition                                (core)
    Max number of sub-devices                     64
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x1024
  Max work group size                             256
  Preferred work group size (AMD)                 256
  Max work group size (AMD)                       1024
  Preferred work group size multiple              64
  Wavefront width (AMD)                           64
  Preferred / native vector sizes
    char                                                 4 / 4
    short                                                2 / 2
    int                                                  1 / 1
    long                                                 1 / 1
    half                                                 1 / 1        (cl_khr_fp16)
    float                                                1 / 1
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     No
    Infinity and NANs                             No
    Round to nearest                              No
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  Yes
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              8573157376 (7.984GiB)
  Global free memory (AMD)                        8370176 (7.982GiB)
  Global memory channels (AMD)                    64
  Global memory banks per channel (AMD)           4
  Global memory bank width (AMD)                  256 bytes
  Error Correction support                        No
  Max memory allocation                           7287183769 (6.787GiB)
  Unified memory for Host and Device              No
  Shared Virtual Memory (SVM) capabilities        (core)
    Coarse-grained buffer sharing                 Yes
    Fine-grained buffer sharing                   Yes
    Fine-grained system sharing                   No
    Atomics                                       No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       1024 bits (128 bytes)
  Preferred alignment for atomics
    SVM                                           0 bytes
    Global                                        0 bytes
    Local                                         0 bytes
  Max size for global variable                    7287183769 (6.787GiB)
  Preferred total size of global vars             8573157376 (7.984GiB)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        16384 (16KiB)
  Global Memory cache line size                   64 bytes
  Image support                                   No
    Base address alignment for 2D image buffers   0 bytes
    Pitch alignment for 2D image buffers          0 pixels
  Max number of pipe args                         16
  Max active pipe reservations                    16
  Max pipe packet size                            2992216473 (2.787GiB)
  Local memory type                               Local
  Local memory size                               65536 (64KiB)
  Local memory syze per CU (AMD)                  65536 (64KiB)
  Local memory banks (AMD)                        32
  Max number of constant args                     8
  Max constant buffer size                        7287183769 (6.787GiB)
  Preferred constant buffer size (AMD)            16384 (16KiB)
  Max size of kernel argument                     1024
  Queue properties (on host)
    Out-of-order execution                        No
    Profiling                                     Yes
  Queue properties (on device)
    Out-of-order execution                        Yes
    Profiling                                     Yes
    Preferred size                                262144 (256KiB)
    Max size                                      8388608 (8MiB)
  Max queues on device                            1
  Max events on device                            1024
  Prefer user sync for interop                    Yes
  Number of P2P devices (AMD)                     0
  P2P devices (AMD)                               (n/a)
  Profiling timer resolution                      1ns
  Profiling timer offset since Epoch (AMD)        0ns (Thu Jan  1 01:00:00 1970)
  Execution capabilities
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Thread trace supported (AMD)                  No
    Number of async queues (AMD)                  8
    Max real-time compute queues (AMD)            8
    Max real-time compute units (AMD)             64
  printf() buffer size                            4194304 (4MiB)
  Built-in kernels                                (n/a)
  Device Extensions                               cl_khr_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_gl_sharing cl_amd_device_attribute_query cl_amd_media_ops cl_amd_media_ops2 cl_khr_image2d_from_buffer cl_khr_subgroups cl_khr_depth_images cl_amd_copy_buffer_p2p cl_amd_assembly_program

  Platform Name                                   Clover
Number of devices                                 1
  Device Name                                     Radeon RX Vega (VEGA10, DRM 3.30.0, 5.1.14-arch1-1-ARCH, LLVM 8.0.0)
  Device Vendor                                   AMD
  Device Vendor ID                                0x1002
  Device Version                                  OpenCL 1.1 Mesa 19.1.0
  Driver Version                                  19.1.0
  Device OpenCL C Version                         OpenCL C 1.1
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Max compute units                               64
  Max clock frequency                             1630MHz
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
  Preferred work group size multiple              64
  Preferred / native vector sizes
    char                                                16 / 16
    short                                                8 / 8
    int                                                  4 / 4
    long                                                 2 / 2
    half                                                 8 / 8        (cl_khr_fp16)
    float                                                4 / 4
    double                                               2 / 2        (cl_khr_fp64)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
  Single-precision Floating-point support         (core)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              8573157376 (7.984GiB)
  Error Correction support                        No
  Max memory allocation                           6858525900 (6.387GiB)
  Unified memory for Host and Device              No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       32768 bits (4096 bytes)
  Global Memory cache type                        None
  Image support                                   No
  Local memory type                               Local
  Local memory size                               32768 (32KiB)
  Max number of constant args                     16
  Max constant buffer size                        2147483647 (2GiB)
  Max size of kernel argument                     1024
  Queue properties
    Out-of-order execution                        No
    Profiling                                     Yes
  Profiling timer resolution                      0ns
  Execution capabilities
    Run OpenCL kernels                            Yes
    Run native kernels                            No
  Device Extensions                               cl_khr_byte_addressable_store cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64 cl_khr_fp16


NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platform
  clCreateContext(NULL, ...) [default]            No platform
  clCreateContext(NULL, ...) [other]              Success [AMD]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 AMD Accelerated Parallel Processing
    Device Name                                   gfx900
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 AMD Accelerated Parallel Processing
    Device Name                                   gfx900
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 AMD Accelerated Parallel Processing
    Device Name                                   gfx900

If I run ethminer now, it sees the new device and seems to want to use it. Apparently, it wants to use a custom kernel which is not present in the system, so it reverts back to OpenCL. After the message "Creating mining buffer", the whole system crashes.

$ ethminer -G -P stratum1+tcp://myaddr@eu1.ethermine.org:4444
 m 14:17:17 ethminer ethminer 0.17.1
 m 14:17:17 ethminer Build: linux/release
 i 14:17:17 ethminer Found suitable OpenCL device [gfx900] with 7.984 GB of GPU memory
 i 14:17:17 ethminer Configured pool eu1.ethermine.org:4444
 i 14:17:17 main     Selected pool eu1.ethermine.org:4444
 i 14:17:17 stratum  Stratum mode detected: ETHPROXY Compatible
 i 14:17:17 stratum  Logged in!
 i 14:17:17 stratum  Established connection with eu1.ethermine.org:4444 at  [172.65.207.106:4444]
 i 14:17:17 stratum  Spinning up miners...
cl 14:17:17 cl-0     No work. Pause for 3 s.
 i 14:17:17 stratum  Job: #47ff6056… eu1.ethermine.org [172.65.207.106:4444]
 i 14:17:17 stratum  Pool difficulty: 4.00K megahash
 i 14:17:17 stratum  New epoch 267
cl 14:17:20 cl-0     Platform: AMD Accelerated Parallel Processing
cl 14:17:20 cl-0     Device:   gfx900 / OpenCL 2.0
 i 14:17:20 cl-0     Adjusting CL work multiplier for 64 CUs.Adjusted work multiplier: 116509
 i 14:17:20 stratum  Job: #c7401e96… eu1.ethermine.org [172.65.207.106:4444]
 m 14:17:22 ethminer Speed 0.00 Mh/s gpu0 0.00 A0 Time: 00:00
cl 14:17:23 cl-0     OpenCL kernel
cl 14:17:23 cl-0     Loading binary kernel /usr/bin/kernels/ethash_gfx900_lws192.bin
 X 14:17:23 cl-0     Failed to load binary kernel: /usr/bin/kernels/ethash_gfx900_lws192.bin
 X 14:17:23 cl-0     Falling back to OpenCL kernel...
cl 14:17:23 cl-0     Creating light cache buffer, size: 49.375 MB
cl 14:17:23 cl-0     Creating DAG buffer, size: 3.086 GB, free: 4.850 GB
cl 14:17:23 cl-0     Loading kernels
cl 14:17:23 cl-0     Writing light cache buffer
cl 14:17:23 cl-0     Creating buffer for header.
cl 14:17:23 cl-0     Creating mining buffer
SYSTEM CRASHES HERE

Since the kernel image ethminer is looking for (gfx900) is not present (apperently a bug upstream), I downloaded them manually and ran the whole thing again. Unfortunately, with no better result, the system crashes again at the last step (because nothing actually changes, the kernel image is not accepted by ethminer for some reason).

$ ethminer -G -P stratum1+tcp://myaddr@eu1.ethermine.org:4444 --cl-local-work 256
 m 14:47:31 ethminer ethminer 0.17.1
 m 14:47:31 ethminer Build: linux/release
 i 14:47:32 ethminer Found suitable OpenCL device [gfx900] with 7.984 GB of GPU memory
 i 14:47:32 ethminer Configured pool eu1.ethermine.org:4444
 i 14:47:32 main     Selected pool eu1.ethermine.org:4444
 i 14:47:32 stratum  Stratum mode detected: ETHPROXY Compatible
 i 14:47:32 stratum  Logged in!
 i 14:47:32 stratum  Established connection with eu1.ethermine.org:4444 at  [172.65.207.106:4444]
 i 14:47:32 stratum  Spinning up miners...
cl 14:47:32 cl-0     No work. Pause for 3 s.
 i 14:47:32 stratum  Job: #ccabbec4… eu1.ethermine.org [172.65.207.106:4444]
 i 14:47:32 stratum  Pool difficulty: 4.00K megahash
 i 14:47:32 stratum  New epoch 267
 i 14:47:33 stratum  Job: #c6fbc796… eu1.ethermine.org [172.65.207.106:4444]
 i 14:47:33 stratum  Job: #2109596d… eu1.ethermine.org [172.65.207.106:4444]
cl 14:47:35 cl-0     Platform: AMD Accelerated Parallel Processing
cl 14:47:35 cl-0     Device:   gfx900 / OpenCL 2.0
 i 14:47:35 cl-0     Adjusting CL work multiplier for 64 CUs.Adjusted work multiplier: 116509
 i 14:47:37 stratum  Job: #39d25f8d… eu1.ethermine.org [172.65.207.106:4444]
 m 14:47:37 ethminer Speed 0.00 Mh/s gpu0 0.00 A0 Time: 00:00
cl 14:47:38 cl-0     OpenCL kernel
cl 14:47:38 cl-0     Loading binary kernel /usr/bin/kernels/ethash_gfx900_lws256.bin
 X 14:47:38 cl-0     Build failed! Info:Error: runtime metadata section not present in ELF program binary

 X 14:47:38 cl-0     /usr/bin/kernels/ethash_gfx900_lws256.bin
 X 14:47:38 cl-0     Falling back to OpenCL kernel...
cl 14:47:38 cl-0     Creating light cache buffer, size: 49.375 MB
cl 14:47:38 cl-0     Creating DAG buffer, size: 3.086 GB, free: 4.850 GB
cl 14:47:39 cl-0     Loading kernels
cl 14:47:39 cl-0     Writing light cache buffer
cl 14:47:39 cl-0     Creating buffer for header.
cl 14:47:39 cl-0     Creating mining buffer

There seems to be no indication of what's going wrong in the logs. Before the reboot, all seems fine, journalctl doesn't show any errors. It seems the crash is so severe, no log is written. The only suspicious things I found are the following lines but they don't seem to pose a problem otherwise.

Jun 25 14:48:31 archlinux kernel: amdgpu 0000:07:00.0: No more image in the PCI ROM
Jun 25 14:48:31 archlinux kernel: ATOM BIOS: 113-D0500100-103
Jun 25 14:48:31 archlinux kernel: [drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size is 9-bit
Jun 25 14:48:31 archlinux kernel: amdgpu 0000:07:00.0: BAR 2: releasing [mem 0xe0000000-0xe01fffff 64bit pref]
Jun 25 14:48:31 archlinux kernel: amdgpu 0000:07:00.0: BAR 0: releasing [mem 0xd0000000-0xdfffffff 64bit pref]
Jun 25 14:48:31 archlinux kernel: pcieport 0000:06:00.0: BAR 15: releasing [mem 0xd0000000-0xe01fffff 64bit pref]
Jun 25 14:48:31 archlinux kernel: pcieport 0000:05:00.0: BAR 15: releasing [mem 0xd0000000-0xe01fffff 64bit pref]
Jun 25 14:48:31 archlinux kernel: pcieport 0000:00:02.0: BAR 15: releasing [mem 0xd0000000-0xe01fffff 64bit pref]
Jun 25 14:48:31 archlinux kernel: pcieport 0000:00:02.0: BAR 15: no space for [mem size 0x300000000 64bit pref]
Jun 25 14:48:31 archlinux kernel: pcieport 0000:00:02.0: BAR 15: failed to assign [mem size 0x300000000 64bit pref]
Jun 25 14:48:31 archlinux kernel: pcieport 0000:05:00.0: BAR 15: no space for [mem size 0x300000000 64bit pref]
Jun 25 14:48:31 archlinux kernel: pcieport 0000:05:00.0: BAR 15: failed to assign [mem size 0x300000000 64bit pref]
Jun 25 14:48:31 archlinux kernel: pcieport 0000:06:00.0: BAR 15: no space for [mem size 0x300000000 64bit pref]
Jun 25 14:48:31 archlinux kernel: pcieport 0000:06:00.0: BAR 15: failed to assign [mem size 0x300000000 64bit pref]
Jun 25 14:48:31 archlinux kernel: amdgpu 0000:07:00.0: BAR 0: no space for [mem size 0x200000000 64bit pref]
Jun 25 14:48:31 archlinux kernel: amdgpu 0000:07:00.0: BAR 0: failed to assign [mem size 0x200000000 64bit pref]
Jun 25 14:48:31 archlinux kernel: amdgpu 0000:07:00.0: BAR 2: no space for [mem size 0x00200000 64bit pref]

This is about as far as I could get by myself, I don't know what else to try. Hopefully someone can point me in the right direction.

Last edited by vic-t (2019-06-25 13:57:09)

Offline

#2 2019-06-25 19:30:15

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,830

Re: Ethminer crashes Arch

Please describe the "system crash" (ie. what happens exactly, if it's a GUI session, try the behavior on a pure console login, multi-user.target)
I could imagine the miner to drain a lot of entropy, try https://wiki.archlinux.org/index.php/Haveged (install AND enable it)

Offline

#3 2019-06-25 19:40:43

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Ethminer crashes Arch

Moving to AUR Issues...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2019-06-25 19:53:16

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,849

Re: Ethminer crashes Arch

ROCm is still a work in progress on non-supported distros and many applications can't use it yet.

You do use ethminer without cuda-support ?

Have you tried with opencl-amd ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB