sshnet / sshnet/SSH.NET

ScpClient.Download hangs under some circumstances regardless OperationTimout set

オープン
#255 コメント 6 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug
主要言語
C#
スター
4.4k
フォーク
993
平均マージ
9日 21時間
マージ済み PR(30日)
1

説明

ScpClient.Download hangs under some circumstances

       ScpClient scp = null;
       try
       {
       scp = new ScpClient(ip.ToString(), int.Parse(data.PortSSH), data.Login, data.Password);
       scp.OperationTimeout = new TimeSpan(0, 0, 10);
       scp.Connect();
       scp.Download(download, save);

There is probably some issue on server side, as scp on linux server ends like this:

[login@host ~]$ scp login@xxx.xxx.xxx.xxx:/file.exp ~/
login@xxx.xxx.xxx.xxx's password:
exec request failed on channel 0

This discussion can give you some more info, it seems to be related.
https://forum.mikrotik.com/viewtopic.php?t=104485
Server will be most probably updated, so I may not be able to try it again.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

ScpClient.Connect と ScpClient.Download のエントリーポイントから始め、サーバーが "exec request failed on channel 0" を返したときに OperationTimeout がどのように適用されるかを確認してください。issue にはリポジトリのファイルやテストが指定されていないため、まずこの応答を返すサーバーでハングを再現してください。クライアントがハングしなくなり、タイムアウトの動作が適切なテストでカバーされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
networking
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。