please apply bash 5.0 patch 17

Bug #1878517 reported by Kir Kolyshkin
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Fix Released
Medium
Matthieu Clemenceau
Focal
Fix Released
Medium
Matthieu Clemenceau

Bug Description

This section is for Focal SRU purpose

[Impact]
From https://ftp.gnu.org/gnu/bash
There were cases where bash 5.0 patch 16 reaped process substitution file descriptors (or FIFOs) and processes to early. This is a better fix for the problem that bash50-016 attempted to solve.

[Test Case]
This simple bash script pass when bash with patch 017 is installed
Recommend to run it before and after installing the update to notice the difference

```
#!/usr/bin/bash

ouch() {
    cat < <(echo bar)
    cat "$1"
}

ouch2() {
    { cat; } < <(echo bar)
    cat "$1"
}

ouch <(echo "foo")
ouch2 <(echo "foo")
```
Expected output with the patch installed:

foo
bar
foo
bar

[Regression Potential]
This is an upstream patch level update with no additional modification. The regression potential should be fairly low. Also the patch is intended to only fix this problem.
Possible regression would be unforeseen additional process substitutions that upstream bash would share.

End SRU
------
Original Bug Description:

I am using Ubuntu 20.04 for development and has hit a bug in bash 5.0 patch 16.

I can't reproduce it in pure bash, but with bats from https://github.com/bats-core/bats-core/ it is very easy to repro:

```
# cat << EOF > ya.bats
check() {
 echo "check $@"
 ls -l /proc/self/fd
}

@test "here file" {
 check -p <(echo "hey")
 false
}
EOF

$ bats ya.bats
```

Normally the output should contain the line

   lr-x------ 1 kir kir 64 May 14 02:01 63 -> pipe:[4616918]

which is a result of a "here file" created by bash via <(echo "hey").

In my testing, about 50% of runs don't have /dev/fd/63 listed.

I found out this is a manifest of a bug introduced in bash 5.0 patch 16 (see http://ftp.gnu.org/gnu/bash/bash-5.0-patches/bash50-016)

The bug is fixed in 5.0 patch 17 (see http://ftp.gnu.org/gnu/bash/bash-5.0-patches/bash50-017).

Please update bash to patchlevel 17.

Revision history for this message
Kir Kolyshkin (kolyshkin) wrote :

Here is a repro that does not involve bats:

https://lists.gnu.org/archive/html/bug-bash/2020-03/msg00062.html

Matthias Klose (doko)
tags: added: rls-ff-incoming
Changed in bash (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in bash (Ubuntu Focal):
status: New → Triaged
importance: Undecided → Medium
tags: removed: rls-ff-incoming
tags: added: id-5ec6a2b21639eb7938a123eb
Changed in bash (Ubuntu Focal):
assignee: nobody → Matthieu Clemenceau (mclemenceau)
Changed in bash (Ubuntu):
assignee: nobody → Matthieu Clemenceau (mclemenceau)
Revision history for this message
Matthieu Clemenceau (mclemenceau) wrote :

This patch applies upstream patch 017 to groovy's bash-5..0

Changed in bash (Ubuntu):
status: Triaged → In Progress
Changed in bash (Ubuntu Focal):
status: Triaged → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bash - 5.0-6ubuntu2

---------------
bash (5.0-6ubuntu2) groovy; urgency=medium

  * Apply upstream patches 017 (LP: #1878517)

 -- Matthieu Clemenceau <email address hidden> Thu, 18 Jun 2020 10:44:55 -0500

Changed in bash (Ubuntu):
status: In Progress → Fix Released
Changed in bash (Ubuntu Focal):
status: Confirmed → In Progress
Revision history for this message
Matthieu Clemenceau (mclemenceau) wrote :
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Kir, or anyone else affected,

Accepted bash into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/bash/5.0-6ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in bash (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Matthieu Clemenceau (mclemenceau) wrote :

tested proposed package with Focal with 2 different instances with given script.
Both tests were successful.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Please be sure to include the exact version number used for testing next time!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bash - 5.0-6ubuntu1.1

---------------
bash (5.0-6ubuntu1.1) focal; urgency=medium

  * Apply upstream patches 017 (LP: #1878517)

 -- Matthieu Clemenceau <email address hidden> Thu, 18 Jun 2020 10:44:55 -0500

Changed in bash (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for bash has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.