elastic / ansible-elasticsearch

Ansible playbook for Elasticsearch
Other
1.59k stars 857 forks source link

Segmentation fault in JNA library due to non-existent home directory for elasticsearch user #811

Closed yuriysklyarenko closed 2 years ago

yuriysklyarenko commented 3 years ago

Describe the feature:

There is an issue on some CentOS 7 boxes with ElasticSearch 7.X - the service fails with SIGSEGV error in the JNA (libffi) library (which tries to create '.cache/JNA/temp/' in the user home) and the possible solution is to create a 'real' home folder for 'elasticsearch' user (for example specify es_data_dirs like /var/lib/elasticsearch or es_tmp_dir), however 'createhome: no' is hardcoded in the role.

Please check the following thread: https://github.com/elastic/elasticsearch/issues/18272#issuecomment-294321118

Elasticsearch version

7.X (tested on 7.10.2, 7.12.1)

Role version:

7.12.1

JVM version (java -version): any

OS version (uname -a if on a Unix-like system): CentOS 7.X.

ES Logs if relevant:

Jul 29 07:48:03 856405-db1 systemd-entrypoint: # A fatal error has been detected by the Java Runtime Environment:
Jul 29 07:48:03 856405-db1 systemd-entrypoint: #
Jul 29 07:48:03 856405-db1 systemd-entrypoint: #  SIGSEGV (0xb) at pc=0x00007f9d2459c152, pid=17937, tid=18108
Jul 29 07:48:03 856405-db1 systemd-entrypoint: #
Jul 29 07:48:03 856405-db1 systemd-entrypoint: # JRE version: OpenJDK Runtime Environment AdoptOpenJDK (16.0+36) (build 16+36)
Jul 29 07:48:03 856405-db1 systemd-entrypoint: # Java VM: OpenJDK 64-Bit Server VM AdoptOpenJDK (16+36, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
Jul 29 07:48:03 856405-db1 systemd-entrypoint: # Problematic frame:
Jul 29 07:48:03 856405-db1 systemd-entrypoint: # C  [jna16833394168063319439.tmp+0x13152]  ffi_prep_closure_loc+0x32
Jul 29 07:48:03 856405-db1 systemd-entrypoint: #
Jul 29 07:48:03 856405-db1 systemd-entrypoint: # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
Jul 29 07:48:03 856405-db1 systemd-entrypoint: #
Jul 29 07:48:03 856405-db1 systemd-entrypoint: # An error report file with more information is saved as:
Jul 29 07:48:03 856405-db1 systemd-entrypoint: # /var/log/elasticsearch/hs_err_pid17937.log
Jul 29 07:48:04 856405-db1 systemd-entrypoint: #
Jul 29 07:48:04 856405-db1 systemd-entrypoint: # If you would like to submit a bug report, please visit:
Jul 29 07:48:04 856405-db1 systemd-entrypoint: #   https://github.com/AdoptOpenJDK/openjdk-support/issues
Jul 29 07:48:04 856405-db1 systemd-entrypoint: # The crash happened outside the Java Virtual Machine in native code.
botelastic[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

botelastic[bot] commented 2 years ago

This issue has been automatically closed because it has not had recent activity since being marked as stale.