Summary: | shells/ksh93: shell dumps core when using time or times command (and more) | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Andras Farkas <deepbluemistake> |
Component: | Individual Port(s) | Assignee: | Cy Schubert <cy> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | w.schwarzenfeld |
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(cy) |
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Andras Farkas
2019-08-07 17:36:34 UTC
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. |