Starting out from the normal login shell, sh: $ ksh93 $ time ../src/cmd/ksh93/sh/xec.c:2171: failed assertion 'tb.tv_sec' Abort trap (core dumped) $ ksh93 $ times ../src/cmd/ksh93/sh/xec.c:2171: failed assertion 'tb.tv_sec' Abort trap (core dumped) Also, what braindamaged person decided it was a good idea to make the ksh93 package be an ALPHA RELEASE rather than a stable release? $ ksh93 $ echo $KSH_VERSION Version A 2020.0.0-alpha1 I didn't expect to be beta testing or alpha testing a shell when I installed ksh93 some time ago. I actually use this shell both interactively and in scripts and I need it to work. This isn't OK. Please revert to Version AJM 93u+ 2012-08-01 Other info in case it's necessary: $ freebsd-version -kru 12.0-RELEASE-p9 12.0-RELEASE-p9 12.0-RELEASE-p9 $ uname -a FreeBSD nyann.tanasinn.mochi 12.0-RELEASE-p9 FreeBSD 12.0-RELEASE-p9 GENERIC amd64 Let me know if you need the core file sent or something.
Can you try ksh93-devel port? If it fixes it I'll scour the att/ast github logs to find the patch. If it does not fix it I'll open an issue with att/ast on github.
However, time [command] works as expected, as when trying out time ls and time sleep 1
(In reply to Cy Schubert from comment #1) Shall do in a moment, but maybe you should've put the alpha version in ksh93-devel instead of ksh93.
(In reply to Cy Schubert from comment #1) Just tested. This problem does not exist in ksh93-devel and things related to time and times work correctly.
change: /src/cmd/ksh93/sh/xec.c: 2170 timeofday(&ta); to 2170 timeofday(&tb); should fix time times is working on my machine.
Actually, shells/ksh93 is alpha. This was done because many people complained to att/ast that the previous version had many bugs which were unaddressed. Even though they were not prepared for a new release they tagged 2020-0-0 to satisfy the calls by users for a new ksh93 release. The last PRs submitted to FreeBSD documented many serious issues. One of the att/ast developers recommended to us that we use 2020-0-0 instead of the last released (ancient) ksh93. This fixed all open FreeBSD ksh93 PRs. Unfortunately we now have a new one. ksh93-devel is their development branch. We can consider it pre-alpha. I have ksh93-devel installed here (I should have remembered that but I'm deep into an ipfilter problem right now -- my head is elsewhere). With ksh93-devel, slippy$ time user 0m0.000s sys 0m0.000s slippy$ echo $KSH_VERSION Version A 2020.0.0-alpha1 slippy$ I'll look through their git logs to find the patch.
(In reply to Cy Schubert from comment #6) I see. Thank you for the info!
(In reply to w.schwarzenfeld from comment #5) Upstream has replaced timeofday with gettimeofday(), so yes. That is the correct fix.
Committed to my local git tree, git svn dcommit in progress.
A commit references this bug: Author: cy Date: Wed Aug 7 18:31:14 UTC 2019 New revision: 508344 URL: https://svnweb.freebsd.org/changeset/ports/508344 Log: Fix: $ ksh93 $ time ../src/cmd/ksh93/sh/xec.c:2171: failed assertion 'tb.tv_sec' Abort trap (core dumped) $ ksh93 $ times ../src/cmd/ksh93/sh/xec.c:2171: failed assertion 'tb.tv_sec' Abort trap (core dumped) PR: 239701 Suggested by: w.schwarzenfeld@utanet.at MFH: 2019Q3 Changes: head/shells/ksh93/Makefile head/shells/ksh93/files/patch-src_cmd_ksh93_sh_xec.c
A commit references this bug: Author: cy Date: Thu Aug 8 16:14:47 UTC 2019 New revision: 508392 URL: https://svnweb.freebsd.org/changeset/ports/508392 Log: MFH: r508344 Fix: $ ksh93 $ time ../src/cmd/ksh93/sh/xec.c:2171: failed assertion 'tb.tv_sec' Abort trap (core dumped) $ ksh93 $ times ../src/cmd/ksh93/sh/xec.c:2171: failed assertion 'tb.tv_sec' Abort trap (core dumped) PR: 239701 Suggested by: w.schwarzenfeld@utanet.at Approved by: portmgr (delphij@) Changes: _U branches/2019Q3/ branches/2019Q3/shells/ksh93/Makefile branches/2019Q3/shells/ksh93/files/patch-src_cmd_ksh93_sh_xec.c
I was just notified that Debian is considering having both ksh93 and ksh2020 available: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=948745 A similar idea: if ksh93 could be changed back to how it was pre-ksh2020, and a separate ksh2020 package created, I'd be very happy. Thanks!
This is not a bug any more. It is closed. You are free to open a new bug.