Bug 1386129

Summary: RM command with star argument to remove all does not work
Product: [Fedora] Fedora Reporter: Panos Kavalagios <Panos.Kavalagios>
Component: tcshAssignee: David Kaspar // Dee'Kej <deekej>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 24CC: deekej, fpokorny, jchaloup, kdudka, ovasik, svashisht
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tcsh-6.19.00-12.fc24 tcsh-6.19.00-17.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-15 04:25:58 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:

Description Panos Kavalagios 2016-10-18 08:49:52 UTC
Description of problem:
The "rm *" is no longer functioning. It stuck the shell and you have to press Control-C to continue. The issue is possibly related to "rmstar" tcsh option.


Version-Release number of selected component (if applicable):
tcsh-6.19.00-10.fc24.x86_64


How reproducible:
Issue "rm *"


Steps to Reproduce:
1. Enter a directory that you would like to remove all files
2. Issue "rm *"
3. Answer with "y" to the question "Do you really want to delete all files? [n/y]"

Actual results:
The shell stuck.


Expected results:
The shell should have remove all files and the prompt should have returned.


Additional info:
Adding the -f option works fine and it can be used as a workaround. The "rmstar" tcsh option is also set to prompt. If it is not set, then the problem cannot be reproduced.

Comment 1 David Kaspar // Dee'Kej 2016-10-18 08:58:33 UTC
Thanks for the report. Seems like this works with vanilla source build.

However, since I'm currently very busy and this issue has a workaround, I can't guarantee any ETA when this will be fixed. Thanks for your understanding. :)

Dee'Kej

Comment 2 David Kaspar // Dee'Kej 2016-11-28 11:50:10 UTC
Hello,

I have informed upstream about this issue:
http://mx.gw.com/pipermail/tcsh-bugs/2016-November/001099.html

It is caused by using 'hardened build' in Fedora, which is requirement for such a program like tcsh or bash:
https://fedoraproject.org/wiki/Packaging:Guidelines#PIE

Therefore, unless upstream decides to fix this issue (I currently don't have time to look into this more), I will have to close this BZ as WONTFIX.

I'm very sorry for the incovenience.

Dee'Kej

Comment 3 Kamil Dudka 2016-11-28 12:12:42 UTC
(In reply to David Kaspar [Dee'Kej] from comment #2)
> I have informed upstream about this issue:
> http://mx.gw.com/pipermail/tcsh-bugs/2016-November/001099.html

Hint: tcsh just continues to read from its input.  If you press <ENTER> followed by ^D to signal EOF, the y/n answer is parsed correctly.

> It is caused by using 'hardened build' in Fedora, which is requirement for
> such a program like tcsh or bash:
> https://fedoraproject.org/wiki/Packaging:Guidelines#PIE

If it is really the case, then the code contains undefined behavior that needs to be fixed.  Obviously, this is not an expected side effect of those hardening flags.

> Therefore, unless upstream decides to fix this issue (I currently don't have
> time to look into this more), I will have to close this BZ as WONTFIX.

Definitely not an (acceptable) excuse.  Please do not close this bug until it is fixed.  This looks like a severe regression.  I tried tcsh-6.19.00-4.fc24 and it does not seem to suffer from this bug.

Comment 4 David Kaspar // Dee'Kej 2016-11-28 12:17:23 UTC
(In reply to Kamil Dudka from comment #3)
> Hint: tcsh just continues to read from its input.  If you press <ENTER>
> followed by ^D to signal EOF, the y/n answer is parsed correctly.
Oh, I haven't noticed that. Thanks for bringing that up.

> If it is really the case, then the code contains undefined behavior that
> needs to be fixed.  Obviously, this is not an expected side effect of those
> hardening flags.
I will inform upstream about this and see what can be done in this matter.

> Definitely not an (acceptable) excuse.  Please do not close this bug until
> it is fixed.  This looks like a severe regression.  I tried
> tcsh-6.19.00-4.fc24 and it does not seem to suffer from this bug.
I see the severity of this issue now, I will update my schedule according to this. Don't worry, I will not close this BZ until this is fixed. Thanks.

Comment 5 David Kaspar // Dee'Kej 2016-11-29 14:07:47 UTC
Fixed in:
http://pkgs.fedoraproject.org/cgit/rpms/tcsh.git/commit/?id=836b388e1e642aadff4a

Comment 6 Fedora Update System 2016-11-29 14:09:40 UTC
tcsh-6.19.00-15.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-a4def0fd73

Comment 7 Fedora Update System 2016-11-29 14:10:54 UTC
tcsh-6.19.00-11.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-4f7b2ea19b

Comment 8 Fedora Update System 2016-11-29 15:21:45 UTC
tcsh-6.19.00-16.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-218010b3b0

Comment 9 Fedora Update System 2016-12-03 04:31:11 UTC
tcsh-6.19.00-16.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-218010b3b0

Comment 10 Fedora Update System 2016-12-03 05:39:25 UTC
tcsh-6.19.00-11.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-4f7b2ea19b

Comment 11 Fedora Update System 2016-12-05 11:09:22 UTC
tcsh-6.19.00-17.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-76e4455d01

Comment 12 Fedora Update System 2016-12-05 11:11:04 UTC
tcsh-6.19.00-12.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ba395af532

Comment 13 Fedora Update System 2016-12-06 03:25:05 UTC
tcsh-6.19.00-17.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-76e4455d01

Comment 14 Fedora Update System 2016-12-06 04:00:15 UTC
tcsh-6.19.00-12.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ba395af532

Comment 15 Fedora Update System 2017-05-15 04:25:58 UTC
tcsh-6.19.00-12.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2017-05-15 04:34:32 UTC
tcsh-6.19.00-17.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.