OpenJDK 7u85-2.6.1 is leaking shm segments causing other applications to crash

Bug #1511395 reported by Alex
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
OpenJDK
Fix Released
Medium
openjdk-7 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Ubuntu 14.04.3 LTS, x86-64, openjdk-7 version 7u85-2.6.1-5ubuntu0.14.04.1.
I have java application which i using every day. Before update all worked fine. After this update i see many problems:
1. If I start java application second time, i see it working very slow. Before update I started up to 3 or 4 instances of this application same time. It never working slow before if only 2 instances running. Strange: first instance looks working not very slow only second instance working very slow.
2. VLC crash on start playing every time if started when java application is running. If java application is not running, VLC works fine, as usual.
3. Other applications (non java) working bad too, only if started when java application is running. For example Tiled can't draw graphics.

Java application which i using is Stendhal game. Before openjdk update working without any problems. Application itself was not changed, same version used before update and after.

This is example of console log of VLC crash:
VLC media player 2.1.6 Rincewind (revision 2.1.6-0-gea01d28)
[0x1a7c178] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
QNativeImage: Unable to attach to shared memory segment.
Fontconfig warning: FcPattern object size does not accept value "0"
Fontconfig warning: FcPattern object size does not accept value "0"
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
QNativeImage: Unable to attach to shared memory segment.
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id: 0x0
[0x7f6884001248] xcb_xv vout display error: shared memory allocation error: No space left on device

If you need additional information, please ask what information.

Revision history for this message
In , Baiduzhyi-devel (baiduzhyi-devel) wrote :

Created attachment 1396
Patch to fix the bad merge.

Finally found the cause of the issue. Looks like a bad merge from 2 parents.

Revision 7726:4b26f93b23ba is the first to cause the crash.

$ hg log -r 7726:4b26f93b23ba
changeset: 7726:4b26f93b23ba
parent: 7506:6aaf00000bd5
parent: 7696:8dc56d0f3e86
user: goetz
date: Mon Jul 07 12:45:48 2014 +0200
summary: Merge

Both parents, 7506:6aaf00000bd5 and 7696:8dc56d0f3e86, are working fine.

Upstream repo is different than icedtea7-forest, and contains working code.

Please see the patch for the issue in attachment.

Revision history for this message
In , Andrew John Hughes (ahughes) wrote :

The changes from:

changeset: 7162:cd2d8f23e93c
user: alitvinov
date: Thu Dec 19 15:21:08 2013 +0400
summary: 8025775: JNI warnings in TryXShmAttach

have got lost in this merge. Re-applying this should fix it.

Revision history for this message
In , Mercurial (mercurial) wrote :

details: http://icedtea.classpath.org//hg/icedtea7-forest/jdk?cmd=changeset;node=a2334007f1a8
author: andrew
date: Thu Jul 30 17:52:32 2015 +0100

 PR2568: openjdk causes a full desktop crash on RHEL 6 i586
 Summary: Re-apply "8025775: JNI warnings in TryXShmAttach"; some changes lost in bad merge changeset 4b26f93b23ba

Revision history for this message
In , Mercurial (mercurial) wrote :
Download full text (6.4 KiB)

details: http://icedtea.classpath.org//hg/icedtea7?cmd=changeset;node=761344512703
author: Andrew John Hughes <email address hidden>
date: Tue Sep 08 23:46:03 2015 +0100

 Bump to icedtea-2.7.0pre01.

 Upstream changes:
   - OPENJDK7-01: Allow OpenJDK to build on PaX-enabled kernels
   - OPENJDK7-02: Fix build where PAX_COMMAND is not specified
   - OPENJDK7-03: Only apply PaX-marking when needed by a running PaX kernel
   - OPENJDK7-04: Revert introduction of lambda expression in sun.lwawt.macosx.LWCToolkit
   - OPENJDK7-05: Fix mistake in 8075374 backport
   - PR2487: Make jdk8 mode the default for jdk.tls.ephemeralDHKeySize
   - PR2501: libjavasctp.so doesn't need to link against libdl when linking against libsctp
   - PR2502: Remove -fno-tree-vectorize workaround now http://gcc.gnu.org/PR63341 is fixed
   - PR2503: Add existence check for all optional dependencies in jdk_generic_profile.sh
   - PR2521: Systems with a GLib without libgio segfault when obtaining proxy information
   - PR2568: openjdk causes a full desktop crash on RHEL 6 i586
   - S7105883, PR2560: JDWP: agent crash if there exists a ThreadGroup with null name
   - S7124253: [macosx] Flavor change notification not coming
   - S8007219: [macosx] Frame size reverts meaning of maximized attribute if frame size close to display
   - S8013581: [macosx] Key Bindings break with awt GraphicsEnvironment setFullScreenWindow
   - S8014464: Update jcheck for OpenJDK 7
   - S8016105, PR2560: Add complementary RETURN_NULL allocation macros in allocation.hpp
   - S8020210: [macosx] JVM crashes in CWrapper$NSWindow.screen(long)
   - S8021897, PR2560: EXCEPTION_ACCESS_VIOLATION on debugging String.contentEquals()
   - S8022683, PR2560: JNI GetStringUTFChars should return NULL on allocation failure not abort the VM
   - S8025922, PR2560: JNI access to Strings need to check if the value field is non-null
   - S8027058: sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh Failed to initialize connector
   - S8027561: [macosx] Cleanup "may not respond to selector" warnings in native code
   - S8028617: Dvorak keyboard mapping not honored when ctrl key pressed
   - S8029868: Fix KSS issues in sun.lwawt.macosx
   - S8042205: javax/management/monitor/*: some tests didn't get all the notifications
   - S8043201: Deprecate RC4 in SunJSSE provider
   - S8043202: Prohibit RC4 cipher suites
   - S8046817: JDK 8 schemagen tool does not generate xsd files for enum types
   - S8048194: GSSContext.acceptSecContext fails when a supported mech is not initiator preferred
   - S8048214: Linker error when compiling G1SATBCardTableModRefBS after include order changes
   - S8064546: CipherInputStream throws BadPaddingException if stream is not fully read
   - S8065764: javax/management/monitor/CounterMonitorTest.java hangs
   - S8066952: [TEST-BUG] javax/management/monitor/CounterMonitorTest.java hangs
   - S8067694: Improved certification checking
   - S8068674: Increment minor version of HSx for 7u85 and initialize the build number
   - S8071668: [macosx] Clipboard does not work with 3rd parties Clipboard Managers
   - S8071715: Tune font layout engine
   - S8071731: Better scaling for C1
   - S8072490:...

Read more...

Revision history for this message
In , Mercurial (mercurial) wrote :

details: http://icedtea.classpath.org//hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=e92ba87e90a2
author: andrew
date: Thu Jul 30 17:52:32 2015 +0100

 PR2568: openjdk causes a full desktop crash on RHEL 6 i586
 Summary: Re-apply "8025775: JNI warnings in TryXShmAttach"; some changes lost in bad merge changeset 4b26f93b23ba

Revision history for this message
In , Mercurial (mercurial) wrote :
Download full text (8.9 KiB)

details: http://icedtea.classpath.org//hg/release/icedtea7-2.6?cmd=changeset;node=723ef630c332
author: Andrew John Hughes <email address hidden>
date: Tue Oct 20 04:30:23 2015 +0100

 Bump to icedtea-2.6.2pre02.

 Upstream changes:
   - Bump to icedtea-2.6.2pre01
   - Bump to icedtea-2.6.2pre02
   - PR2512: Reset success following calls in LayoutManager.cpp
   - PR2568: openjdk causes a full desktop crash on RHEL 6 i586
   - S6880559, PR2674: Enable PKCS11 64-bit windows builds
   - S6904403, PR2674: assert(f == k-&gt;has_finalizer(),&quot;inconsistent has_finalizer&quot;) with debug VM
   - S7011441, PR2674: jndi/ldap/Connection.java needs to avoid spurious wakeup
   - S7059542, PR2674: JNDI name operations should be locale independent
   - S7105461, PR2571: Large JTables are not rendered correctly with Xrender pipeline
   - S7105883, PR2560: JDWP: agent crash if there exists a ThreadGroup with null name
   - S7107611, PR2674: sun.security.pkcs11.SessionManager is scalability blocker
   - S7127066, PR2674: Class verifier accepts an invalid class file
   - S7150092, PR2674: NTLM authentication fail if user specified a different realm
   - S7150134, PR2571: JCK api/java_awt/Graphics/index.html#DrawLine fails with OOM for jdk8 with XRender pipeline
   - S7152582, PR2674: PKCS11 tests should use the NSS libraries available in the OS
   - S7156085, PR2674: ArrayIndexOutOfBoundsException throws in UTF8Reader of SAXParser
   - S7177045, PR2674: Rework the TestProviderLeak.java regression test, it is too fragile to low memory errors.
   - S7190945, PR2674: pkcs11 problem loading NSS libs on Ubuntu
   - S8005226, PR2674: java/rmi/transport/pinClientSocketFactory/PinClientSocketFactory.java fails intermittently
   - S8009438, PR2674: sun/security/pkcs11/Secmod tests failing on Ubuntu 12.04
   - S8011709, PR2509: [parfait] False positive: memory leak in jdk/src/share/native/sun/font/layout/CanonShaping.cpp
   - S8012971, PR2674: PKCS11Test hiding exception failures
   - S8016105, PR2560: Add complementary RETURN_NULL allocation macros in allocation.hpp
   - S8020424, PR2674: The NSS version should be detected before running crypto tests
   - S8020443, PR2674: Frame is not created on the specified GraphicsDevice with two monitors
   - S8021897, PR2560: EXCEPTION_ACCESS_VIOLATION on debugging String.contentEquals()
   - S8022683, PR2560: JNI GetStringUTFChars should return NULL on allocation failure not abort the VM
   - S8023052, PR2509: JVM crash in native layout
   - S8025922, PR2560: JNI access to Strings need to check if the value field is non-null
   - S8027058: sun/management/jmxremote/bootstrap/RmiBootstrapTest.sh Failed to initialize connector
   - S8027624, PR2674: com/sun/crypto/provider/KeyFactory/TestProviderLeak.java unstable again
   - S8033069, PR2674: mouse wheel scroll closes combobox popup
   - S8035150, PR2674: ShouldNotReachHere() in ConstantPool::copy_entry_to
   - S8039212, PR2674: SecretKeyBasic.sh needs to avoid NSS libnss3 and libsoftokn3 version mismatches
   - S8042855, PR2509: [parfait] Potential null pointer dereference in IndicLayoutEngine.cpp
   - S8044364, PR2674: runtime/RedefineFinalizer test fails on windows
   - ...

Read more...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openjdk-7 (Ubuntu):
status: New → Confirmed
Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:

apport-collect 1511395

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs

Changed in openjdk-7 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
berend (berenddeboer) wrote :

I'm using jitsi, after using audio you get this behaviour. Stopping java application fixes the problem. Similar to what reported here: https://bbs.archlinux.org/viewtopic.php?id=200372

Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

Thank you for your report. We have confirmed that the current version has this bug and it has been fixed on a newer release.

Changed in openjdk-7 (Ubuntu):
status: Incomplete → Confirmed
summary: - Problems after update of OpenJDK to version 7u85-2.6.1-5ubuntu0.14.04.1
- (crashes of other applications)
+ OpenJDK 7u85-2.6.1 is leaking shm segments causing other applications to
+ crash
Changed in openjdk:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.