Open YannChemin opened 8 months ago
It might be something wrong with your dependencies. Try to build using advanced build instructions, it will create the same binary as in official releases.
I removed the previously used xmrig git directory and used these steps:
The result is the same:
free(): invalid pointer
Aborted
Is it the full output in the terminal? Nothing else? Also, can you run it under gdb and get a call stack?
Run gdb --args ./xmrig
then in console type run
and when it crashes type bt
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffee9ff6c0 (LWP 6016)]
[New Thread 0x7fffee1fe6c0 (LWP 6017)]
free(): invalid pointer
[Thread 0x7fffee1fe6c0 (LWP 6017) exited]
Thread 1 "xmrig" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0)
at ./nptl/pthread_kill.c:44
44 ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0)
at ./nptl/pthread_kill.c:44
#1 0x00007ffff7d611cf in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2 0x00007ffff7d13472 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007ffff7cfd4b2 in __GI_abort () at ./stdlib/abort.c:79
#4 0x00007ffff7cfe1ed in __libc_message (fmt=fmt@entry=0x7ffff7e7078c "%s\n") at ../sysdeps/posix/libc_fatal.c:150
#5 0x00007ffff7d6aae5 in malloc_printerr (str=str@entry=0x7ffff7e6e22c "free(): invalid pointer")
at ./malloc/malloc.c:5658
#6 0x00007ffff7d6c864 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=have_lock@entry=0)
at ./malloc/malloc.c:4432
#7 0x00007ffff7d6f1df in __GI___libc_free (mem=<optimized out>) at ./malloc/malloc.c:3367
#8 0x00007ffff7c06ea0 in ?? () from /opt/rocm-6.0.1/lib/libamdocl64.so
#9 0x00007ffff7c1035d in ?? () from /opt/rocm-6.0.1/lib/libamdocl64.so
#10 0x00007ffff7bce525 in ?? () from /opt/rocm-6.0.1/lib/libamdocl64.so
#11 0x00007ffff7bfe43e in ?? () from /opt/rocm-6.0.1/lib/libamdocl64.so
#12 0x00007ffff7ba91b5 in ?? () from /opt/rocm-6.0.1/lib/libamdocl64.so
#13 0x00007ffff7d642d7 in __pthread_once_slow (once_control=0x7ffff7cc96a0, init_routine=0x7fffeeadd8d0 <__once_proxy>)
at ./nptl/pthread_once.c:116
#14 0x00007ffff7baa23f in clIcdGetPlatformIDsKHR () from /opt/rocm-6.0.1/lib/libamdocl64.so
#15 0x00007ffff7f9c565 in ?? () from /opt/rocm-6.0.1/lib/libOpenCL.so
#16 0x00007ffff7f9e937 in ?? () from /opt/rocm-6.0.1/lib/libOpenCL.so
#17 0x00007ffff7d642d7 in __pthread_once_slow (once_control=0x7ffff7fa2100, init_routine=0x7ffff7f9e7a0)
at ./nptl/pthread_once.c:116
#18 0x00007ffff7f9cbc6 in clGetPlatformIDs () from /opt/rocm-6.0.1/lib/libOpenCL.so
#19 0x00005555557e8ea8 in xmrig::OclLib::getPlatformIDs() ()
#20 0x00005555557e994b in xmrig::OclPlatform::get() ()
#21 0x00005555557d2ac9 in xmrig::OclConfig::platform() const ()
#22 0x00005555557d4c06 in xmrig::OclConfig::generate() ()
#23 0x000055555580689c in xmrig::Config::read(xmrig::IJsonReader const&, char const*) ()
#24 0x0000555555717a98 in xmrig::Base::Base(xmrig::Process*) ()
#25 0x0000555555814489 in xmrig::Controller::Controller(xmrig::Process*) ()
#26 0x0000555555805bce in xmrig::App::App(xmrig::Process*) ()
#27 0x00005555556dcf31 in main ()
After changing opencl to false in .xmrig.conf, then it worked
#18 0x00007ffff7f9cbc6 in clGetPlatformIDs () from /opt/rocm-6.0.1/lib/libOpenCL.so
#19 0x00005555557e8ea8 in xmrig::OclLib::getPlatformIDs() ()
XMRig just calls clGetPlatformIDs
here, and then it crashes deep inside libamdocl64.so
which is not a part of XMRig. Maybe (maybe) your OpenCL headers are incompatible with .so libraries you have there, which is why you have issues when compiling XMRig locally.
Describe the bug compiling from git clone now, on a updated Debian testing today. When running the xmrig, it says "free(): invalid pointer Aborted"
To Reproduce
Expected behavior xmrig to launch The binary version (latest download) works perfectly on the computer.
Required data
Additional context
theconf4xmrig.json