Bug 1122401 - docker: doesn't receive signals 20 21 22 when it's stopped by signal
Summary: docker: doesn't receive signals 20 21 22 when it's stopped by signal
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Matthew Heon
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-23 07:30 UTC by Lukas Doktor
Modified: 2019-03-06 00:43 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-22 18:12:15 UTC


Attachments (Terms of Use)

Description Lukas Doktor 2014-07-23 07:30:50 UTC
Description of problem:
When I send these signals to the running container, they are successfully passed to it. When I try the same on previously SIGSTOPped container, they are not.

Version-Release number of selected component (if applicable):
docker-1.1.1-1.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. TERM1: docker run -i fedora bash -c 'for NUM in `seq 1 64`; do trap "echo Received $NUM, ignoring..." $NUM; done; while :; do sleep 0.1; done'
2. TERM2: for AAA in `seq 1 31`; do [ $AAA -eq 9 ] || [ $AAA -eq 17 ] || [ $AAA -eq 18 ] || [ $AAA -eq 19 ] && continue ; docker kill -s $AAA $CONTAINER; sleep 0.1; done
3. TERM2: docker kill -s 19 $CONTAINER
4. TERM2: for AAA in `seq 1 31`; do [ $AAA -eq 9 ] || [ $AAA -eq 17 ] || [ $AAA -eq 18 ] || [ $AAA -eq 19 ] && continue ; docker kill -s $AAA $CONTAINER; sleep 0.1; done
5. TERM2: docker kill -s 18 $CONTAINER

Actual results:
1-31 (except 17, 18, 19) are received after step 2
1-31 (except 17, 19, 20, 21, 22) are received after step 4

Expected results:
signals 20, 21 and 22 should be received after step 4

Additional info:
The same behavior applies to direct kill using:
for AAA in `seq 1 31`; do [ $AAA -eq 9 ] || [ $AAA -eq 17 ] || [ $AAA -eq 18 ] || [ $AAA -eq 19 ] && continue ; kill -$AAA $PID; sleep 0.1; done

only it's impossible to SIGSTOP the container using `kill -19 $PID` so you need to do that by `docker kill` instead.

Comment 2 Matthew Heon 2014-07-24 15:58:12 UTC
Cannot reproduce on docker-1.1.1-3 on RHEL7 or a built of the latest upstream git master.

All signals (save 17-19) are received on both invocations of the for loop.

Comment 3 Lukas Doktor 2014-08-11 08:20:32 UTC
Today I retested it on docker-1.1.2-9.el7.x86_64 using the steps with the same results (signals 20, 21, 22 were missing after resume). Are you sure the container was stopped when you sent the signals? (new output should be printed after the step 5)

Comment 4 Daniel Walsh 2014-09-12 19:20:35 UTC
Can you verify the failure still exists with docker-1.2

Comment 5 Lukas Doktor 2014-09-29 08:39:53 UTC
exact same behavior on docker-1.2.0-19.el7.x86_64...

Comment 7 Matthew Heon 2015-01-22 17:15:41 UTC
I don't believe this is a Docker issue.

I just tested it outside of a container (two terminals running bash, normal kill instead of docker kill) and got the same results.

Given this, I'd say this is expected behavior.


Note You need to log in before you can comment on or make changes to this bug.