elasticsearch/docs/reference/setup/sysconfig
David Turner 57dbefe4fb
Set LIBFFI_TMPDIR at startup (#80651)
Today if `libffi` cannot allocate pages of memory which are both
writeable and executable then it will attempt to write code to a
temporary file. Elasticsearch configures itself a suitable temporary
directory for use by JNA but by default `libffi` won't find this
directory and will try various other places. In certain configurations,
none of the other places that `libffi` tries are suitable. With older
versions of JNA this would result in a `SIGSEGV`; since #80617 the JVM
will exit with an exception.

With this commit we use the `LIBFFI_TMPDIR` environment variable to
configure `libffi` to use the same directory as JNA for its temporary
files if they are needed.

Closes #18272
Closes #73309
Closes #74545
Closes #77014
Closes #77053
Relates #77285

Co-authored-by: Rory Hunter <roryhunter2@gmail.com>
2021-11-15 08:18:58 +00:00
..
configuring.asciidoc [DOCS] Add missing system config entry (#79830) 2021-10-26 12:04:58 -04:00
dns-cache.asciidoc [DOCS] Edit JVM settings info. Closes #72259 (#72350) 2021-04-28 18:30:32 -07:00
executable-jna-tmpdir.asciidoc Set LIBFFI_TMPDIR at startup (#80651) 2021-11-15 08:18:58 +00:00
file-descriptors.asciidoc [DOCS] Fix double spaces (#71082) 2021-03-31 09:57:47 -04:00
swap.asciidoc [DOCS] Fix double spaces (#71082) 2021-03-31 09:57:47 -04:00
tcpretries.asciidoc [DOCS] Update remote cluster docs (#77043) 2021-09-22 16:02:33 -04:00
threads.asciidoc Clarify that number of threads is set by packages 2017-12-15 11:29:13 -05:00
virtual-memory.asciidoc [DOCS] Fix double spaces (#71082) 2021-03-31 09:57:47 -04:00