Bug 1087697

Summary: man page inaccuracy about --sig-proxy and --tty
Product: [Fedora] Fedora Reporter: Lukáš Doktor <ldoktor>
Component: docker-ioAssignee: Matthew Heon <mheon>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: admiller, cevich, dwalsh, golang-updates, jkeck, mattdm, mgoldman, ohadlevy, vbatts, whenry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1096296 (view as bug list) Environment:
Last Closed: 2015-06-30 01:27: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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1096269, 1096296    

Description Lukáš Doktor 2014-04-15 05:58:46 UTC
Description of problem:
Hi guys,

the man page states:
            --sig-proxy=true: Proxify all received signal to the process (even in non-tty mode)

But the real behavior is, that sig-proxy doesn't work when --tty=true. It should be mentioned in there, taht --sig-proxy is incompatible with --tty.

Version-Release number of selected component (if applicable):
docker-io-0.9.1-1.fc21.x86_64


How reproducible:
always

Steps to Reproduce:
1. man docker


Actual results:
man page says it works even in non-tty


Expected results:
man page warns that --tty can't be used with --sig-proxy

How to verify:
1. docker run --tty=true -i --rm fedora bash -c 'for NUM in `seq 1 64`; do trap "echo Received $NUM, ignoring..." $NUM; done; while :; do sleep 1; done'
2. ps -ax | grep docker
3. kill -SIGUSR1 $PID
4. (with --tty=true no signals are received, when you try the same with --tty=false, signals are proxified and messages are displayed)

Comment 1 Lokesh Mandvekar 2014-04-15 06:11:48 UTC
Copying William (he recently got per subcommand manpages merged upstream).

this seems to be the case even in the latest manpage (I'm guessing this was inherited from the original manpage).

William, was there any discussion about this in your PR?

Comment 2 Lokesh Mandvekar 2014-04-15 06:15:31 UTC
btw, the 0.10 rpm includes the latest manpages (should be in yum soon)

Comment 3 Lukáš Doktor 2014-04-15 08:45:55 UTC
Thanks for a quick reply. I tried the docker-io-0.10.0-2.fc20.x86_64 which says:
       --sig-proxy=true|false:
              When set to true, proxify all received signals  to  the  process
              (even in non-tty mode). The default is true.

I'd really like to change it to "only in non-tty" with possible warning that --tty=true is incompatible with --sig-proxy.

Comment 4 William Henry 2014-04-30 19:54:25 UTC
I go this text from upstream. I'll check.

Comment 5 William Henry 2014-04-30 20:02:22 UTC
Lukas,according to the folks upstream, this is a bug in docker run and attach. It should be as the text suggests.

Can you file a bug upstream with docker? Here:
https://github.com/dotcloud/docker/issues

Please just take the information you posted above and post it there. 

Thanks. Well spotted.

Best,
William

Comment 6 Lukáš Doktor 2014-05-02 08:02:01 UTC
Upstream tracer:

https://github.com/dotcloud/docker/issues/5547

Comment 7 Daniel Walsh 2014-06-03 20:33:29 UTC
*** Bug 1087700 has been marked as a duplicate of this bug. ***

Comment 8 Matthew Heon 2014-06-19 20:00:27 UTC
Considering there's no action on the upstream bug, I've started work on a fix.

Right now, it's working for all signals save 17 and 20-22. 17 is expected, Docker itself blocks that, but 20-22 not going through is a regression. I'm debugging this, and once that issue is fixed, I'll submit the patch upstream.

Comment 9 Matthew Heon 2014-07-14 12:23:26 UTC
Pull request sent to upstream for this (https://github.com/dotcloud/docker/pull/6955). Solution has some quirks (SIGTTIN, SIGTTOU, SIGTSTP are not proxied, for example), but does enable signal proxying with TTY mode specified.

Comment 10 Daniel Walsh 2014-09-15 20:00:42 UTC
Fixed in docker-1.2

Comment 11 Lukáš Doktor 2014-09-29 08:56:10 UTC
Well I disagree. I just tried the reproducer on docker-1.2.0-19.el7.x86_64 and -SIGUSR didn't generate any output, -2 killed the process. The only proxified signal were the one I generated using keyboard (ctrl+z, ctrl+c). But when I use `kill -... $PID` the signal is processed only by the attach process and is not forwarded.

With --tty=true it works fine.

Comment 13 Matthew Heon 2015-01-22 16:22:08 UTC
Upstream rejected the patch proxying signals in TTY mode. Fortunately, they fixed the inaccuracy in the man pages at the same time.

As of docker-io-1.4.1-5 on F21 and docker-1.4.1-14 on RHEL7, we have these updated manpages reflecting that signal proxying is incompatible with TTY mode.

Comment 14 Fedora End Of Life 2015-05-29 11:34:19 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 15 Fedora End Of Life 2015-06-30 01:27:58 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.