Bug 243454

Summary: java/openjdk8 unsatisfied link inotify
Product: Ports & Packages Reporter: bsdbugs_mr
Component: Individual Port(s)Assignee: Jung-uk Kim <jkim>
Status: Closed FIXED    
Severity: Affects Many People CC: freebsd, ivt, jkim, junovitch, markusalbertgraf, mizhka, puppet, romain, sachin1618, wolfgang
Priority: --- Flags: bugzilla: maintainer-feedback? (java)
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Partial log from net/serviio
none
puppetserver log
none
java/openjdk8: Remove broken inotify compatibility
none
Fix mismerged patch for mapfile-bsd none

Description bsdbugs_mr 2020-01-19 18:00:39 UTC
Created attachment 210875 [details]
Partial log from net/serviio

After openjdk8 upgraded: 8.232.09.1_1 -> 8.242.07.1
I got always ~20 seconds running net/serviio crashes with log attached
Comment 1 Fredrik Eriksson 2020-01-21 18:35:07 UTC
Created attachment 210917 [details]
puppetserver log

Same issue with puppetserver, attached is a log of puppetserver attempting to start using openjdk8-8.242.07.1. Puppetserver starts correctly if I downgrade to openjdk-8.232.09.1_1
Comment 2 wolfgang 2020-01-25 16:53:33 UTC
The same problem happens with astro/josm
Comment 3 Markus Graf 2020-01-27 18:31:28 UTC
The same error stops clojurescript development tool 'shadow-cljs' from working.
Comment 4 Romain Tartière freebsd_committer freebsd_triage 2020-01-30 02:29:54 UTC
I guess that adding "-Dsun.nio.fs.watchservice=polling" to the java(1) parameters might help.

This property is checked to choose between the openjdk upstream provider and the inotify implementation in this patch:
files/patch-jdk-src-solaris-classes-sun-nio-fs-BsdFileSystem.java
Comment 5 wolfgang 2020-01-30 08:24:49 UTC
I can confirm that the suggestion from Comment #4 fixes the problem for astro/josm
Comment 6 Romain Tartière freebsd_committer freebsd_triage 2020-02-04 21:13:45 UTC
Created attachment 211358 [details]
java/openjdk8: Remove broken inotify compatibility

Instead of reverting to a vulnerable version of openjdk8, it might be better to drop the FreeBSD local patches that add the broken "inotify compatibility".
Comment 7 Igor Timkin 2020-02-08 11:59:10 UTC
(In reply to Romain Tartière from comment #4)
Adding "-Dsun.nio.fs.watchservice=polling" fixes the problem for net/serviio.
Comment 8 Jung-uk Kim freebsd_committer freebsd_triage 2020-04-08 20:07:36 UTC
Created attachment 213200 [details]
Fix mismerged patch for mapfile-bsd

Please try this patch.
Comment 9 commit-hook freebsd_committer freebsd_triage 2020-04-08 20:44:05 UTC
A commit references this bug:

Author: jkim
Date: Wed Apr  8 20:43:12 UTC 2020
New revision: 531145
URL: https://svnweb.freebsd.org/changeset/ports/531145

Log:
  Fix linker errors with libinotify.

  A patch was mismerged in the previous update.

  PR:		243454

Changes:
  head/java/openjdk8/Makefile
  head/java/openjdk8/files/patch-jdk-make-mapfiles-libnio-mapfile-bsd
Comment 10 Jung-uk Kim freebsd_committer freebsd_triage 2020-04-08 20:45:03 UTC
I just went ahead and committed it.  Please let me know if it does not work for you.
Comment 11 Jason Unovitch freebsd_committer freebsd_triage 2020-04-09 14:29:48 UTC
(In reply to Jung-uk Kim from comment #10)

Good day. The patched OpenJDK no longer causes the run time issue in net/serviio based on run time testing on 11.3-RELEASE amd64 and 12.1-RELEASE amd64.  Thank you very much for addressing this.  Can you MFH to quarterly given the branch was cut with this?
Comment 12 Romain Tartière freebsd_committer freebsd_triage 2020-04-10 18:21:46 UTC
(In reply to Jung-uk Kim from comment #10)
puppetserver starts correctly after the update.  Thanks from puppet@