From patchwork Fri Nov 15 17:22:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 291630 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8DBA42C00C3 for ; Sat, 16 Nov 2013 04:22:53 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=FGZD/kAQi4F28whNEq eEi36uhyTb/eNnMpe9D6dIrSUsZY2g/4bIIw1NEgzROmFcZS8xZl6EyEm3YA6sKy LDkQJXAzJZ90madrsn8kjoXQ0QuG/fKul1YtXP0g6le1jKReCnLpTj/sH32W95VO lp6G+18dU7CjOmAREkULsMuT4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=K6ob6CaBdMeX/pEI2Ti5Z/oy Cmw=; b=EzmLccQ2XTgErMTdtgcK7M5IBKx/Ib6Z2yvLDkGdAcULkLLsYZKAflHH twiTXaMTZgJOlY6UDiIJbdlO6cbIDfwCj4fBLIKLyNf6i1pYElRVZo2VESXsQtbd g+8AvPMyGNnbJ/44+Ks9Mwrn3ZOxexNiCVAwvN1FI56jmaHEE6Y= Received: (qmail 32364 invoked by alias); 15 Nov 2013 17:22:43 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 32354 invoked by uid 89); 15 Nov 2013 17:22:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL, BAYES_50, RDNS_NONE, SPF_PASS, URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-oa0-f43.google.com Received: from Unknown (HELO mail-oa0-f43.google.com) (209.85.219.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 15 Nov 2013 17:22:41 +0000 Received: by mail-oa0-f43.google.com with SMTP id g12so4277622oah.16 for ; Fri, 15 Nov 2013 09:22:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=pqK/H2/qFQ8A8W1Q/7yGrHwRGd6wAZJYr+f4DDomQoc=; b=TI7HknD7+zUzmgR5887YDZ5v5jOl9J3F21WldPzt9eZdi3KuT2YZ3CqA9kYy05JRDM BHLh+5X3bmcOGhfYD2y2tK77WILf9WO1kDSDTKR65xDYT+sWRbPzou9unyw43C8PVMze 6V0uChuw3KB4warYtnMToSNan48bpedR87yzPxI2aizLKeTCNLwvlCKRohNO/bfHzfql ajyMhg9/oEynNJ9vo9cX5OOwek8AKkI+QYR59rhttFwjl/2Kf9A3Jn+cKIMZeU/szRQr rj6oV/79vlZLnqc0NB9SBHUyoQwOOPe619M9hMBwPMhOhgOprX76Sc0m7cbnd+SOEsyO Lw6g== X-Gm-Message-State: ALoCoQnCGfb5cp84+kxVukslfRrJYb/i3BQ2nuQPcGcGJaY8+pvVZYrBt0SPb9V4S3EPothHw4skjxgYuBWc3asK0l+//zKdrFubjrkQwoVXEF/lybs4H1x07izIBH6EOxeoeXi0QJfPfrOQ/zqXiEt+3eSocSeWpGjv2TnXpIlPkbDn6Dc+n2wv3az3NufKCF/kPTyXP6vQtLymK8TeIuKawc04A6ZGxw== MIME-Version: 1.0 X-Received: by 10.182.81.197 with SMTP id c5mr8021385oby.40.1384536153689; Fri, 15 Nov 2013 09:22:33 -0800 (PST) Received: by 10.60.145.144 with HTTP; Fri, 15 Nov 2013 09:22:33 -0800 (PST) In-Reply-To: References: Date: Fri, 15 Nov 2013 09:22:33 -0800 Message-ID: Subject: Re: Recent Go patch broke Alpha bootstrap From: Ian Lance Taylor To: Uros Bizjak Cc: "gcc-patches@gcc.gnu.org" , "gofrontend-dev@googlegroups.com" X-IsSubscribed: yes On Fri, Nov 15, 2013 at 4:34 AM, Uros Bizjak wrote: > On Fri, Nov 15, 2013 at 12:35 PM, Uros Bizjak wrote: > >>>>>>> panic: runtime error: invalid memory address or nil pointer dereference >>>>>>> [signal 0xb code=0x1 addr=0x1c] >>>>> >>>>>>> FAIL: runtime/pprof >>>>>>> gmake[2]: *** [runtime/pprof/check] Error 1 >>>>>>> >>>>>>> This one is new, I have to look into it a bit deeper. >>>>>> >>>>>> >>>>>> I don't know what is happening here. I can't recreate it. There was >>>>>> a different problem that could arise in runtime/pprof, that was fixed >>>>>> by a patch I submitted on Saturday >>>>>> (http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01016.html). So it's >>>>>> possible that this is fixed now. >>>>> >>>>> The failure is specific to !USING_SPLIT_STACK targets: >>>> >>>> The same error triggered on CentOS 5.10 x86_64 (another >>>> !USING_SPLIT_STACK target) for 32bit lib (net, runtime). The panic: >>>> string is the same, only addr=0x9f. There are also a couple of >>>> segfaults (database/sql, net/http) and abort in sync/atomic. >>> >>> Could you check to see if this patch fixes the problem? Thanks. > > Oh, I was not clear. > > The patch fixes the net failure on Alpha and Centos 5.10, but other > failures on 32bit Centos 5.10 remain. Thanks for testing it. I've committed the patch to mainline. As I noted in an earlier e-mail, the 32-bit failures are due to a general bug in the middle-end, http://gcc.gnu.org/PR59099 . That bug is causing a miscompilation of the libgo runtime code, code that is written in C. The miscompilation shows up as test failures. Ian diff -r 9b2a1ae08a21 libgo/runtime/proc.c --- a/libgo/runtime/proc.c Thu Nov 14 14:29:49 2013 -0800 +++ b/libgo/runtime/proc.c Thu Nov 14 18:42:54 2013 -0800 @@ -1983,7 +1983,10 @@ #endif gp->gcnext_sp = nil; runtime_memclr(&gp->gcregs, sizeof gp->gcregs); - m->p->syscalltick++; + + // Don't refer to m again, we might be running on a different + // thread after returning from runtime_mcall. + runtime_m()->p->syscalltick++; } static bool