From owner-freebsd-java@FreeBSD.ORG Thu Oct 9 15:37:29 2008 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC2B31065692 for ; Thu, 9 Oct 2008 15:37:29 +0000 (UTC) (envelope-from rscheckelhoff@fourcalorieservers.com) Received: from fourcalorieservers.com (66-233-116-31.ral.clearwire-dns.net [66.233.116.31]) by mx1.freebsd.org (Postfix) with ESMTP id 6C8A18FC2C for ; Thu, 9 Oct 2008 15:37:29 +0000 (UTC) (envelope-from rscheckelhoff@fourcalorieservers.com) Received: by fourcalorieservers.com (Postfix, from userid 1002) id 5014817060; Thu, 9 Oct 2008 14:49:09 +0000 (UTC) Date: Thu, 9 Oct 2008 14:49:09 +0000 From: rs To: freebsd-java@freebsd.org Message-ID: <20081009144909.GA1775@fourcalorieservers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: JNI Invocation - BAD SYS CALL X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2008 15:37:29 -0000 Hello FreeBSD java experts: I created a little c++ test program to launch the java vm (JDK1.6.0 on Freebsd 7.0) from native code with jni: ... ... // // Pertinent line of code in test prog // JNI_CreateJavaVM(&jvm,(void **)&env, &vm_args); ... ... When the test program is executed with truss, the following partial result indicates that a call to non-existent ksem_init call is causing SIGSYS. ... ... lstat("/usr",{mode=drwxr-xr-x ,inode=2,size=512,blksize=4096}) = 0 (0x0) lstat("/usr/local",{mode=drwxr-xr-x ,inode=2237440,size=512,blksize=4096}) = 0 (0x0) lstat("/usr/local/jdk1.6.0",{mode=drwxr-xr-x ,inode=2500448,size=512,blksize=4096}) = 0 (0x0) lstat("/usr/local/jdk1.6.0/java",{mode=drwxr-xr-x ,inode=2500507,size=2048,blksize=4096}) = 0 (0x0) gettimeofday({1223561385.433876},0x0) = 0 (0x0) stat("/usr/local/jdk1.6.0/java",{mode=drwxr-xr-x ,inode=2500507,size=2048,blksize=4096}) = 0 (0x0) gettimeofday({1223561385.435170},0x0) = 0 (0x0) gettimeofday({1223561385.435451},0x0) = 0 (0x0) lseek(3,0x2b0d74c,SEEK_SET) = 45143884 (0x2b0d74c) read(3,"PK\^C\^D\n\0\0\0\0\0\M^U\M^Q\f9"...,30) = 30 (0x1e) lseek(3,0x2b0d791,SEEK_SET) = 45143953 (0x2b0d791) read(3,"\M-J\M-~\M-:\M->\0\0\0001\0<\b\0"...,1134) = 1134 (0x46e) gettimeofday({1223561385.436426},0x0) = 0 (0x0) gettimeofday({1223561385.436553},0x0) = 0 (0x0) gettimeofday({1223561385.436811},0x0) = 0 (0x0) gettimeofday({1223561385.436972},0x0) = 0 (0x0) gettimeofday({1223561385.437336},0x0) = 0 (0x0) gettimeofday({1223561385.437588},0x0) = 0 (0x0) gettimeofday({1223561385.437729},0x0) = 0 (0x0) gettimeofday({1223561385.437879},0x0) = 0 (0x0) gettimeofday({1223561385.438150},0x0) = 0 (0x0) gettimeofday({1223561385.537357},0x0) = 0 (0x0) gettimeofday({1223561385.537543},0x0) = 0 (0x0) ksem_init(0xbfbfe87c,0x0,0x2804a419,0x28077200,0x510,0x0) ERR#78 'Function not implemented' SIGNAL 12 (SIGSYS) Subsequent culling of mailing list indicates that 7.0-RELEASE GENERIC kernel does not enable P1003_1B_SEMAPHORES, and so the "Function not implemented" messages is reasonable. Before I go to rebuild the kernel with with additional semaphore option, can anybody tell me if there are issues/caveats with doing this? - Thanks Ron