Bug 845005 - ncat: fails to transfer files from stdin
ncat: fails to transfer files from stdin
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: nmap (Show other bugs)
17
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Michal Hlavinka
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-01 08:55 EDT by Enrico Scholz
Modified: 2013-08-02 03:31 EDT (History)
5 users (show)

See Also:
Fixed In Version: nmap-6.01-5.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-01 14:45:58 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Enrico Scholz 2012-08-01 08:55:45 EDT
Description of problem:

Because ncat is going to replace nc:

A common use case which transfers files read from stdin does not work anymore:

$ nc -l 1234 &       # just a listening server; works with remote ones too

$ touch /tmp/foo
$ ncat `hostname` 1234 < /tmp/foo
Unable to register IOD #2: Operation not permitted


strace shows

connect(4, {sa_family=AF_INET, sin_port=htons(1234), ...) = -1 EINPROGRESS (Operation now in progress)
epoll_ctl(3, EPOLL_CTL_ADD, 4, {...})   = 0
epoll_wait(3, {?} 0x8b22d0, 128, 10000) = 1
getsockopt(4, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
epoll_ctl(3, EPOLL_CTL_MOD, 4, {...})   = 0
epoll_ctl(3, EPOLL_CTL_MOD, 4, {...})   = 0
epoll_ctl(3, EPOLL_CTL_ADD, 0, {...})   = -1 EPERM (Operation not permitted)
write(2, "Unable to register IOD #2: Opera"..., 50Unable to register IOD #2: Operation not permitted) = 50


Version-Release number of selected component (if applicable):

nmap-6.00-1.fc17.x86_64
Comment 1 Michal Hlavinka 2012-08-02 07:26:23 EDT
Thanks for the report, I can reproduce this
Comment 2 Michal Hlavinka 2012-08-03 06:23:43 EDT
Note: option --nsock-engine=select can be used as a workaround
Comment 3 Frank Ch. Eigler 2012-08-12 17:01:47 EDT
This affects the systemtap testsuite also (causing a hang midstream).
Comment 4 Frank Ch. Eigler 2012-08-12 17:04:37 EDT
In systemtap's case, stdin is sometimes a pipe as opposed to a file; same symptoms.
Comment 5 Frank Ch. Eigler 2012-08-12 18:07:00 EDT
(In reply to comment #2)
> Note: option --nsock-engine=select can be used as a workaround

In my test, changing /bin/nc to

- exec ncat "$@"
+ exec ncat --nsock-engine=select "$@"

does not appear to fix it; maybe an EOF-detection problem too?
Comment 6 Michal Hlavinka 2012-08-13 06:12:18 EDT
(In reply to comment #5)
> (In reply to comment #2)
> > Note: option --nsock-engine=select can be used as a workaround
> 
> In my test, changing /bin/nc to
> 
> - exec ncat "$@"
> + exec ncat --nsock-engine=select "$@"
> 
> does not appear to fix it; maybe an EOF-detection problem too?

That is bug #845075. I have patch for that, but I'm still waiting for upstream comments.
Comment 7 Fedora End Of Life 2013-07-04 03:02:34 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. 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 WONTFIX if it remains open with a Fedora 
'version' of '17'.

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 prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 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 to Fedora 17's end of life.

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 8 Fedora End Of Life 2013-08-01 14:46:05 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 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.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 9 Michal Hlavinka 2013-08-02 03:31:35 EDT
fixed in Fedora 18+

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