Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionWelterlen Benoit
2021-01-07 14:38:01 UTC
Created attachment 1745317[details]
Patch that add SIGALRM from the excluded blocked signals
Created attachment 1745317[details]
Patch that add SIGALRM from the excluded blocked signals
Created attachment 1745317[details]
Patch that add SIGALRM from the excluded blocked signals
Created attachment 1745317[details]
Patch that add SIGALRM from the excluded blocked signals
Description of problem:
If an alarm is needed in one of the script in the RPM, it will be ignored because of the blocked signals.
For example, if you use flock with -w, the alarm after the timeout will never be received:
%pre
flock -x -w 19 /tmp/lock sleep 99
Version-Release number of selected component (if applicable):
rpm-4.14.3-4
How reproducible:
always
Steps to Reproduce:
1. add a script that needs an alarm, example flock -w <timeout>
2.
3.
Actual results:
- the alarm from the timeout is not received
Expected results:
- flock interrupted
Additional info:
- I already opened a pull request upstream: https://github.com/rpm-software-management/rpm/pull/1479
- attached patch, tested on RHEL8.3
- http://brew-task-repos.usersys.redhat.com/repos/scratch/bwelterl/rpm/4.14.3/4.el8/
Acceptance criteria:
Signals within scriptlets (e.g. %pre) work as expected - that is, signals like SIGALRM or SIGINT are received by the scriptlets (or the subprocesses they run).
As a (manual) reproducer, one can use the %pre example from above, while running flock on the same file but from a different shell.
With the fixed RPM version, the %pre script would unblock after -w seconds and make RPM fail with exit code 1 and an error message saying the %pre scriptlet failed. With the current (unfixed) RPM version, the %pre script should eventually finish, install the package and exit with code 0.
Note that this is subject to race conditions, though, so could be hard to automate reliably...
You can also test this with SIGINT instead, e.g. make the %pre scriptlet block and then try pressing CTRL-C. With the fix, it should receive the signal and interrupt the RPM transaction.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (rpm bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2021:1606