NullReferenceException when uploading large xml file
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- csharp
- 领域
- networking
调研方向
从 Renci.SshNet.SftpClient.InternalUploadFile 开始,以提供的堆栈跟踪作为切入点。在服务器上通过任务复现大型 XML 上传,并将其与小文件和本地运行进行比较;当确定不完整上传和 NullReferenceException 的原因,并且有经过验证的修复或回归测试覆盖时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Renci.SshNet.SftpClient.InternalUploadFile(Stream input, String path, Flags flags, SftpUploadAsyncResult asyncResult, Action`1 uploadCallback)
--below is our internal stack
at ....UploadFile(Stream input, String path)
at ......Common.Ftp.SftpClient.Upload(Byte[] buffer, String fileName, String remoteFolder, Boolean useDefaultRemoteFolder, Boolean usePassive)
at ......Common.Ftp.FtpService.UploadFileToSftp(Byte[] file, String remotePath, String fileName)
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(TimeSpan timeout)
at
Hi
When we try to upload large xml file through tasks in our server, NullReferenceException pops up and made the uploaded file incomplete. The file indeed was uploaded, but it was broken and missed half of the file content.
This issue can not be reproduced in our dev local and only occurred in server, also it won't happen for small xml files(with same encoding and path)
SSH version we used in our company here is 2020.0.2
Could you pls advise what's the possible root cause for it since we could get further callstack details for it
- 主要语言
- C#
- 星标
- 4.4k
- 派生
- 993
- 平均合并
- 9 天 21 小时
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sshnet/SSH.NET 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 3/5 1-2 天 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 3/5 1-2 天 新手友好度 67/100
-
难度 4/5 3-5 天 新手友好度 55/100
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
-
Type: enhancement
难度 2/5 1-3 小时 新手友好度 65/100
apache/arrow-adbc#4809 ·
-
type/automation type/tech-debt
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 65/100
microsoft/vscode-azurefunctions#5197 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 85/100
microsoft/microsoft-ui-reactor#1274 ·