openjdk-6-jre-headless/sun-java6-bin install hangs ssh access

Bug #310898 reported by Dulio Matos on 2008-12-23
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu on EC2
Undecided
Unassigned
Beta2
Undecided
Unassigned

Bug Description

Steps to reproduce:
- Create instance with ami-814aaee8
- login using ssh
- apt-get update
- apt-get install openjdk-6-jdk

Output when it stops:
...
Setting up x11proto-input-dev (1.4.3-2ubuntu6) ...
Setting up x11proto-xext-dev (7.0.2-6build1) ...
Setting up openjdk-6-jre-headless (6b12-0ubuntu6) ...

Hangs at this point, no input is accepted, no new ssh connection works
Ping works for about 2 minutes and then no response is received

Only installed postgresql when asked the packages to install

Eric Hammond (esh) wrote :

I was able to reproduce the problem following the described steps, though my instance seemed to remain pingable. Other existing ssh connections to the instance were also hung and eventually timed out.

Changed in ubuntu-on-ec2:
status: New → Confirmed
Eric Hammond (esh) wrote :

Alf Eaton noted that the same problem happens when installing sun-java6-bin and I have confirmed it:

Setting up libxtst6 (2:1.0.3-1) ...

Setting up sun-java6-bin (6-10-0ubuntu2) ...
Timeout, server not responding.

Ivan Wong (email-ivanwong) wrote :

I had the same problem. But after a ec2reboot, `apt-get install -f` ran successfully.

Ivan Wong (email-ivanwong) wrote :

I did a few more tests on sun-java6-bin.postinst and found that this line:

/usr/lib/jvm/java-6-sun-1.6.0.10/bin/java -Xshare:dump -client -Xshare:dump -Xmx256m -XX:PermSize=128m

hangs the instance. Removing "-Xmx256m" will fix it:

/usr/lib/jvm/java-6-sun-1.6.0.10/bin/java -Xshare:dump -client -Xshare:dump -XX:PermSize=128m

I hope this bug can be fixed. Our company now has to build our own java6 package with modified postinst.

Chuck Short (zulcss) wrote :

I was able to install java fine with the new image I am working on, so it should be fixed for the next beta.

regards
chuck

Chuck Short (zulcss) on 2009-01-21
Changed in ubuntu-on-ec2:
status: Confirmed → In Progress
tiago neves (mail-tiago-neves) wrote :

I have the same problem and none of the suggested solutions worked... I've got around some other minor bugs already reported here also but this one is giving me headaches... it just stucks every time it's configuring headless:
Setting up openjdk-6-jre-headless (6b12-0ubuntu6.1) ...
I go and clean the temporary files in dpkg/updates/ but no way to get around to finish setup of openjdk-6-jre-headless (6b12-0ubuntu6.1) ...
Chuck, when will that beta2 come out? thanks

tiago neves (mail-tiago-neves) wrote :

By the way, let me just add that this error happened on the 32bit ami... on 64 bit it runs ok...

Chuck Short (zulcss) wrote :

This is fixed with the new kernels for beta2.

Changed in ubuntu-on-ec2:
milestone: none → beta2
Chuck Short (zulcss) wrote :

This will be fixed for beta2.

Changed in ubuntu-on-ec2:
status: In Progress → Fix Committed
Chuck Short (zulcss) on 2009-02-27
Changed in ubuntu-on-ec2:
status: Fix Committed → Fix Released
DanielBodart (dan-bodar) wrote :

This bug is back in
AMI ID: ami-ccf405a5 (32 bit EBS Micro 10.10 edition)

Joris Verschoor (jbverschoor) wrote :

Confirmed broken on ami-311f2b45, 32 bit ebs micro 10.04

Joris Verschoor (jbverschoor) wrote :

This was when installing jenkins, which depends on openjdk-6-jdk

Setting up gcj-4.4-jre-lib (4.4.3-1ubuntu4) ...
Setting up openjdk-6-jre-headless (6b20-1.9.5-0ubuntu1~10.04.1) ...
update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/bin/java to provide /usr/bin/java (java) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/bin/keytool to provide /usr/bin/keytool (keytool) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/bin/pack200 to provide /usr/bin/pack200 (pack200) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/bin/rmid to provide /usr/bin/rmid (rmid) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/bin/rmiregistry to provide /usr/bin/rmiregistry (rmiregistry) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/bin/unpack200 to provide /usr/bin/unpack200 (unpack200) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/bin/orbd to provide /usr/bin/orbd (orbd) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/bin/servertool to provide /usr/bin/servertool (servertool) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/bin/tnameserv to provide /usr/bin/tnameserv (tnameserv) in auto mode.
update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode.
Timeout, server not responding.

Joris Verschoor (jbverschoor) wrote :

Both dpkg --configure -a and apt-get install -f don't work.

Paul O'Leary McCann (polm-e) wrote :

I have this in a natty micro ami. The previous fix mentioning postinst worked for me, namely to change this line:

$basedir/bin/java -client -Xshare:dump -Xmx256m -XX:PermSize=128m

which would never exit, to this:

$basedir/bin/java -client -Xshare:dump -XX:PermSize=128m

It still takes ten minutes, which seems ridiculous... The block that runs this should probably be removed from postinst and suggested as an option by console output, since it's not necessary for java to run.

Note this didn't give me any actual trouble with SSH, though when running this aptitude doesn't respond to CTRL+C and the machine might become quite slow. -POLM

Hardik Ruparel (hardik988) wrote :

I have a Maverick micro instance (ami-7c758c15) and when I tried to install ec2-api-tools, I encountered this bug. I gave a Ctrl+C signal and quit because it hung for too long. Now when I try to install any other packages it asks me to run 'dpkg --configure -a'.

When I do that, it gets stuck again. None of the above mentioned solutions seem to work for me. Any ideas ?

Paul O'Leary McCann (polm-e) wrote :

Hardik:

Get two shells on your machine and run dpkg --configure -a in one of them. It may try to finish the install of java; wait a minute or two until it hangs, then in the other shell run this:

ps aux | grep postinst

If you see something there about java, my fix should work for you. Kill the postinst process, edit the file (something.postinst) as I describe in #14, and try again. Be prepared to wait a while, though... -POLM

Paul O'Leary McCann (polm-e) wrote :

I've attached a script that will work around this issue. This script:

1. Indicates agreement with the Java license
2. Adds the repo http://archive.canonical.com/ natty/partner
3. Downloads and unpacks sun-java6-bin
4. Removes the offending flag from postinst
5. Installs sun-java6-jdk

The explanation is only slightly shorter than the script, so it should be easy to make a change if you need to.

Note the script should be run as root since you need to muck about in /etc beside running aptitude.

Jonas Ørting (jonas-orting) wrote :

Oneiric beta1 (wtf? - this name is even hard to spell right!)...

Using the images in EU1 (I assume they're identical across zones, but just in case):
A 32 bit EBS (ami-5af6c52e) on a micro instance. A handfull of python packages installed, but otherwise clean. Hangs while trying to install solr-jetty at
update-alternatives: using /usr/lib/jvm/java-6-openjdk/jre/lib/jexec to provide /usr/bin/jexec (jexec) in auto mode.

The machine still responded - although it was extremely sluggish. top showed 60-98%CPU for java, negligible memory allocation.

A 64 bit EBS (ami-44f6c530) on a micro instance. Installed solr-jetty without issue.

Scott Moser (smoser) wrote :

Jonas,
  You're seeing bug 634487. Go there for a better description of the current issue.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments