7

I'm running the Gnome version of Ubuntu 16.04.2 LTS 32 bit. I am also running Eclipse 3.8.1 with the PyDev plugin.

Recently my software updates updated me to Linux kernel 4.4.0-81-generic and now Eclipse crashes with a segmentation fault and core dump.

I tried a lot of things, but finally rebooted with the 4.4.0-79-generic kernel and it runs fine now.

Is there a known problem here and if so, a plan to fix it?

Update: I found this link: https://forum.ubuntuusers.de/topic/eclipse-crash-mit-speicherzugriffsfehler-nach-/

My German is not the greatest, but it seems this person is having the exact same problem.

6

This appears to have been acknowledged as a kernel bug

There is a workaround by increasing the JVM max stack size using -Xss1280k when starting Java. This can also be accomplished for processes where you don't have access to the command line arguments for Java by setting an environment variable export JAVA_TOOL_OPTIONS=-Xss1280k (just remember to restart the process after setting the variable).

Update: Fixed in the latest kernel

  • Workaround confirmed to work for my C++ JNI scenario. – Raven Jun 21 '17 at 20:20
  • Could you quote the workaround into your answer? In this way your answer will be clearer and useful, as stated by this guide: askubuntu.com/help/referencing – Danibix Jun 21 '17 at 21:09
  • @Danibix The linked workaround is specific to something called UniFi; my tiny snippet is the essence that is relevant to any Java invocation. – Raven Jun 21 '17 at 22:20
  • @Raven I read the kernel bug report and discussion and it is very specific about Java problems. Is it known whether the Eclipse crashing problem is directly connected to this problem? and a similar question, does the workaround you show make Eclipse work? (or do I have to try that myself and see?) – Pete P Jun 22 '17 at 14:11
  • @PeteP I don't know that the workaround will fix Eclipse, but I'm pretty confident it will (75%+). Over the last 24 hours I've seen a wide variety of reports about the kernel upgrade killing Java applications, and I believe Eclipse fits the profile of those affected. – Raven Jun 22 '17 at 16:31
5

I am the original author of the posting on Ubuntu-users german forum. You are absolutely right that I am having the exact same issue as you do.

As a workaround I did a rollback to the 4.4.0-79 kernel on my colleagues laptop and all seems fine so I am pretty sure now it is the linux-kernel issue.

I initially tried to create a bugreport on launchpad, but sadly it would bail out with some strange error-code upon myself trying to login.

What surprises me the most is that there were hardly any resources out there(google search almost yields nothing) regarding the 4.4.0-81-kernel and eclipse issue when it happened. Were we three the only JAVA developers out there using Ubuntu 16.04 with eclipse doing their suggested ubuntu linux-kernel updates on a regular basis?

Well back to the issue itself, a kernel update just popped up some minutes ago. I went and installed it. Result was just as I expected: updated 4.4.0-81-generic from today and eclipse is still crashing, so much for that. I have also tried Raven's suggested fix increasing the stack size using

export JAVA_TOOL_OPTIONS=-Xss1280k

and it seems to work fine with my eclipse mars as well as neon from eclipse.org.

Luckily I just happen to have to do some other stuff right now and do not need my eclipse installation for now. If I did, I would also roll back to the previous kernel 4.4.0-79 as I do not like tinkering with the system stack size, even if it seems safe here.

So my suggestion for Ubuntu 16.04 LTS users is: Rollback to 4.4.0-79 and wait for a working kernel as the patches already went upsteram and there seems to be a working kernel, as written in the last posting on: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=865311.

  • The bug is still present in 4.4.0-82 proposed kernel (@Carlo_Pellegrini) I managed to create a POC, reproducible steps and submit a bug report with a full stack trace this morning. If you can attempt to up vote/confirm/subscribe it may flag this up to the right people. https://bugs.launchpad.net/ubuntu/+source/commons-daemon/+bug/1700010 – Ne0 Jun 23 '17 at 8:38
2

Even I was facing the same issue. My eclipse was not starting just after restarting my PC.

export JAVA_TOOL_OPTIONS=-Xss1280k

Doing the above has helped to start the eclipse.

2017-06-19 11:54:34 install libxkbcommon-x11-0:i386 <none> 0.4.1-0ubuntu1
2017-06-19 11:54:59 install linux-image-3.13.0-119-generic:i386 <none> 3.13.0-119.166
2017-06-19 11:58:12 install linux-image-extra-3.13.0-119-generic:i386 <none> 3.13.0-119.166
2017-06-19 11:58:19 install linux-headers-3.13.0-119:all <none> 3.13.0-119.166
2017-06-19 11:58:24 install linux-headers-3.13.0-119-generic:i386 <none> 3.13.0-119.166
2017-06-19 11:58:51 install python-urllib3:all <none> 1.7.1-1ubuntu4
2017-06-19 11:58:52 install python-requests:all <none> 2.2.1-1ubuntu0.3
2017-06-19 11:59:09 install libandroid-properties1:i386 <none> 0.1.0+git20131207+e452e83-0ubuntu12
2017-06-19 11:59:09 install liboxideqtquick0:i386 <none> 1.21.5-0ubuntu0.14.04.1
2017-06-19 19:15:49 install p7zip-full:i386 <none> 9.20.1~dfsg.1-4+deb7u2build0.14.04.1
2017-06-21 10:38:35 install linux-image-3.13.0-121-generic:i386 <none> 3.13.0-121.170
2017-06-21 10:38:39 install linux-image-extra-3.13.0-121-generic:i386 <none> 3.13.0-121.170
2017-06-21 10:38:46 install linux-headers-3.13.0-121:all <none> 3.13.0-121.170
2017-06-21 10:38:50 install linux-headers-3.13.0-121-generic:i386 <none> 3.13.0-121.170
2017-06-21 10:38:24 upgrade libc6-dev:i386 2.19-0ubuntu6.11 2.19-0ubuntu6.13
2017-06-21 10:38:25 upgrade libc-dev-bin:i386 2.19-0ubuntu6.11 2.19-0ubuntu6.13
2017-06-21 10:38:26 upgrade linux-libc-dev:i386 3.13.0-119.166 3.13.0-121.170
2017-06-21 10:38:26 upgrade libc6-dbg:i386 2.19-0ubuntu6.11 2.19-0ubuntu6.13
2017-06-21 10:38:27 upgrade libc-bin:i386 2.19-0ubuntu6.11 2.19-0ubuntu6.13
2017-06-21 10:38:31 upgrade libc6:i386 2.19-0ubuntu6.11 2.19-0ubuntu6.13
2017-06-21 10:38:38 upgrade multiarch-support:i386 2.19-0ubuntu6.11 2.19-0ubuntu6.13
2017-06-21 10:38:44 upgrade linux-generic:i386 3.13.0.119.129 3.13.0.121.131
2017-06-21 10:38:45 upgrade linux-image-generic:i386 3.13.0.119.129 3.13.0.121.131
2017-06-21 10:38:53 upgrade linux-headers-generic:i386 3.13.0.119.129 3.13.0.121.131

Above are the list of packages which got auto updated in my machine recently. Can anyone please let me know which particular package I have to scrap or downgrade..??

  • 1
    This kernel update linux-image-3.13.0-119-generic is the problem – Raven Jun 23 '17 at 16:49
  • Sorry, I didn't see you had two kernel updates in there. linux-image-3.13.0-121-generic is likely the actual problem. – Raven Jun 26 '17 at 23:24
0

This seems to be fixed in linux kernel 4.4.0-87-generic. I don't know if it was fixed in an earlier version, but it definitely works in this one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.