From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id D9D6B3857359 for ; Tue, 24 Oct 2023 11:39:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D9D6B3857359 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D9D6B3857359 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1030 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698147572; cv=none; b=QRGoR3R7o/bY2wG93laE7e9tSYd0fafBykCgFTNzmDg2CNbx5+9y2OXb5svjm2t4DZmAZwBcBX3+M0U5UVwDqQHcIqB3rjfIgd0AMzAj7pkB2qlSwQGx3erU90G9jl2qYpWj34Ndqgg10wzpJr9J6aoVxaZluRAa3B15v0ij7lE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698147572; c=relaxed/simple; bh=Ozrxf7LRBdnyPt7+QLcjvs4/Y/pBkS+Lkw8GqtLoudk=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=X1e2y1XpQIWWEalGUNhShamrGW5RQxEb40QyESz6syb8Bsf01RbLF5D/BUaecR36YjtEoaXfwlq5URL+TyIZmGIp5UGR9xsuzSdA30JnhV9z652hdMVDzkDlOJ3Omm3qQe+gP1C0oaWczpmNfWvIexfuvtTz6z+cX7hCvtuVltA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-27cfb8442f9so2896739a91.2 for ; Tue, 24 Oct 2023 04:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698147569; x=1698752369; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=wahG5ZIp0uNp2IS8GUTFdl88BGVhA/3JcUm/o0a2d2s=; b=rlvl1ywExhPcjRVb7+pn9hvK08OM+pZiSK+1xMfWo9befIYwRS1bXbhyBtWBoEvlH/ VGk/p4K6KH0ptD7wFqHg2lRzyaJGp4OdCiHEuof8KbHzzeBoYz68tvv5Flr+bUaIWhwa saZShhmLmOgcSEmX4j2ffqY1UpXh2RY1dXxzeUHZd+MdSurfukVKzBvgrBRmIJft71hS Yj3vOARjQKngxtozQFmWw81JH4CUgHiuZra9eYZ6jsSR1q5AjMIpQZVIHoHss6UYqpy+ wz5AveTLDvK83u/qf+1+d8pT5OMmURMyL8KtVQJEBki0Tak3uM+Pea/D1mce4Q3Bu5JG jTuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698147569; x=1698752369; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wahG5ZIp0uNp2IS8GUTFdl88BGVhA/3JcUm/o0a2d2s=; b=Muz34SSMM69v5LkrolKFZYbMJHhx8shRT7otIqWRtW7i+hIHMJlpCwzWT9utnghHdi MO3q/TYKlFXyjEmFpO8j0rmpFLffTizzAeEvnRsTuW0De5qDRe92CRazPlAtxQs8R+qa z9gf9JOhbNUgVRl6sOXC7Zo2tBkfWz+Hgwt9zMOE8CO2h6c9bU7UsxtVHSZxiovbA+jq lmdIV604oFxz+Oh11Tyn00STQCJDlhS82PHr1ucmPra8l8nVVAdn28QXaPPH0CT8z8Ak 5Nsp1j3oN0Zc08MTkxfGOudZe8XcEqie0G/xzjtBdwfQDGIUIPUPuMXne//1SHRJ784O KoyQ== X-Gm-Message-State: AOJu0YzctJI1dykVod6o8gdNj29NrT0Ex1Jc6ZoOhCp474/jY1c9/PwF B1K1Uiv9N8WAG7NIi339NP78Jg== X-Google-Smtp-Source: AGHT+IERspFEq1p+6GVbqz9y94w8pz8sv6/sCA7wHNLDRRH7jyAaQREWbukrYpWGcTMaXUatwhNUlA== X-Received: by 2002:a17:90a:1a04:b0:27e:1ea0:c6fc with SMTP id 4-20020a17090a1a0400b0027e1ea0c6fcmr7926005pjk.6.1698147568788; Tue, 24 Oct 2023 04:39:28 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c3:a647:f05a:5f8b:2693:4fff? ([2804:1b3:a7c3:a647:f05a:5f8b:2693:4fff]) by smtp.gmail.com with ESMTPSA id e63-20020a17090a6fc500b0027df405b49bsm7828785pjk.21.2023.10.24.04.39.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Oct 2023 04:39:27 -0700 (PDT) Message-ID: <63ac69ac-ff55-4c6f-a40b-bf617e5ccfdc@linaro.org> Date: Tue, 24 Oct 2023 08:39:24 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] RISC-V: Enable static-pie. Content-Language: en-US To: "Wang, Yanzhang" , Palmer Dabbelt Cc: DJ Delorie , Darius Rad , "libc-alpha@sourceware.org" References: <1d075708-675d-0ad6-e51c-f911f09ee084@linaro.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 24/10/23 02:59, Wang, Yanzhang wrote: > Hi Adhemerval, > > Thanks for your comments and the two categories cases are all figured out. > > For the timed out cases, I increased the TIMEOUTFACTOR to 300 and finally passed. > The 100 seems not working very well. Excellent. > > For the case elf/tst-tls-allocation-failure-static-patched, the root cause is it > does not run with test-wrapper. I use cross-test-ssh.sh to run tests on the board. > If no test-wrapper, it will run on my local. That's why exec format error. Alright, so I don't have any further remarks for this patch. > > I need to apply another patch below. Is it acceptable or I need to run the full > test directly on board? > > diff --git a/elf/Makefile b/elf/Makefile > index 9176cbf1e3..1065b5c123 100644 > --- a/elf/Makefile > +++ b/elf/Makefile > @@ -2979,7 +2979,7 @@ $(objpfx)tst-tls-allocation-failure-static-patched: \ > > $(objpfx)tst-tls-allocation-failure-static-patched.out: \ > $(objpfx)tst-tls-allocation-failure-static-patched > - $< > $@ 2>&1; echo "status: $$?" >> $@ > + $(test-wrapper) $< > $@ 2>&1; echo "status: $$?" >> $@ > grep -q '^Fatal glibc error: Cannot allocate TLS block$$' $@ \ > && grep -q '^status: 127$$' $@; \ > $(evaluate-test) This would require to be in a different path, could you send it as well? > > >> -----Original Message----- >> From: Adhemerval Zanella Netto >> Sent: Tuesday, October 17, 2023 9:42 PM >> To: Wang, Yanzhang ; Palmer Dabbelt >> >> Cc: DJ Delorie ; Darius Rad ; libc- >> alpha@sourceware.org >> Subject: Re: [PATCH] RISC-V: Enable static-pie. >> >> >> >> On 21/09/23 10:47, Wang, Yanzhang wrote: >>> Thanks for all your comments, Palmer, DJ, Dairus and Adhemerval. >>> Your suggestions are so helpful to me. >>> >>> Yes. I also found this issue on GitHub too and the math failures >>> didn't appear with QEMU system. So it's definitely a hardware bug. >>> >>> And I found the root cause of almost of the other failures. It's >>> because I use sshfs not nfs. :( .. >> >> I don't have access to RISCV hardware, but we can use the 2.38 release [1] >> as the baseline [1]. >> >>> >>> Even though I set a larger TIMEOUTFACTOR as you said, there're still >>> some timeout failures like below. And seems the timeout is not stable. >>> Sometimes, nptl/tst-stack4 can pass on lp4a and sometimes not. >> >> The tst-stack4 was a long standing issue that should be fixed on master >> [2]. >> >>> >>> master with qemu-system master on lp4a static- >> pie patch on lp4a >>> ----------------------------- ----------------------------- ---------- >> ------------------- >>> resolv/tst-resolv-res_ninit resolv/tst-resolv-res_ninit >> resolv/tst-resolv-res_ninit >>> nptl/tst-stack4 nptl/tst-stack4 >> iconvdata/tst-loading >>> libio/tst-fopenloc libio/tst-fopenloc >> localedata/tst-leaks >>> iconvdata/tst-loading iconvdata/tst-loading >> malloc/tst-dynarray-fail >>> localedata/tst-leaks localedata/tst-leaks >> posix/tst-fnmatch >>> malloc/tst-dynarray-fail malloc/tst-dynarray-fail >>> posix/tst-glob-tilde posix/tst-glob-tilde >>> posix/tst-fnmatch posix/tst-fnmatch >> >> >> For static-pie I would focus on the *static* tests and check for any >> regressions. >> On the above, all are dynamic and most likely the timeout you have found >> are due a low TIMEOUTFACTOR value. >> >> You can check by testing each one individually: >> >> $ TIMEOUTFACTOR=100 make test t= # for instance, posix/tst-fnmatch >> >>> >>> For the FAIL tests, it's like below. The math failures are filtered >>> out on lp4a and not appear on qemu-system. >>> >>> master with qemu-system master on lp4a >> static-pie patch on lp4a >>> ----------------------------------------------- ---------------------- >> ------------------------- ----------------------------------------------- >>> resolv/mtrace-tst-resolv-res_ninit resolv/mtrace-tst- >> resolv-res_ninit resolv/mtrace-tst-resolv-res_ninit >>> nptl/tst-cancel21-static libio/tst-fopenloc- >> mem elf/tst-tls-allocation-failure-static- >> patched >>> libio/tst-fopenloc-mem libio/tst-fopenloc- >> cmp elf/tst-rtld-list-diagnostics >>> libio/tst-fopenloc-cmp elf/tst-tls- >> allocation-failure-static-patched elf/tst-sprof-basic >>> elf/tst-tls-allocation-failure-static-patched elf/tst-rtld-list- >> diagnostics iconvdata/mtrace-tst-loading >>> elf/tst-rtld-list-diagnostics elf/tst-sprof-basic >> localedata/mtrace-tst-leaks >>> elf/tst-sprof-basic iconvdata/mtrace-tst- >> loading malloc/tst-dynarray-fail-mem >>> iconvdata/mtrace-tst-loading localedata/mtrace- >> tst-leaks posix/tst-fnmatch-mem >>> localedata/mtrace-tst-leaks malloc/tst-dynarray- >> fail-mem >>> malloc/tst-dynarray-fail-mem posix/tst-glob-tilde- >> mem >>> posix/tst-glob-tilde-mem posix/tst-fnmatch-mem >>> posix/tst-fnmatch-mem >>> posix/globtest >> >> The elf/tst-sprof-basic seems to be a know issue based on 2.38 release >> wiki, and most of them seems also for related to the low TIMEOUTFACTOR. >> >>> >>> Take master on lp4a as an example, >>> >>> - elf/tst-rtld-list-diagnostics, due to missing abnf module >>> - elf/tst-sprof-basic, successfully print hello world but return >>> status is 1, still unknown root cause >>> - elf/tst-tls-allocation-failure-static-patched, exec format error, >>> still unknown root cause >> >> This seems to be a real regression, and I think you should sort this out >> before the patch is installed (I see no failure on qemu-user on master). >> The exec format error seems to come from kernel, due the execve failure; >> and might a corrupted binary. >> >>> - the others are memory not freed >>> >>> The difference between qemu-system and lp4a for master is the two >>> cases, >>> >>> - nptl/tst-cancel21-static, it said sa_flags = SA_ONSTACK and haven't >> investigated. >> >> This might a unrelated issue [3], either in compiler optimization or due >> the the long-standing BZ#12683 issue. >> >>> - posix/globtest, because my qemu-system has a different user name. >>> >>> The XFAILs and XPASSes are the same on all platforms and all branches. >>> So not list here. >>> >>> I use the commit 4be913652ca115160bae1daf560170ef8b112ccb of master >> branch. >>> >>> So is this the expected test result? Or is there still any case not >> correct FAIL or PASS? >> >> I think the output look pretty ok, the only issue being the elf/tst-tls- >> allocation-failure-static failure. >> >> >> [1] https://sourceware.org/glibc/wiki/Release/2.38#RISC- >> V_.28rv64imac.2Flp64.29 >> [2] https://sourceware.org/bugzilla/show_bug.cgi?id=19329 >> [3] https://sourceware.org/pipermail/libc-alpha/2019- >> September/106641.html