Обсуждение: FYI: LLVM Runtime Crash
Hackers, FYI, I wanted to try using PostgreSQL with LLVM on my Mac, but the backend repeatedly crashes during `make check`. I foundthe same issue in master and REL_16_STABLE. The crash message is: FATAL: fatal llvm error: Unsupported stack probing method server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. connection to server was lost Same thing appears in the log output. I poked around and found a similar bug[1] was fixed in LLVM in December, but as I’mgetting it with the latest release from 2 weeks ago, something else might be going on. I’ve opened a new LLVM bug report[2]for the issue. I don’t *think* it’s something that can be fixed in Postgres core. This is mostly in FYI in case anyone else runs into thisissue or knows something more about it. In the meantime I’ll be building without --with-llvm. Best, David [1]: https://github.com/llvm/llvm-project/issues/57171 [2]: https://github.com/llvm/llvm-project/issues/95804
On Jun 17, 2024, at 11:52, David E. Wheeler <david@justatheory.com> wrote: > I don’t *think* it’s something that can be fixed in Postgres core. This is mostly in FYI in case anyone else runs intothis issue or knows something more about it. Okay, a response to the issue[1] says the bug is in Postgres: > The error message is LLVM reporting the backend can't handle the particular form of "probe-stack" attribute in the inputLLVM IR. So this is likely a bug in the way postgres is generating LLVM IR: please file a bug against Postgres. (Feelfree to reopen if you have some reason to believe the issue is on the LLVM side.) Would it be best for me to send a report to pgsql-bugs? Best, David [1]: https://github.com/llvm/llvm-project/issues/95804#issuecomment-2174310977
Hi, On 2024-06-17 16:07:49 -0400, David E. Wheeler wrote: > On Jun 17, 2024, at 11:52, David E. Wheeler <david@justatheory.com> wrote: > > > I don’t *think* it’s something that can be fixed in Postgres core. This is mostly in FYI in case anyone else runs intothis issue or knows something more about it. > > Okay, a response to the issue[1] says the bug is in Postgres: > > > The error message is LLVM reporting the backend can't handle the particular form of "probe-stack" attribute in the inputLLVM IR. So this is likely a bug in the way postgres is generating LLVM IR: please file a bug against Postgres. (Feelfree to reopen if you have some reason to believe the issue is on the LLVM side.) I suspect the issue might be that the version of clang and LLVM are diverging too far. Does it work if you pass CLANG=/opt/homebrew/opt/llvm/bin/clang to configure? Greetings, Andres Freund
On Jun 17, 2024, at 16:37, Andres Freund <andres@anarazel.de> wrote: > I suspect the issue might be that the version of clang and LLVM are diverging > too far. Does it work if you pass CLANG=/opt/homebrew/opt/llvm/bin/clang to > configure? It does! It didn’t occur to me this would be the issue, but I presumes /usr/bin/clang is not compatible with the latest LLVMinstalled from Homebrew. Interesting! I’ll update that issue. Thanks, David