Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Bug 210191] java/openjdk8: Fix for OpenJDK Network Crash (regression of PR 175417)

7 views
Skip to first unread message

bugzilla...@freebsd.org

unread,
Jun 10, 2016, 9:57:29 AM6/10/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

Bug ID: 210191
Summary: java/openjdk8: Fix for OpenJDK Network Crash
(regression of PR 175417)
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: ja...@FreeBSD.org
Reporter: iamasmi...@gmail.com
Assignee: ja...@FreeBSD.org
Flags: maintainer-feedback?(ja...@FreeBSD.org)

PR 175417 observed that the change to select() 2 from poll() produced crashes
in java/openjdk7.

This was initially provided as a FreeBSD patch to the bsd-port of OpenJDK and
then was adopted upstream directly into bsd-port.

This change was never added to the jdk8 upstream bsd-port at the OpenJDK
mercurial repo and since the patch was previosuly available ustream from jdk7
it was never added to the jdk8 port either.

The result is that java/openjdk8 is susceptible to crashes on network timesouts
just as java/openjdk7 was.

I have personally observed this in a perormance test environment that could
produce the failure within 10 minutes using 6 Tomcat servers using a JMeter
test for one of our applications as the back end infrastructure started to
saturate and introduce network timeouts.

The source file effected is jdk/src/solaris/native/java/net/bsd_close.c which
requires the conditional switch back to using the poll mechanism if not on an
Apple platform.

This file in the upstream differs only in that it lacks this conditional
handling for NET_Timeout for non Apple platforms so this patch has been
effectively reassembled from that change between the bsd-port/jdk8 and
bsd-port/bsd-port for the java/openjdk8 port.

Ideally this should go upstream into bsd-port/jdk8 but for now it is needed in
the FreeBSD port to stabilise any high throughput network applications that may
suffer frequent NET_Timeout conditions.

Crashes in our environment without the patch under Apache Tomcat 8 result in a
wide variety of SIGBUS and SIGSEGV errors often in GCTaskThread or VMThread.

The patch provided can be applied by simply dropping it into
/usr/ports/java/openjdk8/files prior to a port build.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebs...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "freebsd-java...@freebsd.org"

bugzilla...@freebsd.org

unread,
Jun 10, 2016, 9:58:21 AM6/10/16
to

bugzilla...@freebsd.org

unread,
Jun 10, 2016, 9:58:39 AM6/10/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

Andrew Smith <iamasmi...@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Summary|java/openjdk8: Fix for |[PATCH] java/openjdk8: Fix
|OpenJDK Network Crash |for OpenJDK Network Crash
|(regression of PR 175417) |(regression of PR 175417)

bugzilla...@freebsd.org

unread,
Jun 10, 2016, 10:18:59 AM6/10/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

--- Comment #2 from Andrew Smith <iamasmi...@gmail.com> ---
Noting for future reference and porting effort that bsd-ports/jdk9 has
bsd_close here src/java.base/macosx/native/libnet/bsd_close.c and it also lacks
the conditional change back to poll.

bugzilla...@freebsd.org

unread,
Jun 10, 2016, 1:48:20 PM6/10/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

Vladimir Krstulja <vlad...@acheronmedia.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
Summary|[PATCH] java/openjdk8: Fix |java/openjdk8: Fix for
|for OpenJDK Network Crash |OpenJDK Network Crash
|(regression of PR 175417) |(regression of PR 175417)

bugzilla...@freebsd.org

unread,
Jun 10, 2016, 4:01:11 PM6/10/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

--- Comment #3 from Andrew Smith <iamasmi...@gmail.com> ---
I'm not sure if I missed some etiquette here but not that you have removed
[PATCH] from the title which I had previously considered helpful to a
maintainer finding a patch on the PR and seems to be common place.

Not changing it back of course if there is a reason why we shouldn't keep some
additional cue's in the title of the article to help folks who often have a day
job as well as put effort into maintaining these ports.

bugzilla...@freebsd.org

unread,
Jun 10, 2016, 5:05:31 PM6/10/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

--- Comment #4 from Andrew Smith <iamasmi...@gmail.com> ---
Just out of curiosity, are you using Akka in the Scala apps..? I need to finish
my due diligence piece on that so I'm kinda' interested and have heard of some
interesting stability concerns re sun.misc.Unsafe and Akka providing their
own..?

bugzilla...@freebsd.org

unread,
Jun 10, 2016, 5:30:42 PM6/10/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

--- Comment #5 from Andrew Smith <iamasmi...@gmail.com> ---
Previous comment misplayed related to anther bug thread. Apologies

bugzilla...@freebsd.org

unread,
Jun 11, 2016, 6:33:57 PM6/11/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

huan...@gmail.com changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |huan...@gmail.com

--- Comment #6 from huan...@gmail.com ---
This patch also bug Bug 208553.

bugzilla...@freebsd.org

unread,
Jun 11, 2016, 7:13:20 PM6/11/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

Andrew Smith <iamasmi...@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Severity|Affects Only Me |Affects Some People

--- Comment #7 from Andrew Smith <iamasmi...@gmail.com> ---
Seems effects some additonal PRs so change to 'Some People' from self.

bugzilla...@freebsd.org

unread,
Jun 12, 2016, 5:56:51 PM6/12/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

--- Comment #8 from commi...@freebsd.org ---
A commit references this bug:

Author: glewis
Date: Sun Jun 12 21:56:01 UTC 2016
New revision: 416826
URL: https://svnweb.freebsd.org/changeset/ports/416826

Log:
. Use poll() rather than select() on BSD to avoid crashes during network
timeouts. This is forwarded ported from OpenJDK 7.
. Bump PORTREVISION for this fix.

PR: 210191
Submitted by: Andrew Smith <iamasmi...@gmail.com>

Changes:
head/java/openjdk8/Makefile
head/java/openjdk8/files/patch-jdk-src-solaris-native-java-net-bsd_close.c

bugzilla...@freebsd.org

unread,
Jun 12, 2016, 10:40:03 PM6/12/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

Greg Lewis <gle...@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |gle...@FreeBSD.org

--- Comment #9 from Greg Lewis <gle...@FreeBSD.org> ---
I've committed this change to the openjdk8 port. Leaving it open while I get
it into the openjdk8 upstream and openjdk9 upstream.

bugzilla...@freebsd.org

unread,
Jun 13, 2016, 1:07:16 AM6/13/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

--- Comment #10 from Greg Lewis <gle...@FreeBSD.org> ---
I think openjdk9 actually has some issues on where to get this in. The
bsd_close.c file there is only part of the MacOS X build now. We'll need some
additional work to pull it in. I can get it into the openjdk8 upstream though,
since it is just a forward port from openjdk7.

bugzilla...@freebsd.org

unread,
Jun 22, 2016, 9:39:55 AM6/22/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

--- Comment #11 from Andrew Smith <iamasmi...@gmail.com> ---
My OCA has been processed and I now appear on the OCA web page as 'Andrew Smith
- OpenJDK' and am happy for you to sponsor these changes should you wish.

-Andy

bugzilla...@freebsd.org

unread,
Jul 28, 2016, 12:10:30 AM7/28/16
to
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210191

Greg Lewis <gle...@FreeBSD.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|New |Closed

--- Comment #12 from Greg Lewis <gle...@FreeBSD.org> ---
This has been pushed upstream. Thanks Andrew!
0 new messages