Exactly the same issue here! For me it was the nomachine
package installed from chaotic-aur that was causing problems.
How did I figure it out? You need to debug execution using gdb:
(note: output is redacted heavily to increase readability)
$ gdb --args host google.com
GNU gdb (GDB) 15.2
Enable debuginfod for this session? (y or [n]) y
(gdb) run
Starting program: /usr/bin/host google.com
free(): invalid pointer
Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007ffff7d24463 in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:78
#2 0x00007ffff7ccb120 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007ffff7cb24c3 in __GI_abort () at abort.c:79
#4 0x00007ffff7cb3354 in __libc_message_impl (fmt=fmt@entry=0x7ffff7e412f5 "%s\n") at ../sysdeps/posix/libc_fatal.c:132
#5 0x00007ffff7d2e765 in malloc_printerr (str=str@entry=0x7ffff7e3f082 "free(): invalid pointer") at malloc.c:5772
#6 0x00007ffff7d30c4c in _int_free (av=<optimized out>, p=p@entry=0x7ffff445f610, have_lock=have_lock@entry=0) at malloc.c:4507
#7 0x00007ffff7d335ce in __GI___libc_free (mem=0x7ffff445f620) at malloc.c:3398
#8 0x00007fffea1cbbb3 in std::_Function_base::_Base_manager<std::function<void(int)> >::_M_destroy () at /usr/include/c++/14.1.1/bits/std_function.h:175
#9 std::_Function_base::_Base_manager<std::function<void(int)> >::_M_manager () at /usr/include/c++/14.1.1/bits/std_function.h:203
#10 std::_Function_handler<void(int const&), std::function<void(int)> >::_M_manager () at /usr/include/c++/14.1.1/bits/std_function.h:282
#11 0x00007fffe9cea1f1 in std::_Function_base::~_Function_base () at /usr/include/c++/14.1.1/bits/std_function.h:244
#12 std::function<void(int const&)>::~function () at /usr/include/c++/14.1.1/bits/std_function.h:334
#13 llvm::cl::cb<void, int>::apply<llvm::cl::opt<int, false, llvm::cl::parser<int> > > () at /usr/src/debug/llvm/llvm-18.1.8.src/include/llvm/Support/CommandLine.h:507
#14 llvm::cl::applicator<llvm::cl::cb<void, int> >::opt<llvm::cl::opt<int, false, llvm::cl::parser<int> > > () at /usr/src/debug/llvm/llvm-18.1.8.src/include/llvm/Support/CommandLine.h:1268
#15 llvm::cl::apply<llvm::cl::opt<int, false, llvm::cl::parser<int> >, llvm::cl::cb<void, int>, llvm::cl::desc> ()
at /usr/src/debug/llvm/llvm-18.1.8.src/include/llvm/Support/CommandLine.h:1317
#16 llvm::cl::apply<llvm::cl::opt<int, false, llvm::cl::parser<int> >, llvm::cl::NumOccurrencesFlag, llvm::cl::cb<void, int>, llvm::cl::desc> ()
at /usr/src/debug/llvm/llvm-18.1.8.src/include/llvm/Support/CommandLine.h:1318
#17 llvm::cl::apply<llvm::cl::opt<int, false, llvm::cl::parser<int> >, llvm::cl::initializer<int>, llvm::cl::NumOccurrencesFlag, llvm::cl::cb<void, int>, llvm::cl::desc> ()
at /usr/src/debug/llvm/llvm-18.1.8.src/include/llvm/Support/CommandLine.h:1318
#18 llvm::cl::apply<llvm::cl::opt<int, false, llvm::cl::parser<int> >, llvm::cl::OptionHidden, llvm::cl::initializer<int>, llvm::cl::NumOccurrencesFlag, llvm::cl::cb<void, int>, llvm::cl::desc> () at /usr/src/debug/llvm/llvm-18.1.8.src/include/llvm/Support/CommandLine.h:1318
#19 llvm::cl::apply<llvm::cl::opt<int, false, llvm::cl::parser<int> >, char [17], llvm::cl::OptionHidden, llvm::cl::initializer<int>, llvm::cl::NumOccurrencesFlag, llvm::cl::cb<void, int>, llvm::cl::desc> () at /usr/src/debug/llvm/llvm-18.1.8.src/include/llvm/Support/CommandLine.h:1318
#20 llvm::cl::opt<int, false, llvm::cl::parser<int> >::opt<char [17], llvm::cl::OptionHidden, llvm::cl::initializer<int>, llvm::cl::NumOccurrencesFlag, llvm::cl::cb<void, int>, llvm::cl::desc>
() at /usr/src/debug/llvm/llvm-18.1.8.src/include/llvm/Support/CommandLine.h:1507
#21 __static_initialization_and_destruction_0 () at /usr/src/debug/llvm/llvm-18.1.8.src/lib/IR/OptBisect.cpp:33
#22 _GLOBAL__sub_I_OptBisect.cpp(void) () at /usr/src/debug/llvm/llvm-18.1.8.src/lib/IR/OptBisect.cpp:54
#23 0x00007ffff7fcb5b7 in call_init (l=<optimized out>, argc=2, argv=0x7fffffffe258, env=0x7fffffffe270) at dl-init.c:74
#24 call_init (l=<optimized out>, argc=2, argv=0x7fffffffe258, env=0x7fffffffe270) at dl-init.c:26
#25 0x00007ffff7fcb6ad in _dl_init (main_map=0x55555558a6f0, argc=2, argv=0x7fffffffe258, env=0x7fffffffe270) at dl-init.c:121
#26 0x00007ffff7fc85c2 in __GI__dl_catch_exception (exception=exception@entry=0x0, operate=operate@entry=0x7ffff7fd2560 <call_dl_init>, args=args@entry=0x7fffffffdc10) at dl-catch.c:215
#27 0x00007ffff7fd24fc in dl_open_worker (a=a@entry=0x7fffffffddc0) at dl-open.c:829
#28 0x00007ffff7fc8523 in __GI__dl_catch_exception (exception=exception@entry=0x7fffffffdda0, operate=operate@entry=0x7ffff7fd2460 <dl_open_worker>, args=args@entry=0x7fffffffddc0)
at dl-catch.c:241
#29 0x00007ffff7fd2904 in _dl_open (file=0x7ffff7a09829 "libgbm.so.1", mode=<optimized out>, caller_dlopen=0x7ffff7a06ab6 <nxeglFunctionsInit+102>, nsid=<optimized out>, argc=2,
argv=0x7fffffffe258, env=0x7fffffffe270) at dl-open.c:905
#30 0x00007ffff7d1df14 in dlopen_doit (a=a@entry=0x7fffffffe070) at dlopen.c:56
#31 0x00007ffff7fc8523 in __GI__dl_catch_exception (exception=exception@entry=0x7fffffffdfb0, operate=0x7ffff7d1deb0 <dlopen_doit>, args=0x7fffffffe070) at dl-catch.c:241
#32 0x00007ffff7fc8679 in _dl_catch_error (objname=0x7fffffffe018, errstring=0x7fffffffe020, mallocedp=0x7fffffffe017, operate=<optimized out>, args=<optimized out>) at dl-catch.c:260
#33 0x00007ffff7d1d9f3 in _dlerror_run (operate=operate@entry=0x7ffff7d1deb0 <dlopen_doit>, args=args@entry=0x7fffffffe070) at dlerror.c:138
#34 0x00007ffff7d1dfcf in dlopen_implementation (file=<optimized out>, mode=<optimized out>, dl_caller=<optimized out>) at dlopen.c:71
#35 ___dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:81
#36 0x00007ffff7a06ab6 in nxeglFunctionsInit () from /usr/NX/lib/libnxegl.so
#37 0x00007ffff7a03f35 in ?? () from /usr/NX/lib/libnxegl.so
#38 0x00007ffff7fcb5b7 in call_init (l=<optimized out>, argc=2, argv=0x7fffffffe258, env=0x7fffffffe270) at dl-init.c:74
#39 call_init (l=<optimized out>, argc=2, argv=0x7fffffffe258, env=0x7fffffffe270) at dl-init.c:26
#40 0x00007ffff7fcb6ad in _dl_init (main_map=0x7ffff7ffe2e0, argc=2, argv=0x7fffffffe258, env=0x7fffffffe270) at dl-init.c:121
#41 0x00007ffff7fe3e20 in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#42 0x0000000000000002 in ?? ()
#43 0x00007fffffffe65e in ?? ()
#44 0x00007fffffffe66c in ?? ()
#45 0x0000000000000000 in ?? ()
(gdb)
Note the line #36 and #37 making references to /usr/NX/lib/libnxegl.so, which is provided by the Nomachine package. I uninstalled this package (and rebooted to refresh my LD_PRELOAD env variable), and the problem was gone.