OpenJDK segfaults when trying to get a fully-qualified hostname longer than 65 characters

Bug #1510445 reported by Dan Watkins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openjdk-7 (Ubuntu)
New
Undecided
Unassigned

Bug Description

You can see it happening twice in the jenkins.log at http://paste.ubuntu.com/12978388/

I believe this is http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7089443 upstream.

I ran in to this problem when trying to run a Java application (Jenkins) in Juju on GCE because, due to the host naming conventions in the Juju GCE provider, the fully-qualified hostname is guaranteed to be over the limit.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: openjdk-7-jre-headless 7u79-2.5.6-0ubuntu1.14.04.1
ProcVersionSignature: User Name 3.19.0-28.30~14.04.1-generic 3.19.8-ckt5
Uname: Linux 3.19.0-28-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.16
Architecture: amd64
Date: Tue Oct 27 09:44:01 2015
SourcePackage: openjdk-7
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Dan Watkins (oddbloke) wrote :
Revision history for this message
Dan Watkins (oddbloke) wrote :

The SRU that just landed in trusty did not fix this.

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.

The bug report linked is a duplicate of http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7112670, which has been fixed on OpenJDK 8. Although there does not seems to be a specific backport of it to OpenJDK 7, a source code comparison between OpenJDK 7 and 8 seems to indicate that it to be fixed on 7 as well.

Here is one bug report that seems to relate to the issue you described: https://github.com/travis-ci/travis-ci/issues/1484

The fix there is to add a "127.0.0.1 <hostname>" entry to /etc/hosts, could you please check if that would fix your issue?

Otherwise could you please state what specific steps should we take to recreate this bug? This will help us to find and resolve the problem.

Changed in openjdk-7 (Ubuntu):
status: New → Incomplete
Revision history for this message
Dan Watkins (oddbloke) wrote :

So amending the 127.0.0.1 line to "127.0.0.1 <hostname> <FQDN>"in /etc/hosts does allow Jenkins to start. If I don't include the FQDN, then I get the below in the log, which is troubling.

Oct 30, 2015 3:10:29 PM javax.jmdns.impl.constants.DNSRecordClass classForIndex
WARNING: Could not find record class for index: -1
Oct 30, 2015 3:10:29 PM javax.jmdns.impl.DNSIncoming readAnswer
SEVERE: Could not find record class. domain: ff4d45a8-2da7-4325-8ce4-6a788f6078a7-machine-.6-c-ubuntu-oddbloke-internal^Elocal^@^@^A^A^@^@^N^P^@^D
<CC><80>^F. type: TYPE_IGNORE index 0
dns[response,10.240.0.6:5353, length=113, id=0x0, flags=0x8400:r:aa]
   0: 0000840000000001 000000004f6a756a 752d666634643435 61382d326461372d ........ ....Ojuj u-ff4d45 a8-2da7-
  20: 343332352d386365 342d366137383866 3630373861372d6d 616368696e652d31 4325-8ce 4-6a788f 6078a7-m achine-1
  40: 362d632d7562756e 74752d6f6464626c 6f6b652d696e7465 726e616c056c6f63 6-c-ubun tu-oddbl oke-inte rnal.loc
  60: 616c000001800100 000e1000040af000 06 al...... ........ .

Revision history for this message
Dan Watkins (oddbloke) wrote :

Also, I _have_ provided a reliable way of reproducing this: you try to start Jenkins on a machine with a long fully-qualified hostname and observe failure in /var/log/jenkins/jenkins.log.

A manual workaround for a bug does not mean that it isn't a bug that should be fixed. :)

Changed in openjdk-7 (Ubuntu):
status: Incomplete → New
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.