Applets use 100% of CPU

Bug #551328 reported by TJ
140
This bug affects 29 people
Affects Status Importance Assigned to Milestone
OpenJDK
Invalid
Medium
openjdk-6 (Debian)
Fix Released
Unknown
openjdk-6 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Using several applets I'm finding the Lucid i386 applet plugin with Firefox 3.6 is using 100% CPU from the time the applet starts. Even if the applet is stopped by closing the parent window the java process continues using 100% of the CPU.

Examples of a sites where this can be experienced:

http://www.java.com/en/download/help/testvm.xml
http://kent.w3.org/People/mimasa/test/object/java/clock
http://www.spunkyworld.com/demos/chat/index.htm

Tags: lucid
Revision history for this message
TJ (tj) wrote :

I was able to catch the Volano chat (see spunkyworld chat demo) running at 100% with gdb. It seems to show one thread is corrupted in some way. Using 'top' with option 'H' (show threads) I got the LWP process ID of the thread. In gdb I checked that with "info threads" then switched to the thread "thread 11" and tried to get a backtrace.

(gdb) info threads
  24 Thread 0xb77afb70 (LWP 10790) 0x00cc7422 in __kernel_vsyscall ()
  23 Thread 0x8c463b70 (LWP 10792) 0x00cc7422 in __kernel_vsyscall ()
  22 Thread 0x8c3e2b70 (LWP 10794) 0x00cc7422 in __kernel_vsyscall ()
  21 Thread 0x8c19cb70 (LWP 10796) 0x00cc7422 in __kernel_vsyscall ()
  20 Thread 0x8c11bb70 (LWP 10798) 0x00cc7422 in __kernel_vsyscall ()
  19 Thread 0x8c0cab70 (LWP 10801) 0x00cc7422 in __kernel_vsyscall ()
  18 Thread 0x8c03ab70 (LWP 10802) 0x00cc7422 in __kernel_vsyscall ()
  17 Thread 0x8bfe9b70 (LWP 10805) 0x00cc7422 in __kernel_vsyscall ()
  16 Thread 0x8bf68b70 (LWP 10806) 0x00cc7422 in __kernel_vsyscall ()
  15 Thread 0x8bee7b70 (LWP 10808) 0x00cc7422 in __kernel_vsyscall ()
  14 Thread 0x8be96b70 (LWP 10810) 0x00cc7422 in __kernel_vsyscall ()
  13 Thread 0x8bcffb70 (LWP 10813) 0x00cc7422 in __kernel_vsyscall ()
  12 Thread 0x8bbfab70 (LWP 10814) 0x00cc7422 in __kernel_vsyscall ()
  11 Thread 0x8bb58b70 (LWP 10819) 0xb48c6e7a in ?? ()
  10 Thread 0x8b9ffb70 (LWP 10821) 0x00cc7422 in __kernel_vsyscall ()
  9 Thread 0x8b9aeb70 (LWP 10822) 0x00cc7422 in __kernel_vsyscall ()
  8 Thread 0x8b95db70 (LWP 10823) 0x00cc7422 in __kernel_vsyscall ()
  7 Thread 0x8b90cb70 (LWP 10824) 0x00cc7422 in __kernel_vsyscall ()
  6 Thread 0x8b8bbb70 (LWP 10825) 0x00cc7422 in __kernel_vsyscall ()
  5 Thread 0x8b55db70 (LWP 10833) 0x00cc7422 in __kernel_vsyscall ()
  4 Thread 0x8b777b70 (LWP 10836) 0x00cc7422 in __kernel_vsyscall ()
  3 Thread 0x8b5aeb70 (LWP 10837) 0x00cc7422 in __kernel_vsyscall ()
  2 Thread 0x8b0ffb70 (LWP 10871) 0x00cc7422 in __kernel_vsyscall ()
* 1 Thread 0xb77b06c0 (LWP 10788) 0x00cc7422 in __kernel_vsyscall ()
(gdb) thread 11
[Switching to thread 11 (Thread 0x8bb58b70 (LWP 10819))]#0 0xb48c6e7a in ?? ()
(gdb) bt
#0 0xb48c6e7a in ?? ()
#1 0x75d9dde9 in ?? ()
#2 0xc7717a73 in ?? ()
#3 0x0c102444 in ?? ()
#4 0xdd000000 in ?? ()
#5 0x8908245c in ?? ()
#6 0x45dbf475 in ?? ()
#7 0x241cddf4 in ?? ()
#8 0xff9597e8 in ?? ()
#9 0x9025ebff in ?? ()
Cannot access memory at address 0xdbdadd5f

The address of the thread (0xb48c6e7a) looks wrong compared to all other threads but I'm not sure what to make of it.

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

This bug was fixed in the package openjdk-6 - 6b18-1.8-0ubuntu1

---------------
openjdk-6 (6b18-1.8-0ubuntu1) lucid; urgency=low

  * Update IcedTea6 to the icedtea6-1.8 release.
  * Fix builds on Ubuntu/dapper and Debian/lenny.
  * On hppa, configure --without-rhino --disable-plugin.
  * Fix Hitachi SH configury. Closes: #575346.
  * Start a window manager when running the tests. Prefer metacity,
    as more tests pass with it.
  * Let XToolkit.isTraySupported() return true, if Compiz is running.
    Works around sun#6438179. LP: #300948.
  * Make <java_home>/jre/lib/security/nss.cfg a config file.
  * Fail in the configuration of the packages, if /proc is not mounted.
    java currently uses tricks to find its own shared libraries depending
    on the path of the binary. Will be changed in OpenJDK7. Closes: #576453.
  * Fix PR icedtea/469, testsuite failures with the NSS based security
    provider. LP: #556549.
  * Do not pass LD_LIBRARY_PATH from the plugin to the java process.
    While libnss3.so gets loaded from /usr/lib, the dependent libraries
    are loaded from MOZILLA_FIVE_HOME (See #561216 for the wrong firefox
    config). LP: #561124.
    Closes as well: LP: #551328, #554909, #560829, #549010, #553452.
  * Always build shark with hs14.
 -- Matthias Klose <email address hidden> Wed, 14 Apr 2010 01:53:33 +0200

Changed in openjdk-6 (Ubuntu):
status: New → Fix Released
Revision history for this message
mazin (mazinm) wrote :

The patch didn't fix the bug for my system, Lucid amd64 beta.

mazin (mazinm)
Changed in openjdk-6 (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

mazin: please check just with the live DVD, without anything installed. which of the applets do work, which ones not?

Changed in openjdk-6 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Matthias Klose (doko) wrote :

ICEDTEAPLUGIN_DEBUG=1 firefox 2>&1 | tee clock.log

Revision history for this message
Matthias Klose (doko) wrote :

LANG= ICEDTEAPLUGIN_DEBUG=1 firefox 2>&1 | tee clock.log
this time with 7/8 clocks showing up

Revision history for this message
Matthias Klose (doko) wrote :
Revision history for this message
mazin (mazinm) wrote :

With the live CD all applets work, most of the time, without using 100% CPU. But Java process will not terminate if you close the web page tab.However sometimes " less than 10%" the clock applet and ,once, the chat applet behave as described by TJ. In this case if i exit Firefox the Java process state become "zombie" before Apport says that Firefox have crashed.
In my installed system all 3 applets use up the CPU every time. But the applets works as expected, except the clock applet sometime 1 or 2 not showing ,this also happen in live CD even if it doesn't use the CPU.

Revision history for this message
philinux (philcb) wrote :

This java applet is maxing out my cpu. Anyone like to confirm?
Doesn't always start either. Have to refresh the page a few times before it will start

http://www.thinkbroadband.com/speedtest.html

Also it fails to load the result page.

I get this page not found instead of the results. Works ok on karmic
http://www.thinkbroadband.com/speedt...36880925821539

Have to end the java process to get cpu back to normal.

Using 65 bit Lucid.
apt-cache policy icedtea6-plugin
icedtea6-plugin:
  Installed: 6b18-1.8-0ubuntu1

Changed in openjdk-6 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Stephan Harz (linden-940) wrote :

Using 65 bit Lucid and was NOT able to even use the icedtea plugin to work at all! so i had to use the sun-java

installed java and the screen size is off...its much bigger than it should be...but usable...

Revision history for this message
zengeos (zengeos) wrote :

I also encountered this problem. Turning off the Icedtea plugin in Firefox seems to have fixed it. I restarted to ensure that it stayed fixed and things seem fine now. For me Java was taking so many resources that I couldn't even properly restart initially. Thanks for all the research all.

Revision history for this message
las (bandara-ls) wrote :

bug is stil there in lucid.Had to kill jvm to make system useable
icedtea6-plugin:
  Installed: 6b18-1.8-0ubuntu1

Revision history for this message
las (bandara-ls) wrote :

I installed sun-java plugin from repo it worked fine.so its def . open-jdk/ iced tea

Revision history for this message
Matthias Klose (doko) wrote :

please could you recheck with a new user, or removed/renamed ~/.mozilla, such that a new profile is created?

Revision history for this message
philinux (philcb) wrote :

I just tried the guest account with this applet using the icedtea plugin.
http://www.thinkbroadband.com/speedtest.html

It did not max out the cpu. Tried same applet logged back in as my normal user and it maxed out 1 core. It maxes out each dual core in turn. Fix is to quit firefox or kill/end process java.

May be profile related then.

Revision history for this message
coln_panic (coln-panic) wrote :

i also had this problem with my initial account on a fresh install of 10.04 64 bit. installed adblock+, greasemonkey, xmarks, flash, then later installed icedtea java. applets work fine, but cpu usage goes to 100% and doesn't cease until firefox is closed. under a new profile (moved .mozilla) plug-in works as expected.

unless it is caused by one of the addons i have, the only other thing i can think of is that i installed icedtea plugin and then used it without restarting firefox. will try to install addons again to see if problem comes back.

Revision history for this message
coln_panic (coln-panic) wrote :

the problem resurfaced after installing xmarks. i disabled xmarks, restarted firefox, problem fixed. re-enabled, restarted, problem back. seems a strange interaction to me, but i'm not familiar with how xmarks does its thing... appears to be the cause of this problem for me at least.

Revision history for this message
TJ (tj) wrote : Re: [Bug 551328] Re: Applets use 100% of CPU

On Sun, 2010-05-02 at 02:16 +0000, coln_panic wrote:
> the problem resurfaced after installing xmarks. i disabled xmarks,
> restarted firefox, problem fixed. re-enabled, restarted, problem back.
> seems a strange interaction to me, but i'm not familiar with how xmarks
> does its thing... appears to be the cause of this problem for me at
> least.
>

Nice insight Coln, thanks.

I don't use that particular plug-in but I do use several others so I'll
do some testing to discover which one causes it, and have a look at the
source-code to try and figure out why.

Revision history for this message
In , Matthias Klose (doko) wrote :

the icedtea plugin and other firefox addons have side effects. install the xmarks addon (configuration isn't necessary), start the sun java test applet: cpu load goes to 100%, closing the page doesn't terminate the process. deinstalling the addon and rechecking doesn't show the 100% load.

Changed in openjdk:
status: Unknown → Confirmed
Revision history for this message
In , Dbhole (dbhole) wrote :

I cannot reproduce this issue. I have xmarks installed and the applets mentioned on https://launchpad.net/bugs/551328 work fine for me...

Changed in openjdk-6 (Debian):
status: Unknown → New
Revision history for this message
In , Mmatejov (mmatejov) wrote :
Changed in openjdk-6 (Debian):
status: New → Fix Released
papukaija (papukaija)
tags: added: lucid
Revision history for this message
Matthias Klose (doko) wrote :

please could you recheck with the openjdk-6 packages in
deb http://ppa.launchpad.net/openjdk/ppa/ubuntu lucid main

Changed in openjdk-6 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (17.9 KiB)

This bug was fixed in the package openjdk-6 - 6b18-1.8-4ubuntu3~9.04.2

---------------
openjdk-6 (6b18-1.8-4ubuntu3~9.04.2) jaunty-security; urgency=low

  * Upload to Jaunty

openjdk-6 (6b18-1.8-4ubuntu3) lucid-proposed; urgency=low

  * Update from the 1.8 branch.
  * Rebuild with fixed ant.
  * Disable building the shark based VM on armel.
  * Always build the ARM assembler interpreter in arm mode.

openjdk-6 (6b18-1.8-4) unstable; urgency=low

  * Update from the 1.8 branch.
    - Plugin and netx fixes.
    - Don't link the plugin against the libxul libraries. Closes: #576361.
    - More plugin cpu usage fixes. Closes: #584335, #587049.
    - Plugin: fixes AppletContext.getApplets().
    - Fix race conditions in plugin initialization code that were causing
      hangs when loading multiple applets in parallel.
  * Fix Vcs-Bzr location. Closes: #530883.
  * Search for unversioned llvm-config tool.
  * Don't set XFILESEARCHPATH and NLSPATH on startup. LP: #586641.
  * Fix chinese font metrics and prefer using 'WenQuanYi Micro Hei' font.
    LP: #472845.
  * Strip libjvm.so with --strip-debug instead of --strip-unneeded.
    LP: #574997.
  * Don't turn on the ARM assembler interpreter when building the shark
    VM.

openjdk-6 (6b18-1.8-3) unstable; urgency=low

  * Update from the 1.8 branch.
    - Plugin fixes. LP: #597714.
  * Add powerpcspe build fixes (Sebastian Andrzej Siewior). Closes: #586359.
  * Work around build failure on buildds configured with low ARG_MAX
    (Giovanni Mascellani). Closes: #575254.

openjdk-6 (6b18-1.8-2ubuntu2) maverick; urgency=low

  * Search for unversioned llvm-config tool.

openjdk-6 (6b18-1.8-2ubuntu1) maverick; urgency=low

  * Upload to maverick.

openjdk-6 (6b18-1.8-2) unstable; urgency=low

  * Update from the 1.8 branch.
    - Fix build on Hitachi SH. Closes: #575346.
    - Shark and Zero fixes.
  * Build shark using llvm-2.7.
  * Don't use shark to run the test harness when testing the shark build.
  * README.Debian: Add paragraph about debugging the IcedTea NPPlugin.

openjdk-6 (6b18-1.8-1) unstable; urgency=low

  * Upload to unstable.

openjdk-6 (6b18-1.8-0ubuntu1) lucid; urgency=low

  * Update IcedTea6 to the icedtea6-1.8 release.
  * Fix builds on Ubuntu/dapper and Debian/lenny.
  * On hppa, configure --without-rhino --disable-plugin.
  * Fix Hitachi SH configury. Closes: #575346.
  * Start a window manager when running the tests. Prefer metacity,
    as more tests pass with it.
  * Let XToolkit.isTraySupported() return true, if Compiz is running.
    Works around sun#6438179. LP: #300948.
  * Make <java_home>/jre/lib/security/nss.cfg a config file.
  * Fail in the configuration of the packages, if /proc is not mounted.
    java currently uses tricks to find its own shared libraries depending
    on the path of the binary. Will be changed in OpenJDK7. Closes: #576453.
  * Fix PR icedtea/469, testsuite failures with the NSS based security
    provider. LP: #556549.
  * Do not pass LD_LIBRARY_PATH from the plugin to the java process.
    While libnss3.so gets loaded from /usr/lib, the dependent libraries
    are loaded from MOZILLA_FIVE_HOME (See #561216 for the wrong firefox
    config). LP: ...

Changed in openjdk-6 (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
In , Asu-3 (asu-3) wrote :

I too cannot reproduce this. The links on https://launchpad.net/bugs/551328 works for me and gives no issues before and after installing xmarks addon. (However firefox refuses to startup with xmarks installed)

Is this still an issue for you?

--Andrew

Revision history for this message
In , Alex Mayorga (alex-mayorga) wrote :

I'm still seeing 120+% CPU using "top" command when loading http://www.javatester.org/version.html on Ubuntu 10.10 64 bit.

Revision history for this message
In , Dbhole (dbhole) wrote :

What version of IcedTea did you use for the latest test?

I installed the xmarks addon and tried http://www.javatester.org/version.html, the applet loads fine and the CPU usage is nominal.

Revision history for this message
In , Alex Mayorga (alex-mayorga) wrote :

Might this be 64 bit only?

alex-mayorga@VPCCW1FFXL:~$ aptitude show icedtea6-plugin
Package: icedtea6-plugin
State: installed
Automatically installed: no
Version: 6b20-1.9.1-1ubuntu3
Priority: extra
Section: web
Maintainer: Ubuntu Developers <email address hidden>
Uncompressed Size: 283k
Depends: openjdk-6-jre (= 6b20-1.9.1-1ubuntu3), xulrunner-1.9.2, libatk1.0-0 (>=
         1.29.3), libc6 (>= 2.3.4), libcairo2 (>= 1.2.4), libfontconfig1 (>=
         2.8.0), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1),
         libgdk-pixbuf2.0-0 (>= 2.21.6), libglib2.0-0 (>= 2.16.0), libgtk2.0-0
         (>= 2.8.0), libpango1.0-0 (>= 1.14.0), libpng12-0 (>= 1.2.13-4),
         libstdc++6 (>= 4.2.1)
Conflicts: icedtea-gcjwebplugin (< 1.0-1ubuntu4)
Replaces: icedtea-gcjwebplugin, openjdk-6-jre (< 6b12)
Description: web browser plugin based on OpenJDK and IcedTea to execute Java applets
 IcedTeaPlugin is a web browser plugin to execute Java applets, supporting
 LiveConnect/JavaScript. It is targeted for xulrunner-1.9 and compatible
 browsers that support the NPAPI.

 IcedTea is a temporary fork of OpenJDK
Homepage: http://openjdk.java.net/

Revision history for this message
In , Alex Mayorga (alex-mayorga) wrote :

Maybe my bug is entirely different as I don't have xmarks addon.
Loading an applet also crashed Mozilla Minefield earlier today, see http://crash-stats.mozilla.com/report/index/64e22535-6944-4f95-9c79-1015f2101029

Revision history for this message
In , Dbhole (dbhole) wrote :

I tried it with a 64-bit VM as well. Are you comfortable trying this with the latest version of the plugin?

You can check it out from:
http://icedtea.classpath.org/hg/icedtea-web

Build instructions are in the README.

Changed in openjdk:
status: Confirmed → In Progress
Changed in openjdk:
importance: Unknown → Medium
Revision history for this message
In , Dbhole (dbhole) wrote :

Unable to reproduce.

Please feel to re-open if you can with IcedTea-Web. See comment #8 for build instructions.

Changed in openjdk:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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