Bug 1868498

Summary: ../src/cmd/ksh93/sh/jobs.c:1110: failed assertion 'pw'
Product: [Fedora] Fedora Reporter: Michael Carney <mwc>
Component: kshAssignee: Siteshwar Vashisht <svashisht>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 32CC: kdudka, svashisht
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-09 13:24:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Carney 2020-08-12 21:11:11 UTC
Description of problem:
ksh crashes due to assertion failure


Version-Release number of selected component (if applicable):
2020.0.0

How reproducible: Always


Steps to Reproduce:
Run the following shell function:
function pigs
{
        print - "Pid\tBytes\t\t\tTime\t\tProgram"
        print - "===\t=====\t\t\t====\t\t======="
        ps -efal | tail -n +2 | sort -r -n -k 10,10 | head -20 | awk -v pagesize=`pagesize` '\
        BEGIN { size = 0; }
        {
                n = split($14, array, ":");
                if (n > 1) {
                        time = $14
                        prog = $15;
                } else {
                        time = $15
                        prog = $16;
                }
                size = $10 * pagesize;
                printf("%d\t%s\t\t%s\t%s\n", $4, size, time, prog);
        } '
}

Actual results:
../src/cmd/ksh93/sh/jobs.c:1110: failed assertion 'pw'
/bin/ksh: pigs: line 181: 6774: Abort(coredump)


Expected results:
function runs without causing shell to crash.

Additional info:

Comment 1 Siteshwar Vashisht 2020-08-13 15:19:13 UTC
Thanks for taking time to report this bug. It looks like this bug was a side effect of major refactoring that was done for ksh-2020.0.0. However, we have decided to revert ksh to last stable version of ksh that came out from Bell Labs (ksh-20200801)[1]. So this issue should be fixed once bug 1868715 is resolved.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1868715