0

Any java commands get this error: Segmentation fault (core dumped)

It's happened on ubuntu-desktop-16.04-x64 and Mint too.

Core dump: Program terminated with signal SIGSEGV, Segmentation fault. #0 elf_machine_rela_relative (reloc_addr_arg=0x47ff743d69830, reloc=0x7ff742fd8420, l_addr=140699955408896) at ../sysdeps/x86_64/dl-machine.h:518 518 ../sysdeps/x86_64/dl-machine.h: No such file or directory.

Any Idea? What's /sysdeps/x86_64/dl-machine.h?

openjdk-8-jdk is ok. This problem only exists in Oracle Java 8.

  • Nothing important, it just tells you that segfault happened at function elf_machine_rela_relative, and by virtue of having debug symbols mentions it is defined at dl-machine.h, line 518; and that you don't have the file (obviously, you didn't compile the package). How did you get Java in the first place, did you install it from Ubuntu repository, or rather downloaded it from somewhere? – Hi-Angel Dec 03 '17 at 17:59
  • @Hi-Angel , I tried multiple ways: downloading from http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main, using tar.gz. file which was downloaded oracle.com. In all ways, this error is happened. How do I resolve it? Where can I get /sysdeps/x86_64/dl-machine.h? – Hossein Ghiyasi Mehr Dec 10 '17 at 10:05
  • Since you downloaded it manually, I'm guessing you've used dpkg, right? Try removing it, and installing again by using gdebi this time, perhaps there were some dependencies missing, and dpkg doesn't resolve them. I'm not sure why would you want it, but to peek at dl-machine.h you can e.g. here; however note that you don't know at which commit it's been used, so it's likely you won't find anything interesting at 518 line. – Hi-Angel Dec 10 '17 at 10:19
  • Also, you didn't mention why do you try doing that manually. Did you try answers from here? – Hi-Angel Dec 10 '17 at 10:19
  • @Hi-Angel , I downloaded tar.gz file from oracle.com & extracted it then ran it. This error was shown. – Hossein Ghiyasi Mehr Dec 10 '17 at 15:43
  • @Hi-Angel , I tried another way: I used add apt-repository to add http://ppa.launchpad.net/webupd8team/java/ubuntu , then I used apt-get to install oracle-java. It was installed but the error was shown when I run any java cmds – Hossein Ghiyasi Mehr Dec 10 '17 at 15:44
  • @Hi-Angel , What's the absolute path of dl-machine.h? Where should I put dl-machine.h? I can't find any directory named sysdeps/x86_64! – Hossein Ghiyasi Mehr Dec 10 '17 at 15:45
  • Did you try package openjdk-8-jdk instead? About the dl-machine.h please read my first comment again — it's just source code, you won't get anything useful from it unless you want to build the package yourself, and then debug where it's failing. – Hi-Angel Dec 10 '17 at 18:03
  • @Hi-Angel , I want to put dl-machine.h source code in sysdeps/x86_64/dl-machine.h path. But I can't find it. Where is the absolute path of sysdeps/x86_64 directory? – Hossein Ghiyasi Mehr Dec 11 '17 at 10:58
  • /sysdeps/x86_64/dl-machine.h are the absolute paths, you can't find it because it only existed on packager's machine. Is there any reason you can't use openjdk if it works for you? As for the segfault — you can only report a bug to Oracle. – Hi-Angel Dec 11 '17 at 17:58

0 Answers0