I'm trying to run lldb on Alpine Linux V3.8, but when trying to debug any program, it hangs.

I'm using lldb 5.0.1-r0 from the edge/testing repository, which is the only version available currently in the Alpine repos:

lldb policy:

Running strace, it seems to be stuck waiting on a mutex:

mmap(NULL, 94208, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb866f10000
mprotect(0x7fb866f12000, 86016, PROT_READ|PROT_WRITE) = 0
clone(child_stack=0x7fb866f26a68, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000, parent_tidptr=0x7fb866f26b20, tls=0x7fb866f26ae8, child_tidptr=0x7fb866f26b20) = 4302
futex(0x7fb866f3db20, FUTEX_WAIT, 4300, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=4301, si_uid=1000, si_status=1, si_utime=1, si_stime=0} ---
futex(0x7fb866f3db20, FUTEX_WAIT, 4300, NULL

Following this lead, I found a very similar problem seen with LLDB 3.8.0 on Debian 8, described here, but unfortunately without a solution.

Is it a known issue with lldb on Alpine, or am I missing some setup steps?

My next step would be building latest lldb from source, but it would be much preferred to have it working with the packaged version. Many thanks!


I was able to build a functional lldb from latest sources, 8.0.0 trunk, by following the official build instructions on https://lldb.llvm.org/build.html, with the following CMake parameters:

cmake ../llvm -GNinja -DCMAKE_BUILD_TYPE=Release

Build takes a while, but produced a good lldb build which didn't hang and seems to be working just fine.

So it appears, the lldb=5.0.1-r0 package is indeed broken, at least on my Alpine setup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.