2

I am trying to use java sutime in my Python code. The code has been working fine until yesterday but now ends with Segmentation fault. The problem seems to be coming from

 jpype.startJVM(getDefaultJVMPath())

This function ends with Segmentation fault. The defaultJVMPath is

'/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/libjvm.so'

I have tried uninstalling and then installing java and jpype. The code works fine in virtual box with less memory, so the problem doesnt seems to be coming from lack of memory. Anyone has any ideas? Any help is appreciated., thanks!

>>> import jpype  
>>> jpype.isJVMStarted()  
0  
>>> jpype.startJVM(jpype.getDefaultJVMPath())  
Segmentation fault  
deepthi@deepthi:~$ 
Thierry Lathuille
  • 23,663
  • 10
  • 44
  • 50
  • I don't have a solution, but I'm experiencing a similar problem. Starting a JVM under Ubuntu (16) via python (Jpype/jaydebeapi) results in a segmentation fault. It started 6/22/2017. I went back trough my apt-get logs and I see a recent update to linux-image, linux-headers, linux-libc-dev, libc6-dev, locales, multiarch-support, and other similarly named packages. Did you recently update any linux components, too? – Amw 5G Jun 23 '17 at 19:50
  • I keep adding new packages for my project., maybe one of it messed it up. – Deepthi Suthan Jun 26 '17 at 05:06

1 Answers1

4

linux-image-3.13.0-121-generic and linux-image-4.4.0-81-generic contain a fix for the Stack Clash vulnerability.

Be careful with kernel updates, which fix this vulnerability. Current patch breaks many java (sun/oracle and openjdk) applications. See Bug #1699772: linux-image-4.4.0-81-generic, linux-image-3.13.0-121-generic Regression: many user-space apps crashing. The solution is to temporary reboot system with old kernel (linux-image-3.13.0-119-generic in Trusty / linux-image-4.4.0-78-generic in Xenial).

Ubuntu kernel developers will prepare new patch in a few days.

UPDATE: Latest updates (at least image-4.4.0-83-generic, linux-image-4.8.0-58-generic, linux-image-4.10.0-26-generic) fix this vulnerability and problems with user-space programs.

N0rbert
  • 559
  • 5
  • 22