Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 63553 invoked from network); 30 Aug 2006 15:30:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Aug 2006 15:30:12 -0000 Received: (qmail 79484 invoked by uid 500); 30 Aug 2006 15:29:58 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 79411 invoked by uid 500); 30 Aug 2006 15:29:58 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 79380 invoked by uid 99); 30 Aug 2006 15:29:58 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Aug 2006 08:29:58 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 64.74.244.71 is neither permitted nor denied by domain of geir@pobox.com) Received: from [64.74.244.71] (HELO chi.mobile-health-diary.com) (64.74.244.71) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 30 Aug 2006 08:29:57 -0700 Received: (qmail 24596 invoked from network); 30 Aug 2006 15:29:34 -0000 Received: from ool-43560edb.dyn.optonline.net (HELO ?192.168.1.102?) (geir@67.86.14.219) by b014.internal.mobile-health-diary.com with SMTP; 30 Aug 2006 15:29:34 -0000 Mime-Version: 1.0 (Apple Message framework v752.2) Content-Transfer-Encoding: 7bit Message-Id: <6F10D6EB-4F24-4543-8E41-8B943F24E6DE@pobox.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: harmony-dev@incubator.apache.org From: "Geir Magnusson Jr." Subject: [classlib][luni] signalis interruptus in hysock Date: Wed, 30 Aug 2006 11:29:42 -0400 X-Mailer: Apple Mail (2.752.2) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Time to take another run at this since I didn't get any responses on the drlvm thread. We have the problem that DRLVM uses SIGUSR2 in the thread manager (not an unreasonable thing to do, I believe) but this results in knocking threads out of select() in hysock.c (and I'm sure we'll see it in other places.) Now, I'm not sure what the right course of action is. We have a suggested patch from Artem that suggests we just ignore when the tread is interrupted : --- modules/luni/src/main/native/port/linux/hysock.c +++ modules/luni/src/main/native/port/linux/hysock.c @@ -2570,11 +2570,16 @@ hysock_select (struct HyPortLibrary * po I_32 rc = 0; I_32 result = 0; - result = + do + { + result = select (nfds, readfds == NULL ? NULL : &readfds->handle, writefds == NULL ? NULL : &writefds->handle, exceptfds == NULL ? NULL : &exceptfds->handle, timeout == NULL ? NULL : &timeout->time); + } + while (result == -1 && errno == EINTR); + if (result == -1) { rc = errno; this works, but I'm bothered by the fact that we're just blindly ignoring signals like this. I also think that I need to go and do this everywhere we have a non-restarted interruptable blocking system call. Now, I'd like to get this fixed today, as it's high time for another snapshot of the JRE and HDK, but w/o it, Tomcat runs for 2 seconds at best :) So - does anyone have any other bright ideas? Why don't we see this with J9? Would it be better to do a per-thread signal mask after asking the thread manager what signal it's using du jour? (Andrey noted that Sun allows one to change the signals used, apparently to prevent collision w/ user code vi JNI, I guess...) geir --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org