Subject: kern/35276: linux compatible /proc cannot readlink(): breaks java
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <ggm@apnic.net>
List: netbsd-bugs
Date: 12/19/2006 05:00:00
>Number:         35276
>Category:       kern
>Synopsis:       linux compatible /proc cannot readlink(): breaks java
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 19 05:00:00 +0000 2006
>Originator:     George Michaelson
>Release:        NetBSD 4.99.6
>Organization:
George Michaelson                      email:           ggm@apnic.net
Senior Technical Officer, APNIC          sip:      ggm@voip.apnic.net
http://www.apnic.net                   phone:         +61 7 3858 3100
>Environment:
	
	
System: NetBSD garlique.algebras.org 4.99.6 NetBSD 4.99.6 (GGM_ACPI) #1: Tue Dec 19 13:18:58 EST 2006 ggm@garlique.algebras.org:/data/Build/obj/usr/src/sys/arch/i386/compile/GGM_ACPI i386
Architecture: i386
Machine: i386
>Description:
	java is crapping out with:

Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.

ktrace reveals it dies in:

  2232      1 java     CALL  readlink(0x80555e1,0xbfbfb730,0xfff)
  2232      1 java     NAMI  "/emul/linux/proc/self/exe"
  2232      1 java     NAMI  "/emul/linux"
  2232      1 java     NAMI  "/emul/linux/proc/self/exe"
  2232      1 java     RET   readlink 1
  2232      1 java     CALL  write(2,0x80558c0,0x21)
  2232      1 java     GIO   fd 2 wrote 33 bytes
       "Error: could not find libjava.so"

This is possibly because of recent (security?) changes to procfs.

	
>How-To-Repeat:
	run pkgsrc/lang/sun-jre15 java on current

	
>Fix:
	mm. good question. I'm not even sure it IS the procfs stuff, although
	it looks very suspicious if you back-check the dates of recent changes
	-sometime around November/December this happened, and there was a
	long overdue change applied apart from the security stuff.

	

>Unformatted: