LLVM version used for postgres packages on Centos 7 is very old and causes segfaults on OOM

Поиск
Список
Период
Сортировка
От Jelte Fennema
Тема LLVM version used for postgres packages on Centos 7 is very old and causes segfaults on OOM
Дата
Msg-id AM5PR83MB0178475D87EFA290A4D0793DF7FF9@AM5PR83MB0178.EURPRD83.prod.outlook.com
обсуждение исходный текст
Список pgsql-pkg-yum
Hi,

Recently I ran into some segfaults under low memory conditions when enabling JIT. The reason turned out to be that the CentOS 7 packages for x86_64 are using LLVM 5, which is very old. Recompiling Postgres with LLVM 7 already helped quite a bit at reducing such crashes, presumably because it contains this change: https://github.com/llvm/llvm-project/commit/15681ad00b83c606dbb13af8782610a61bf39687

Looking at the spec files postgres is already built with LLVM 7 for ARM64 packages for CentOS 7.

Even with LLVM 7 there were still some segfaults related to out of memory issues in LLVM. The backtraces indicated that it would be fixed by this commit which is part of LLVM 8 and up: https://github.com/llvm/llvm-project/commit/50b33441487f9ccd447e17b1ecbd8799793993d4# 

That commit replaces the line containing the following assert with actual error handling:
assert(!EC && "Failed to allocate resolver block");

After trying to reproduce the segfaults with LLVM 10, they completely disappeared.

So I have two questions:
  1. Would it be feasible to use LLVM7 for the x86_64 packages as well? Just like is done
  2. What would be required to build CentOS packages using LLVM8 or higher?
Jelte

В списке pgsql-pkg-yum по дате отправления:

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: postgis for beta releases
Следующее
От: Devrim Gündüz
Дата:
Сообщение: Re: postgis for beta releases