Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1519520 - mount.cifs returns EHOSTDOWN when host is reachable and resetting the connection.
Summary: mount.cifs returns EHOSTDOWN when host is reachable and resetting the connect...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 26
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-30 20:02 UTC by Thiago Rafael Becker
Modified: 2018-05-29 11:26 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:26:33 UTC


Attachments (Terms of Use)
Reproducer script (deleted)
2017-11-30 20:02 UTC, Thiago Rafael Becker
no flags Details

Description Thiago Rafael Becker 2017-11-30 20:02:43 UTC
Created attachment 1361169 [details]
Reproducer script

Description of problem:
When the server sends a RST frame to the client on an attempt to mount a share, mount.cifs reports that "Host is down" instead of "Connection Reset/Refused". This is misleading, as the user can see that the host is running.

The following command, plus the reproducer attached, demonstrate the issue.
# ./cifs_server &
# mount -t cifs -o username=tbecker,password=asdf //localhost/asdf /mnt
mount error(112): Host is down

During reproduction, the following conversation occurs.
    5   0.003047    127.0.0.1 → 127.0.0.1    TCP 74 52470 → 445 [SYN] Seq=0 Win=43690 Len=0 MSS=65495 SACK_PERM=1 TSval=170230243 TSecr=0 WS=128
    6   0.003097    127.0.0.1 → 127.0.0.1    TCP 74 445 → 52470 [SYN, ACK] Seq=0 Ack=1 Win=43690 Len=0 MSS=65495 SACK_PERM=1 TSval=170230243 TSecr=170230243 WS=128
    7   0.003144    127.0.0.1 → 127.0.0.1    TCP 66 52470 → 445 [ACK] Seq=1 Ack=1 Win=43776 Len=0 TSval=170230243 TSecr=170230243
    8   0.003876    127.0.0.1 → 127.0.0.1    SMB2 176 Negotiate Protocol Request
    9   0.003942    127.0.0.1 → 127.0.0.1    TCP 66 445 → 52470 [ACK] Seq=1 Ack=111 Win=43776 Len=0 TSval=170230243 TSecr=170230243
   10   0.004005    127.0.0.1 → 127.0.0.1    TCP 66 445 → 52470 [RST, ACK] Seq=1 Ack=111 Win=43776 Len=0 TSval=170230244 TSecr=170230243
   11   0.004140    127.0.0.1 → 127.0.0.1    TCP 74 52472 → 445 [SYN] Seq=0 Win=43690 Len=0 MSS=65495 SACK_PERM=1 TSval=170230244 TSecr=0 WS=128
   12   0.004239    127.0.0.1 → 127.0.0.1    TCP 74 445 → 52472 [SYN, ACK] Seq=0 Ack=1 Win=43690 Len=0 MSS=65495 SACK_PERM=1 TSval=170230244 TSecr=170230244 WS=128
   13   0.004285    127.0.0.1 → 127.0.0.1    TCP 66 52472 → 445 [ACK] Seq=1 Ack=1 Win=43776 Len=0 TSval=170230244 TSecr=170230244

The client is returning EHOSTDOWN even if the connection can be established.

[107886.004436] CIFS VFS: Error connecting to socket. Aborting operation.
[107886.004996] CIFS VFS: cifs_mount failed w/return code = -111
[107886.005555] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
[107886.006757] CIFS VFS: cifs_mount failed w/return code = -112

Version-Release number of selected component (if applicable):
kernel-4.13.15-200.fc26.x86_64

How reproducible:
100%, reproducer is attached.

Steps to Reproduce:
Run the reproducer attached.

Actual results:
Server returns EHOSTDOWN on failure.

Expected results:
To return ECONNRESET, ECONNABORTED or ECONNREFUSED, or another meaningful error code.

Additional info:
Also reproducible in RHEL7 and RHEL6.

Comment 1 Laura Abbott 2018-02-28 03:58:52 UTC
We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale. The kernel moves very fast so bugs may get fixed as part of a kernel update. Due to this, we are doing a mass bug update across all of the Fedora 26 kernel bugs.
 
Fedora 26 has now been rebased to 4.15.4-200.fc26.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.
 
If you have moved on to Fedora 27, and are still experiencing this issue, please change the version to Fedora 27.
 
If you experience different issues, please open a new bug report for those.

Comment 2 Thiago Rafael Becker 2018-03-26 14:22:36 UTC
# uname -r 
4.15.10-200.fc26.x86_64

./test_script.sh 
tcpdump: listening on lo, link-type EN10MB (Ethernet), capture size 262144 bytes
mount error(112): Host is down

# tshark -r cifs_mount.pcap 
Running as user "root" and group "root". This could be dangerous.
    1   0.000000          ::1 → ::1          TCP 94 32922 → 445 [SYN] Seq=0 Win=43690 Len=0 MSS=65476 SACK_PERM=1 TSval=2102857169 TSecr=0 WS=128
    2   0.000031          ::1 → ::1          TCP 74 445 → 32922 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
    3   0.000136          ::1 → ::1          TCP 94 35598 → 139 [SYN] Seq=0 Win=43690 Len=0 MSS=65476 SACK_PERM=1 TSval=2102857169 TSecr=0 WS=128
    4   0.000156          ::1 → ::1          TCP 74 139 → 35598 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0
    5   0.000794    127.0.0.1 → 127.0.0.1    TCP 74 55954 → 445 [SYN] Seq=0 Win=43690 Len=0 MSS=65495 SACK_PERM=1 TSval=3132645254 TSecr=0 WS=128
    6   0.000835    127.0.0.1 → 127.0.0.1    TCP 74 445 → 55954 [SYN, ACK] Seq=0 Ack=1 Win=43690 Len=0 MSS=65495 SACK_PERM=1 TSval=3132645254 TSecr=3132645254 WS=128
    7   0.000863    127.0.0.1 → 127.0.0.1    TCP 66 55954 → 445 [ACK] Seq=1 Ack=1 Win=43776 Len=0 TSval=3132645254 TSecr=3132645254
    8   0.001219    127.0.0.1 → 127.0.0.1    SMB2 176 Negotiate Protocol Request
    9   0.001232    127.0.0.1 → 127.0.0.1    TCP 66 445 → 55954 [ACK] Seq=1 Ack=111 Win=43776 Len=0 TSval=3132645254 TSecr=3132645254
   10   0.001598    127.0.0.1 → 127.0.0.1    TCP 66 445 → 55954 [RST, ACK] Seq=1 Ack=111 Win=43776 Len=0 TSval=3132645255 TSecr=3132645254

Can confirm, still happening.

Comment 3 Fedora End Of Life 2018-05-03 08:52:55 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. 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 '26'.

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 26 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 4 Fedora End Of Life 2018-05-29 11:26:33 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
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.


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