From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26271 invoked by alias); 17 Jun 2011 11:47:38 -0000 Received: (qmail 26245 invoked by uid 22791); 17 Jun 2011 11:47:37 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_GC X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Jun 2011 11:47:23 +0000 From: "ro at gcc dot gnu.org" To: java-prs@gcc.gnu.org Subject: [Bug libgcj/49451] New: FileHandleGcTest FAILS on IRIX X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcj X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 17 Jun 2011 11:47:00 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2011-q2/txt/msg00069.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49451 Summary: FileHandleGcTest FAILS on IRIX Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcj AssignedTo: unassigned@gcc.gnu.org ReportedBy: ro@gcc.gnu.org CC: tromey@gcc.gnu.org, aph@gcc.gnu.org, Hans.Boehm@hp.com Host: mips-sgi-irix6.5 Target: mips-sgi-irix6.5 Build: mips-sgi-irix6.5 The FileHandleGcTest FAILS on IRIX 6.5 (both N32 and N64 ABIs): FAIL: FileHandleGcTest execution - source compiled test FAIL: FileHandleGcTest -findirect-dispatch execution - source compiled test FAIL: FileHandleGcTest -O3 execution - source compiled test FAIL: FileHandleGcTest -O3 -findirect-dispatch execution - source compiled test In the log, I find: /proc open failed This message is ultimately from boehm-gc/dyn_load.c (GC_register_dynamic_libraries) or boehm-gc/os_dep.c (GC_dirty_init). I had to add a discriminator to the message to find it's the former. Running the test under par, I find 1061mS[ 3]FileHandleGcTest(69051502): open("/dev/null", O_RDONLY, 0666) = 1023 1062mS[ 3]FileHandleGcTest(69051502): open("/dev/null", O_RDONLY, 0666) errno = 24 (Too many open files) 1063mS[ 3]FileHandleGcTest(69051502): open("/proc/69051502", O_RDONLY, 0) errn o = 24 (Too many open files) 1063mS[ 3]FileHandleGcTest(69051502): write(2, "/proc open failed\n", 18) = 18 open 1056 0.07 72.78 When in gnu/java/nio/channels/natFileChannelPosix.cc (FileChannelImpl::open) an open call fails, the code runs ::java::lang::System::gc (); ::java::lang::System::runFinalization (); to try and free fds. Unfortunately, in boehm-gc (GC_register_dynamic_libraries) an attempt is made to open /proc/, which of course fails and calls abort(). This doesn't happen on either Solaris or Tru64 UNIX because those use their own implementations of GC_register_dynamic_libraries which don't need additional file descriptors. I guess something similar can be implemented on IRIX, using __rld_obj_head described in rld(5). I''ll probably give it a try.