Re: I get odd time reports from poudriere on armv7 system, under a (non-debug) main [so: 14] FreeBSD.
On 9/26/2021 11:05 PM, Mark Millard wrote: > On 2021-Sep-26, at 10:02, Ian Lepore wrote: > >> On Sun, 2021-09-26 at 02:27 -0700, Mark Millard via freebsd-current >> wrote: >>> On 2021-Sep-25, at 23:25, Mark Millard wrote: >>> >>> >>> [...] >>> if (argc == 3 && strcmp(argv[2], "-nsec") == 0) >>> printf("%ld.%ld\n", ts.tv_sec, ts.tv_nsec); >> >> There are two problems with this, both the seconds and nanos are >> printed incorrectly. The correct incantation would be >> >> printf("%jd.%09ld\n", (intmax_t)ts.tv_sec, ts.tv_nsec); >> > > Thanks Ian for looking into more than I did last night. > > Based on the following (up to possible e-mail white space issues), > poudriere-devel seems t be working for reporting times: > > # more /usr/ports/ports-mgmt/poudriere-devel/files/patch-clock > --- src/libexec/poudriere/clock/clock.c.orig2021-09-26 22:24:54.735485000 > -0700 > +++ src/libexec/poudriere/clock/clock.c 2021-09-26 11:46:12.076362000 -0700 > @@ -24,6 +24,7 @@ > * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > > +#include > #include > #include > #include > @@ -71,8 +72,8 @@ > } else > usage(); > if (argc == 3 && strcmp(argv[2], "-nsec") == 0) > - printf("%ld.%ld\n", ts.tv_sec, ts.tv_nsec); > + printf("%jd.%09ld\n", (intmax_t)ts.tv_sec, ts.tv_nsec); > else > - printf("%ld\n", ts.tv_sec); > + printf("%jd\n", (intmax_t)ts.tv_sec); > return (EXIT_SUCCESS); > } Thanks, I've committed it in my local git. Will push out later. -- Bryan Drewery OpenPGP_signature Description: OpenPGP digital signature
Re: I get odd time reports from poudriere on armv7 system, under a (non-debug) main [so: 14] FreeBSD.
On 2021-Sep-26, at 10:02, Ian Lepore wrote: > On Sun, 2021-09-26 at 02:27 -0700, Mark Millard via freebsd-current > wrote: >> On 2021-Sep-25, at 23:25, Mark Millard wrote: >> >> >> [...] >> if (argc == 3 && strcmp(argv[2], "-nsec") == 0) >> printf("%ld.%ld\n", ts.tv_sec, ts.tv_nsec); > > There are two problems with this, both the seconds and nanos are > printed incorrectly. The correct incantation would be > > printf("%jd.%09ld\n", (intmax_t)ts.tv_sec, ts.tv_nsec); > Thanks Ian for looking into more than I did last night. Based on the following (up to possible e-mail white space issues), poudriere-devel seems t be working for reporting times: # more /usr/ports/ports-mgmt/poudriere-devel/files/patch-clock --- src/libexec/poudriere/clock/clock.c.orig2021-09-26 22:24:54.735485000 -0700 +++ src/libexec/poudriere/clock/clock.c 2021-09-26 11:46:12.076362000 -0700 @@ -24,6 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include #include @@ -71,8 +72,8 @@ } else usage(); if (argc == 3 && strcmp(argv[2], "-nsec") == 0) - printf("%ld.%ld\n", ts.tv_sec, ts.tv_nsec); + printf("%jd.%09ld\n", (intmax_t)ts.tv_sec, ts.tv_nsec); else - printf("%ld\n", ts.tv_sec); + printf("%jd\n", (intmax_t)ts.tv_sec); return (EXIT_SUCCESS); } === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Re: I get odd time reports from poudriere on armv7 system, under a (non-debug) main [so: 14] FreeBSD.
On Sun, 2021-09-26 at 02:27 -0700, Mark Millard via freebsd-current wrote: > On 2021-Sep-25, at 23:25, Mark Millard wrote: > > > [...] > if (argc == 3 && strcmp(argv[2], "-nsec") == 0) > printf("%ld.%ld\n", ts.tv_sec, ts.tv_nsec); There are two problems with this, both the seconds and nanos are printed incorrectly. The correct incantation would be printf("%jd.%09ld\n", (intmax_t)ts.tv_sec, ts.tv_nsec); -- Ian
Re: I get odd time reports from poudriere on armv7 system, under a (non-debug) main [so: 14] FreeBSD.
On 2021-Sep-25, at 23:25, Mark Millard wrote: > I get odd time reports from poudriere on an armv7 under main [so: 14]: > > > > # poudriere bulk -jmain-CA7 lang/rust > [00:00:00] Creating the reference jail... done > . . . > [00:00:00] Balancing pool > [main-CA7-default] [2021-09-25_23h11m13s] [balancing_pool:] Queued: 70 Built: > 0 Failed: 0 Skipped: 0 Ignored: 0 Fetched: 0 Tobuild: 70 Time: > -258342:-3:-36 > [00:00:00] Recording filesystem state for prepkg... done > . . . > > > # poudriere bulk -j13_0R-CA7 lang/rust > [00:00:00] Creating the reference jail... done > . . . > [00:00:00] Balancing pool > [13_0R-CA7-default] [2021-09-25_18h06m23s] [balancing_pool:] Queued: 1 > Built: 0 Failed: 0 Skipped: 0 Ignored: 0 Fetched: 0 Tobuild: 1 Time: > -9522:-38:-44 > [00:00:00] Recording filesystem state for prepkg... done > . . . > > > # poudriere bulk -j13_0R-CA7 lang/rust > [00:00:00] Creating the reference jail... done > . . . > [00:00:00] Balancing pool > [13_0R-CA7-default] [2021-09-25_22h52m58s] [balancing_pool:] Queued: 1 > Built: 0 Failed: 0 Skipped: 0 Ignored: 0 Fetched: 0 Tobuild: 1 Time: > -666894:-15:-9 > [00:00:00] Recording filesystem state for prepkg... done > . . . > > > For reference: > > # poudriere version > poudriere-git-3.3.99.20210907_1 > > # uname -apKU > FreeBSD OPiP2E_RPi2v11 14.0-CURRENT FreeBSD 14.0-CURRENT #9 > main-n249019-0637070b5bca-dirty: Sat Sep 4 03:15:41 PDT 2021 > root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA7-nodbg-clang/usr/main-src/arm.armv7/sys/GENERIC-NODBG-CA7 > arm armv7 1400032 1400032 > > # poudriere jail -jmain-CA7 -i > Jail name: main-CA7 > Jail version: 14.0-CURRENT > Jail arch: arm.armv7 > Jail method: null > Jail mount:/usr/obj/DESTDIRs/main-CA7-poud > Jail fs: > Jail updated: 2021-06-27 17:58:33 > Jail pkgbase: disabled > > # poudriere jail -j13_0R-CA7 -i > Jail name: 13_0R-CA7 > Jail version: 13.0-RELEASE-p4 > Jail arch: arm.armv7 > Jail method: null > Jail mount:/usr/obj/DESTDIRs/13_0R-CA7-poud > Jail fs: > Jail updated: 2021-09-06 19:10:46 > Jail pkgbase: disabled > > # chroot /usr/obj/DESTDIRs/main-CA7-poud/ > # uname -apKU > FreeBSD OPiP2E_RPi2v11 14.0-CURRENT FreeBSD 14.0-CURRENT #9 > main-n249019-0637070b5bca-dirty: Sat Sep 4 03:15:41 PDT 2021 > root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA7-nodbg-clang/usr/main-src/arm.armv7/sys/GENERIC-NODBG-CA7 > arm armv7 1400032 1400032 > > # chroot /usr/obj/DESTDIRs/13_0R-CA7-poud/ > # uname -apKU > FreeBSD OPiP2E_RPi2v11 14.0-CURRENT FreeBSD 14.0-CURRENT #9 > main-n249019-0637070b5bca-dirty: Sat Sep 4 03:15:41 PDT 2021 > root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA7-nodbg-clang/usr/main-src/arm.armv7/sys/GENERIC-NODBG-CA7 > arm armv7 1400032 1300139 > This looks to be poudriere's problem . . . poudriere/src/libexec/poudriere/clock/clock.c has: if (argc == 3 && strcmp(argv[2], "-nsec") == 0) printf("%ld.%ld\n", ts.tv_sec, ts.tv_nsec); else printf("%ld\n", ts.tv_sec); where: struct timespec { time_t tv_sec; /* seconds */ longtv_nsec;/* and nanoseconds */ }; but for tv_sec the type is for armv7: /usr/include/machine/_types.h:typedef __int64_t __time_t; /* time()... */ From man arch: Machine-dependent type sizes: Architecturevoid *long doubletime_t aarch64 8 16 8 amd64 8 16 8 armv6 4 8 8 armv7 4 8 8 i3864 12 4 mips4 8 8 mipsel 4 8 8 mipselhf4 8 8 mipshf 4 8 8 mipsn32 4 8 8 mips64 8 8 8 mips64el8 8 8 mips64elhf 8 8 8 mips64hf8 8 8 powerpc 4 8 8 powerpcspe 4 8 8 powerpc64 8 8 8 powerpc64le 8 8 8 riscv64 8 16 8 riscv64sf 8 16 8 %ld is for long arguments, 32-bits in an ILP32 context, not __int64_t (long long) arguments. Applies to armv6, armv7, mips, mipsel, mipselhf, mipshf, mipsn32, powerpc, and powerpcspe. Note: i386 should use %ld for time_t for FreeBSD, despite being IPL32. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
I get odd time reports from poudriere on armv7 system, under a (non-debug) main [so: 14] FreeBSD.
I get odd time reports from poudriere on an armv7 under main [so: 14]: # poudriere bulk -jmain-CA7 lang/rust [00:00:00] Creating the reference jail... done . . . [00:00:00] Balancing pool [main-CA7-default] [2021-09-25_23h11m13s] [balancing_pool:] Queued: 70 Built: 0 Failed: 0 Skipped: 0 Ignored: 0 Fetched: 0 Tobuild: 70 Time: -258342:-3:-36 [00:00:00] Recording filesystem state for prepkg... done . . . # poudriere bulk -j13_0R-CA7 lang/rust [00:00:00] Creating the reference jail... done . . . [00:00:00] Balancing pool [13_0R-CA7-default] [2021-09-25_18h06m23s] [balancing_pool:] Queued: 1 Built: 0 Failed: 0 Skipped: 0 Ignored: 0 Fetched: 0 Tobuild: 1 Time: -9522:-38:-44 [00:00:00] Recording filesystem state for prepkg... done . . . # poudriere bulk -j13_0R-CA7 lang/rust [00:00:00] Creating the reference jail... done . . . [00:00:00] Balancing pool [13_0R-CA7-default] [2021-09-25_22h52m58s] [balancing_pool:] Queued: 1 Built: 0 Failed: 0 Skipped: 0 Ignored: 0 Fetched: 0 Tobuild: 1 Time: -666894:-15:-9 [00:00:00] Recording filesystem state for prepkg... done . . . For reference: # poudriere version poudriere-git-3.3.99.20210907_1 # uname -apKU FreeBSD OPiP2E_RPi2v11 14.0-CURRENT FreeBSD 14.0-CURRENT #9 main-n249019-0637070b5bca-dirty: Sat Sep 4 03:15:41 PDT 2021 root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA7-nodbg-clang/usr/main-src/arm.armv7/sys/GENERIC-NODBG-CA7 arm armv7 1400032 1400032 # poudriere jail -jmain-CA7 -i Jail name: main-CA7 Jail version: 14.0-CURRENT Jail arch: arm.armv7 Jail method: null Jail mount:/usr/obj/DESTDIRs/main-CA7-poud Jail fs: Jail updated: 2021-06-27 17:58:33 Jail pkgbase: disabled # poudriere jail -j13_0R-CA7 -i Jail name: 13_0R-CA7 Jail version: 13.0-RELEASE-p4 Jail arch: arm.armv7 Jail method: null Jail mount:/usr/obj/DESTDIRs/13_0R-CA7-poud Jail fs: Jail updated: 2021-09-06 19:10:46 Jail pkgbase: disabled # chroot /usr/obj/DESTDIRs/main-CA7-poud/ # uname -apKU FreeBSD OPiP2E_RPi2v11 14.0-CURRENT FreeBSD 14.0-CURRENT #9 main-n249019-0637070b5bca-dirty: Sat Sep 4 03:15:41 PDT 2021 root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA7-nodbg-clang/usr/main-src/arm.armv7/sys/GENERIC-NODBG-CA7 arm armv7 1400032 1400032 # chroot /usr/obj/DESTDIRs/13_0R-CA7-poud/ # uname -apKU FreeBSD OPiP2E_RPi2v11 14.0-CURRENT FreeBSD 14.0-CURRENT #9 main-n249019-0637070b5bca-dirty: Sat Sep 4 03:15:41 PDT 2021 root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA7-nodbg-clang/usr/main-src/arm.armv7/sys/GENERIC-NODBG-CA7 arm armv7 1400032 1300139 === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)