From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118975 invoked by alias); 12 Mar 2019 19:28:18 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 118967 invoked by uid 89); 12 Mar 2019 19:28:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=H*i:sk:34d2fc8, H*f:sk:34d2fc8 X-HELO: mail-yw1-f65.google.com Received: from mail-yw1-f65.google.com (HELO mail-yw1-f65.google.com) (209.85.161.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Mar 2019 19:28:16 +0000 Received: by mail-yw1-f65.google.com with SMTP id j66so3063634ywc.10 for ; Tue, 12 Mar 2019 12:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golang-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hunl3OpZOn/ZbS9dQE1FW4HaqqmyD5xYr7mKGbCHGPM=; b=XPdjIiJjmrgfz3P1jJ1s/4iNCbV0uVBtQJpgoYYGugqQie9blKT2tFmNSz5ChjMQFp tIlQY7InV6pUJUQBg1pJurwfOatI4n9Cw93+rOwKe6G1HnTwtIXy61mN+8ktrprPzoLS wz95CStA4T2Ec4yOTqs7oHsQEJzTdy9MGw7GgkI12i+bE1vx4br2dyPnFON51toAPJSS IkR+7z9118ML2hvwiuho1py8az9vg2w6WABwD+pOd6l8158wo8GnBWv6gr0Cn/g0EPZ2 /oli37E1KImAcEvImLQ0Bj0CDeLROhZYDxU9vPZylRCrAOkl+TOwNZzC8l4RL21T/B1g p7jg== MIME-Version: 1.0 References: <34d2fc8d-a827-8932-dfbe-4e3327c8cae9@redhat.com> In-Reply-To: <34d2fc8d-a827-8932-dfbe-4e3327c8cae9@redhat.com> From: Ian Lance Taylor Date: Tue, 12 Mar 2019 19:28:00 -0000 Message-ID: Subject: Re: debugging libgo failures To: Aldy Hernandez Cc: GCC Mailing List , Ian Lance Taylor Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00098.txt.bz2 On Tue, Mar 12, 2019 at 11:20 AM Aldy Hernandez wrote: > > I have some libgo failures which I'm pretty sure I caused (see below for > details), but I can't seem to figure out how to reproduce. Before I go > down the rabbit hole, is there an easy way of reproducing say: > > FAIL: database/sql > FAIL: net/http > > I'm used to scouring > x86_64-pc-linux-gnu/libWHATEVER/testsuite/libWHATEVER.log and gaining > insight on how to manually run tests. However, there's nothing in > libgo/testsuite, and libgo/libgo.log just has a summary of tests. > > Ideally I'd like a way of building a test (with say -fdump-tree-all), > and/or sticking gdb on the resulting executable. To run a test, cd to the libgo build directly (TARGET/libgo) and run `make database/sql/check`. To see the exact commands that it runs, including how the compiler is invoked, run `make GOTESTFLAGS=--trace database/sql/check`. To leave the directory behind with the test program, run `make GOTESTFLAGS=--keep database/sql/check`. That will leave a gotestNNNN/test directory. In that directory you can run `LD_LIBRARY_PATH=../../.libs ./a.out -test.short` to run the tests. You can run specific failing tests using a -test.run option. You can of course run gdb on the program. Hope that helps. Ian > --- FAIL: TestMaxIdleConns (0.00s) > sql_test.go:1789: freeConns after set to zero = -1; want 0 > sql_test.go:1798: freeConns = -1; want 0 > panic: runtime error: makeslice: cap out of range [recovered] > panic: runtime error: makeslice: cap out of range > > goroutine 202 [running]: > panic > /home/cygnus/aldyh/src/gcc/libgo/go/runtime/panic.go:588 > testing.tRunner..func1 > /home/cygnus/aldyh/src/gcc/libgo/go/testing/testing.go:765 > panic > /home/cygnus/aldyh/src/gcc/libgo/go/runtime/panic.go:535 > database..z2fsql.DB.Close > > /home/cygnus/aldyh/bld/ranger/x86_64-pc-linux-gnu/libgo/gotest51314/test/sql.go:768 > sql.closeDB > > /home/cygnus/aldyh/bld/ranger/x86_64-pc-linux-gnu/libgo/gotest51314/test/sql_test.go:140 > database..z2fsql.TestMaxIdleConns > > /home/cygnus/aldyh/bld/ranger/x86_64-pc-linux-gnu/libgo/gotest51314/test/sql_test.go:1800 > testing.tRunner > /home/cygnus/aldyh/src/gcc/libgo/go/testing/testing.go:827 > created by testing.T.Run > /home/cygnus/aldyh/src/gcc/libgo/go/testing/testing.go:878 +1163 > FAIL: database/sql > > > [snip] > [snip] > > net..z2fhttp.persistConn.writeLoop > > /home/cygnus/aldyh/bld/ranger/x86_64-pc-linux-gnu/32/libgo/gotest2965/test/transport.go:1888 > created by net..z2fhttp.Transport.dialConn > > /home/cygnus/aldyh/bld/ranger/x86_64-pc-linux-gnu/32/libgo/gotest2965/test/transport.go:1339 > +2693 > > eax 0x0 > ebx 0x2 > ecx 0xcbbdd84c > edx 0x0 > edi 0x0 > esi 0x8 > ebp 0xcbbdd84c > esp 0xcbbdd830 > eip 0xf7f93049 > eflags 0x286 > cs 0x23 > fs 0x0 > gs 0x63 > FAIL: net/http