Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#45824 - [jre7-openjdk] 7.u85_2.6.1 leak ressources

Attached to Project: Arch Linux
Opened by Ondřej Hruška (MightyPork) - Wednesday, 29 July 2015, 08:19 GMT
Last edited by Guillaume ALAUX (galaux) - Monday, 19 October 2015, 16:32 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Guillaume ALAUX (galaux)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 11
Private No


After the following updates:

jre7-openjdk-headless (7.u79_2.5.5-1 -> 7.u85_2.6.1-1)
jre7-openjdk (7.u79_2.5.5-1 -> 7.u85_2.6.1-1)
jdk7-openjdk (7.u79_2.5.5-1 -> 7.u85_2.6.1-1)

there's a regression where after a few hours (or less) running a Java application,
sound system stops working - no apps can play sound and print mysterious errors like

alsa audio output error: cannot open ALSA device "default": No space left on device

Forum thread:

I believe this is caused openjdk7, since after downgrading the packages or switching
to openjdk8, the issue disappears.

It also stops after restarting the said Java application (in my case PhpStorm), which
has not been updated at all.
This task depends upon

Closed by  Guillaume ALAUX (galaux)
Monday, 19 October 2015, 16:32 GMT
Reason for closing:  Fixed
Additional comments about closing:  7.u85_2.6.1-2 fixes this
Comment by Ondřej Hruška (MightyPork) - Wednesday, 29 July 2015, 08:51 GMT
Apparently the issue also affects video playback in VLC, as seen here:

[00007f07f8001268] xcb_xv vout display error: shared memory allocation error: No space left on device
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 30 July 2015, 02:14 GMT
  • Field changed: Summary (openjdk7.u79 -> 7.u85 update causes ALSA breakage → [jre7-openjdk] update causes ALSA breakage)
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Category (Packages: Extra → Upstream Bugs)
  • Task assigned to Guillaume ALAUX (galaux)
I guess is related 100%, in my case only on i686, x86_64 is good, the latest update causes Jdownloader2 to crash at early seconds of start. Also causes Xorg and VNC to crash after trying again due resource exhaustion (BadAlloc). Downgrading solves the issue.
Comment by Ondřej Hruška (MightyPork) - Thursday, 30 July 2015, 07:59 GMT
I'm on x86_64 with the glitch, so there must be some other difference in your systems...

Note:  FS#45794  seems to be the same issue.
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 30 July 2015, 22:28 GMT
Tested version 8.u51-1 and does not have this issue.
Comment by Guillaume ALAUX (galaux) - Friday, 31 July 2015, 08:25 GMT
Do you have a simple way to reproduce this? Do we need to wait several hours to reproduce it?
Do you think this comes from Arch Linux or directly OpenJDK or Icedtea? Have you found any upstream bug?
Comment by Ondřej Hruška (MightyPork) - Friday, 31 July 2015, 12:05 GMT
I'm afraid there's no deterministic way to trigger the issue - it "just happens".
I usually have PhpStorm open, someone may have NetBeans or other Java app running all the time.
After some time—30 minutes, hour, 2 hours...—I decide to play some music or radio, and there it comes.

If it helps, this is a 64-bit ThinkPad with i7, 4GB ram. Shm settings—the defaults, I don't even know where it's configured.

I believe it's openjdk7 itself leaking resources when the app is running. I don't have IcedTea installed.
This is my only machine, so can't test if it happens on other distros (don't have space for dualboot either).

I googled the error messages and found nothing, but that can be because I had no clue what exactly to look for.
Comment by Ondřej Hruška (MightyPork) - Sunday, 02 August 2015, 10:29 GMT
I just checked and version 7.u80_2.6.0-1 exhibits the bug. Versions 8.* are clean.
Comment by Guillaume ALAUX (galaux) - Sunday, 02 August 2015, 10:41 GMT
If you feel like this is an OpenJDK issue, feel free to report this to OpenJDK team or – maybe easier – IcedTea (btw, "IcedTea" is a set of patches etc enabling a cleaner build of OpenJDK. It is no separate piece of software).
Comment by webnull (webnull) - Sunday, 30 August 2015, 13:22 GMT
Thank you for your investigation on this problem, for long time I couldn't solve this problem and even didn't know where it could be caused.
Comment by Fabien COUTANT (fcoutant) - Wednesday, 14 October 2015, 15:53 GMT
Another confirmation and clarification. And I can reproduce at will.

I'm also having the same severe resource hogging bug with that 7u85_2.6.1 version, on 64-bits system.
I have recently migrated to Manjaro, only have that version available, and must use JDK7 for work.
At some point I noticed I couldn't start some programs doing graphics access (typically SDL/ClanLib games, but also Java/Swing or Java/SWT once saturated).

Digging down I found that all SHM IPC were used up. One can use "ipcs -mu" to check the number currently used.
After discovering that, I had a "watch ipcs -mu" in a terminal beside my Java application.
I found that resizing a graphical pane with a slider consumes SHMs quite quickly.
For example, VisualVM is quite slow eating 5-10 SHMs at each resize (resize the left pane listing VMs, remote JMX, etc) while the Object pane in a SQL session of Squirrel-SQL eats up several hundreds of them at each resize (and you don't have to release the mouse button to eat them, like VisualVM), going to saturation in less than a minute.

So it's IPC' shared memory segments exhaustion which is causing all the trouble.
Maybe it's a big enough bug and annoyance to backtrack on the version provided in Arch, until it's corrected upstream ?
Comment by Guillaume ALAUX (galaux) - Sunday, 18 October 2015, 20:31 GMT
Thanks for this last report. Here are my observations:

With 7.u85_2.6.1-1:

- I can reproduce this leak with VisualVM, Netbeans, IntelliJ every time
- Neither TuxGuitar nor Eclipse exhibit this issue

With 7.u79_2.5.5-1, none of the mentioned application leaks.

Mail sent to the IcedTeam mailing list:
Comment by Guillaume ALAUX (galaux) - Monday, 19 October 2015, 16:32 GMT
IcedTea/RedHat fellows kindly pointed me to this issue:

7.u85_2.6.1-2 in [extra] is built with this patch and does not exhibit the leak anymore. Next upstream version will ship the fix.

Thanks for your help!