Message ID | 1488338603-107524-1-git-send-email-weimin.pan@oracle.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 91533 invoked by alias); 1 Mar 2017 03:23:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 91523 invoked by uid 89); 1 Mar 2017 03:23:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 spammy=pan, Pan, 4417, instructed X-HELO: aserp1040.oracle.com Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 01 Mar 2017 03:23:37 +0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v213NaBG015069 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <gdb-patches@sourceware.org>; Wed, 1 Mar 2017 03:23:36 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v213NZpS008062 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <gdb-patches@sourceware.org>; Wed, 1 Mar 2017 03:23:36 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v213NZqr025033 for <gdb-patches@sourceware.org>; Wed, 1 Mar 2017 03:23:35 GMT Received: from wmpan.us.oracle.com (/10.147.27.127) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 28 Feb 2017 19:23:35 -0800 From: Weimin Pan <weimin.pan@oracle.com> To: gdb-patches@sourceware.org Subject: [PATCH] gdb.base/siginfo-thread.exp: Increase timeout for 'gcore' command Date: Tue, 28 Feb 2017 21:23:23 -0600 Message-Id: <1488338603-107524-1-git-send-email-weimin.pan@oracle.com> |
Commit Message
Weimin Pan
March 1, 2017, 3:23 a.m. UTC
The following failed lines from running test case siginfo-thread: FAIL: gdb.base/siginfo-thread.exp: save a core file (timeout) FAIL: gdb.base/siginfo-thread.exp: extract si_addr FAIL: gdb.base/siginfo-thread.exp: p ssi_addr indicate the testsuite timed out when gdb was instructed to write the core file. The patch below fixes the problem by simply increasing the timeout by a factor of 2 to give gdb more time to generate core files. Tested in sparc64-linux-gnu. No regressions. gdb/testsuite/ChangeLog: 2017-02-22 Weimin Pan <weimin.pan@oracle.com> * gdb.base/siginfo-thread.exp: Increase timeout by a factor of 2 for the 'gcore command. --- gdb/testsuite/gdb.base/siginfo-thread.exp | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-)
Comments
Weimin Pan <weimin.pan@oracle.com> writes: > The following failed lines from running test case siginfo-thread: > > FAIL: gdb.base/siginfo-thread.exp: save a core file (timeout) > FAIL: gdb.base/siginfo-thread.exp: extract si_addr > FAIL: gdb.base/siginfo-thread.exp: p ssi_addr > > indicate the testsuite timed out when gdb was instructed to write the > core file. The patch below fixes the problem by simply increasing the > timeout by a factor of 2 to give gdb more time to generate core files. > > Tested in sparc64-linux-gnu. No regressions. Did you see timeout fails in all gcore related tests? gdb_gcore_cmd is used in many places in gdb testsuite. Did you investigate why it is so slow to generate coredump in gdb?
Yao Qi wrote: > Weimin Pan <weimin.pan@oracle.com> writes: > > >> The following failed lines from running test case siginfo-thread: >> >> FAIL: gdb.base/siginfo-thread.exp: save a core file (timeout) >> FAIL: gdb.base/siginfo-thread.exp: extract si_addr >> FAIL: gdb.base/siginfo-thread.exp: p ssi_addr >> >> indicate the testsuite timed out when gdb was instructed to write the >> core file. The patch below fixes the problem by simply increasing the >> timeout by a factor of 2 to give gdb more time to generate core files. >> >> Tested in sparc64-linux-gnu. No regressions. >> > > Did you see timeout fails in all gcore related tests? gdb_gcore_cmd is > used in many places in gdb testsuite. Did you investigate why it is so > slow to generate coredump in gdb? > > No, only this test failed with timeout and did so consistently. The generated core file was fine. We suspect the slow disk performance was the culprit. Thanks.
On 03/16/2017 04:00 PM, Wei-min Pan wrote: > Yao Qi wrote: >> Did you see timeout fails in all gcore related tests? gdb_gcore_cmd is >> used in many places in gdb testsuite. Did you investigate why it is so >> slow to generate coredump in gdb? >> >> > No, only this test failed with timeout and did so consistently. The > generated core file was fine. > We suspect the slow disk performance was the culprit. I agree with Yao, and I'm not convinced. The generated core file is just "8.6M" on my x86_64 Fedora 23 and the test runs in under 1s here. $ time make check TESTS="*/siginfo-thread.exp" ... real 0m0.781s user 0m0.554s sys 0m0.152s What's the size of the core you get? If you run the test manually, do we notice any kind of slowness? If you have a general slowness issue in your testing host, then this should be affecting all gcore tests the same. We have some tests that generate big cores on purpose even. Thanks, Pedro Alves
Pedro Alves wrote: > On 03/16/2017 04:00 PM, Wei-min Pan wrote: > >> Yao Qi wrote: >> > > >>> Did you see timeout fails in all gcore related tests? gdb_gcore_cmd is >>> used in many places in gdb testsuite. Did you investigate why it is so >>> slow to generate coredump in gdb? >>> >>> >>> >> No, only this test failed with timeout and did so consistently. The >> generated core file was fine. >> We suspect the slow disk performance was the culprit. >> > > I agree with Yao, and I'm not convinced. The generated core file is just > "8.6M" on my x86_64 Fedora 23 and the test runs in under 1s here. > > $ time make check TESTS="*/siginfo-thread.exp" > ... > real 0m0.781s > user 0m0.554s > sys 0m0.152s > > > What's the size of the core you get? If you run the test manually, > do we notice any kind of slowness? > The core size is a little over 9.0M but it took much longer to run this individual test: % time make check TESTS="*/siginfo-thread.exp" ... real 0m11.743s user 0m3.892s sys 0m7.572s And I didn't notice any slowness if the test was run by hand. > If you have a general slowness issue in your testing host, then > this should be affecting all gcore tests the same. We have some > tests that generate big cores on purpose even. > Like I said, only this test consistently failed and the core file generated was not that big. Thanks. > Thanks, > Pedro Alves > >
On 03/16/2017 06:27 PM, Wei-min Pan wrote: > Pedro Alves wrote: >> On 03/16/2017 04:00 PM, Wei-min Pan wrote: >> >>> Yao Qi wrote: >>> >> >> >>>> Did you see timeout fails in all gcore related tests? gdb_gcore_cmd is >>>> used in many places in gdb testsuite. Did you investigate why it is so >>>> slow to generate coredump in gdb? >>>> >>>> >>> No, only this test failed with timeout and did so consistently. The >>> generated core file was fine. >>> We suspect the slow disk performance was the culprit. >>> >> >> I agree with Yao, and I'm not convinced. The generated core file is just >> "8.6M" on my x86_64 Fedora 23 and the test runs in under 1s here. >> >> $ time make check TESTS="*/siginfo-thread.exp" >> ... >> real 0m0.781s >> user 0m0.554s >> sys 0m0.152s >> >> >> What's the size of the core you get? If you run the test manually, >> do we notice any kind of slowness? >> > > The core size is a little over 9.0M but it took much longer to run this > individual test: > > % time make check TESTS="*/siginfo-thread.exp" > ... > real 0m11.743s > user 0m3.892s > sys 0m7.572s > > And I didn't notice any slowness if the test was run by hand. You mean that by hand it went faster than that? So what is GDB doing differently when run via make check that makes it slower than running by hand? >> If you have a general slowness issue in your testing host, then >> this should be affecting all gcore tests the same. We have some >> tests that generate big cores on purpose even. >> > > Like I said, only this test consistently failed and the core file > generated was not that big. Which suggests bumping the timeout is not the right thing to do. Thanks, Pedro Alves
Pedro Alves wrote: > On 03/16/2017 06:27 PM, Wei-min Pan wrote: > >> Pedro Alves wrote: >> >>> On 03/16/2017 04:00 PM, Wei-min Pan wrote: >>> >>> >>>> Yao Qi wrote: >>>> >>>> >>> >>> >>>>> Did you see timeout fails in all gcore related tests? gdb_gcore_cmd is >>>>> used in many places in gdb testsuite. Did you investigate why it is so >>>>> slow to generate coredump in gdb? >>>>> >>>>> >>>>> >>>> No, only this test failed with timeout and did so consistently. The >>>> generated core file was fine. >>>> We suspect the slow disk performance was the culprit. >>>> >>>> >>> I agree with Yao, and I'm not convinced. The generated core file is just >>> "8.6M" on my x86_64 Fedora 23 and the test runs in under 1s here. >>> >>> $ time make check TESTS="*/siginfo-thread.exp" >>> ... >>> real 0m0.781s >>> user 0m0.554s >>> sys 0m0.152s >>> >>> >>> What's the size of the core you get? If you run the test manually, >>> do we notice any kind of slowness? >>> >>> >> The core size is a little over 9.0M but it took much longer to run this >> individual test: >> >> % time make check TESTS="*/siginfo-thread.exp" >> ... >> real 0m11.743s >> user 0m3.892s >> sys 0m7.572s >> >> And I didn't notice any slowness if the test was run by hand. >> > > You mean that by hand it went faster than that? > So what is GDB doing differently when run via make check > that makes it slower than running by hand? > Yes, but not by much faster: % cat in run gcore tmp.gcore quit % time my_gdb siginfo-thread -x in ... real 0m13.327s user 0m3.504s sys 0m7.572s Thanks. > >>> If you have a general slowness issue in your testing host, then >>> this should be affecting all gcore tests the same. We have some >>> tests that generate big cores on purpose even. >>> >>> >> Like I said, only this test consistently failed and the core file >> generated was not that big. >> > > Which suggests bumping the timeout is not the right thing to do. > > Thanks, > Pedro Alves > >
On 03/16/2017 07:10 PM, Wei-min Pan wrote: >> You mean that by hand it went faster than that? >> So what is GDB doing differently when run via make check >> that makes it slower than running by hand? >> > > Yes, but not by much faster: > > % cat in > run > gcore tmp.gcore > quit > > % time my_gdb siginfo-thread -x in > ... > real 0m13.327s > user 0m3.504s > sys 0m7.572s Either I'm missing something, or that was _slower_ than then number you shown of running via the testsuite, not faster... So WDT is GDB doing that takes that long? Is that writing the core to a slow NFS mount or something? Here that takes: real 0m0.120s user 0m0.090s sys 0m0.033s and this is not a state-of-the-art machine. Can you guess the next question? Pick any other core test in the testsuite, do the same and compare the numbers. And if they're different, the next question would then be, "what's different in this test, why's it slower?". If they're similar, then, well, the same question. :-) Thanks, Pedro Alves
Pedro Alves wrote: > On 03/16/2017 07:10 PM, Wei-min Pan wrote: > > >>> You mean that by hand it went faster than that? >>> So what is GDB doing differently when run via make check >>> that makes it slower than running by hand? >>> >>> >> Yes, but not by much faster: >> >> % cat in >> run >> gcore tmp.gcore >> quit >> >> % time my_gdb siginfo-thread -x in >> ... >> real 0m13.327s >> user 0m3.504s >> sys 0m7.572s >> > > Either I'm missing something, or that was _slower_ than then > number you shown of running via the testsuite, not faster... > Sorry, you didn't miss anything. I misspoke :) > So WDT is GDB doing that takes that long? Is that writing > the core to a slow NFS mount or something? > > Here that takes: > > real 0m0.120s > user 0m0.090s > sys 0m0.033s > > and this is not a state-of-the-art machine. > > Can you guess the next question? > > Pick any other core test in the testsuite, do the > same and compare the numbers. > > And if they're different, the next question would > then be, "what's different in this test, why's > it slower?". > OK, just tried a different test which is similar to siginfo-thread: % time make check TESTS="*/siginfo-obj.exp" ... real 0m1.282s user 0m0.736s sys 0m0.400s Looks like the slowness had something to do with the pthread libs. Will investigate. Thanks. > If they're similar, then, well, the same question. :-) > > Thanks, > Pedro Alves > >
diff --git a/gdb/testsuite/gdb.base/siginfo-thread.exp b/gdb/testsuite/gdb.base/siginfo-thread.exp index 825a0d2..872780b 100644 --- a/gdb/testsuite/gdb.base/siginfo-thread.exp +++ b/gdb/testsuite/gdb.base/siginfo-thread.exp @@ -44,15 +44,17 @@ if { ![runto_main] } then { gdb_test "continue" "Thread .* received signal SIGSEGV.*" "continue to signal" # Try to generate a core file, for a later test. -set gcorefile [standard_output_file $testfile.gcore] -set gcore_created [gdb_gcore_cmd $gcorefile "save a core file"] - -set ssi_addr "" -set test "extract si_addr" -gdb_test_multiple "p \$_siginfo" "$test" { - -re "si_addr = ($hex).*$gdb_prompt $" { - set ssi_addr $expect_out(1,string) - pass "$test" +with_timeout_factor 2 { + set gcorefile [standard_output_file $testfile.gcore] + set gcore_created [gdb_gcore_cmd $gcorefile "save a core file"] + + set ssi_addr "" + set test "extract si_addr" + gdb_test_multiple "p \$_siginfo" "$test" { + -re "si_addr = ($hex).*$gdb_prompt $" { + set ssi_addr $expect_out(1,string) + pass "$test" + } } }