Re: I get odd time reports from poudriere on armv7 system, under a (non-debug) main [so: 14] FreeBSD.

Mark Millard via freebsd-current <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm,gmane.os.freebsd.current,gmane.os.freebsd.devel.ports
Message-ID <[email protected]>
On 2021-Sep-25, at 23:25, Mark Millard <marklmi at yahoo.com> 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	*/
	     long    tv_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:

           Architecture    void *    long double    time_t
           aarch64         8         16             8
           amd64           8         16             8
           armv6           4         8              8
           armv7           4         8              8
           i386            4         12             4
           mips            4         8              8
           mipsel          4         8              8
           mipselhf        4         8              8
           mipshf          4         8              8
           mipsn32         4         8              8
           mips64          8         8              8
           mips64el        8         8              8
           mips64elhf      8         8              8
           mips64hf        8         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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.