Skip to content

Conversation

@maartene
Copy link
Contributor

SwiftNIO SSH commit hash: 5f40984

Context:
When connecting to the NIOSSHServer sample server using the NIOSSHClient example client, the server crashes due to a lost file handler. See also https://forums.swift.org/t/add-ssh-support-to-nio-project where the fix was suggested by Cory Benfield.

Steps to reproduce:

  1. Run the NIOSSHServer example in Xcode
  2. Build the NIOSSHClient example and run it to connect to the server running in Xcode
  3. You'll see this error in the debugger:

NIOCore/SystemCallHelpers.swift:61: Precondition failed: unacceptable errno 9 Bad file descriptor in close(descriptor:))

2023-01-16 16:48:16.722856+0100 NIOSSHServer[24190:530412] NIOCore/SystemCallHelpers.swift:61: Precondition failed: unacceptable errno 9 Bad file descriptor in close(descriptor:))

$ swift --version
Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
Target: x86_64-apple-darwin22.2.0


Operating system: macOS 13.1 (Intel)

% uname -a
Darwin 31-149-230-59.biz.kpn.net 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64 x86_64


My system has IPv6 set to 'auto'.

@swift-server-bot
Copy link

Can one of the admins verify this patch?

6 similar comments
@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@swift-server-bot
Copy link

Can one of the admins verify this patch?

@Lukasa Lukasa added the semver/none No version bump required. label Jan 18, 2023
@Lukasa
Copy link
Contributor

Lukasa commented Jan 18, 2023

@swift-server-bot test this please

Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you so much!

@Lukasa Lukasa merged commit c99a20b into apple:main Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants