Bug 177779 - java/openjdk7 missing pkg-message about fdescfs and procfs
Summary: java/openjdk7 missing pkg-message about fdescfs and procfs
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Greg Lewis
Depends on:
Reported: 2013-04-11 13:30 UTC by Alexey Loginov
Modified: 2014-06-10 01:35 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Loginov 2013-04-11 13:30:00 UTC
java/openjdk7 still require mounted procfs and fdescfs filesystems.
File jdk/src/solaris/native/java/lang/UNIXProcess_md.c have this lines:

#define FD_DIR "/dev/fd"
#define dirent64 dirent
#define readdir64 readdir
#define FD_DIR "/proc/self/fd"


Add following lines to pkg-message in java/openjdk7 port:

This OpenJDK implementation requires fdescfs(5) mounted on /dev/fd and
procfs(5) mounted on /proc.

If you have not done it yet, please do the following:

	mount -t fdescfs fdesc /dev/fd
	mount -t procfs proc /proc

To make it permanent, you need the following lines in /etc/fstab:

	fdesc	/dev/fd		fdescfs		rw	0	0
	proc	/proc		procfs		rw	0	0

Comment 1 Edwin Groothuis freebsd_committer 2013-04-11 13:30:07 UTC
Responsible Changed
From-To: freebsd-ports-bugs->glewis

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Greg Lewis freebsd_committer 2013-04-29 00:16:59 UTC
State Changed
From-To: open->feedback

You don't need /proc mounted at all.  I certainly don't have it mounted and 
I use openjdk7 without any problems.  You'll also notice that of the code 
snippet you provide it's in the '#else' portion (i.e. the non-BSD part). 

I don't have fdescfs mounted, but I can still look at /dev/fd.  Have you got 
some concrete of examples of leaking file descriptors without it mounted?
Comment 3 Greg Lewis freebsd_committer 2013-07-10 05:55:16 UTC
State Changed
From-To: feedback->closed

Feedback timeout.
Comment 4 Alexey Loginov 2013-07-10 13:32:58 UTC
Yes, this is my mistake about procfs, I think this issue is all about
fdescfs, sorry.
I run Apache Hadoop cluster on top of FreeBSD and openjdk7, and after
some time TaskTracker processes stale with deadlock. After some research
I found some threads waiting for UNIXProcess.c termination, and after
mounting fdescfs this issue is gone.
I can send you jstack out and another required debug information, if you
need it.
Thank you!
Comment 5 Greg Lewis freebsd_committer 2013-07-12 14:57:38 UTC
State Changed
From-To: closed->open

Got some feedback.
Comment 6 Dmitry Sivachenko freebsd_committer 2014-06-07 19:26:19 UTC
I just spend half a day to figure out the same thing: latest openjdk7 do need fdescfs
mounted to run hadoop's tasktracker.

Please add this to pkg-message to save someone else's time.

Comment 7 commit-hook freebsd_committer 2014-06-10 01:34:26 UTC
A commit references this bug:

Author: glewis
Date: Tue Jun 10 01:33:48 UTC 2014
New revision: 357236
URL: http://svnweb.freebsd.org/changeset/ports/357236

  . Add a pkg-message explaining that procfs and fdescfs may be required.

  PR:		177779
  Submitted by:	navymaker@rambler-co.ru

Comment 8 Greg Lewis freebsd_committer 2014-06-10 01:35:21 UTC
Added a pkg-message as suggested.