From owner-freebsd-bugs Tue May 14 8:52:39 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by hub.freebsd.org (Postfix) with ESMTP id 2CEB137B40B for ; Tue, 14 May 2002 08:52:33 -0700 (PDT) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Tue, 14 May 2002 16:52:26 +0100 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 3.16 #1) id 177eZS-000086-00; Tue, 14 May 2002 16:50:38 +0100 Date: Tue, 14 May 2002 16:50:38 +0100 (BST) From: Jan Grant X-X-Sender: cmjg@mail.ilrt.bris.ac.uk To: Tomas Pluskal Cc: freebsd-bugs , basit , aah , asmodai Subject: Re: linux-jdk1.4.0 & linux_base7.1 In-Reply-To: <20020514104934.A276-100000@s096-n062.tele2.cz> Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-2026989069-1021391438=:8216" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---559023410-2026989069-1021391438=:8216 Content-Type: TEXT/PLAIN; charset=US-ASCII [cc: list snipped a bit] On Tue, 14 May 2002, Tomas Pluskal wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > Hello, > > I am facing a problem that has already been reported several times. Follow > this link for the older reports: > http://www.freebsd.org/cgi/search.cgi?words=4F533F4C494E55580E43505002AB&max=25&sort=score&index=recent&source=freebsd-stable&source=freebsd-hackers&source=freebsd-java&source=freebsd-standards > > The problem is, that Sun Linux JDK 1.4.0 doesn't work correctly with > linux_base 7.1 (it works with 6.1 for me). When I run it as root, it works > OK, but under normal user it crashes immediately: > > # > # HotSpot Virtual Machine Error, Internal Error > # Please report this error at > # http://java.sun.com/cgi-bin/bugreport.cgi > # > # Java VM: Java HotSpot(TM) Client VM (1.4.0-b92 mixed mode) > # > # Error ID: 4F533F4C494E55580E43505002AB > # > Abort trap > > All JDK commands (java, javac, java_vm..) behave the same. > Locale settings doesn't help. > > As Andrew Houghton wrote, the problem is probably in the > linux_sched_getscheduler call: > > linux_sched_getscheduler(0x8f34) ERR#1 'Operation not permitted' > > When I tried to downgrade libpthread.so to 0.8 (from linux_base6.1), java > started, but Swing classes still didn't work and there were many error > messages. > > No one has posted any solution yet. I would like to help debugging this, > but I don't really know where to start... Well, this works for me as root, but fails as a normal user: [attached test case] ...behaviour's the same on recent -stable and on -current, which, looking at the man page, means that non-root processes are failing when it comes to this: The sched_getscheduler() function returns the scheduling policy of the process specified by pid. If a process specified by pid exists and if the calling process has per- mission, the scheduling parameters for the process whose process ID is equal to pid are returned. In this implementation, the policy of when a process can obtain the scheduling parameters of another process are detailed in p1003_1b as a read-style operation. If pid is zero, the scheduling parameters for the calling process will be returned. In this implementation, the sched_getscheduler function will fail if pid is negative. ...which I'm just having a look for now. -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287088 Fax +44 (0)117 9287112 RFC822 jan.grant@bris.ac.uk Rereleasing dolphins into the wild since 1998. ---559023410-2026989069-1021391438=:8216 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="getsched.c" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: sched_getscheduler problem demonstration Content-Disposition: attachment; filename="getsched.c" I2luY2x1ZGUgPHNjaGVkLmg+DQojaW5jbHVkZSA8c3RkaW8uaD4NCg0KaW50 IG1haW4oKSB7DQoNCglwcmludGYoImdldHNjaGVkKDApID0gJWRcbiIsIHNj aGVkX2dldHNjaGVkdWxlcigwKSk7DQpwZXJyb3IoImZvbyIpOw0KDQoJcHJp bnRmKCJwaWQgPSAlZFxuIiwgZ2V0cGlkKCkpOw0KDQoJcHJpbnRmKCJnZXRz Y2hlZCglZCkgPSAlZFxuIiwgZ2V0cGlkKCksIHNjaGVkX2dldHNjaGVkdWxl cihnZXRwaWQoKSkpOw0KcGVycm9yKCJmb28iKTsNCg0KCXJldHVybiAwOw0K fQ0K ---559023410-2026989069-1021391438=:8216-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message