+1 vote
by (320 points)

Hello, we have a status page which from time to time connects to our sftp server (running on Rebex) and runs simple ls;bye, if everything succeded - status is ok. Command looks like:
lftp sftp://<username>:<userpassword>@<sftp-server-host>:2220 -e "ls;bye"

Problem is that from time to time, we started witnessing exceptions in logs with ArgumentOutOfRangeException. I've managed to reproduce it on empty folder around 20 times, but after that - it stopped reproducing.

Exception that we catch looks like:
Error occurred. UserName: "sbu" ClientAddress: "10.101.100.69" ExceptionType: "System.ArgumentOutOfRangeException" Message: "Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')" StackTrace: " at gdcso.gqnxz.tjhdj(zomrf p0, Int32 p1) at gdcso.gqnxz.zhxya(zomrf p0)"

As far as i understood, it is reproduced only on lftp client, and WinSCP/default sftp clients works fine. Please tell me, if i should worry about it ?

by (148k points)
Hello, which version of Rebex components do you use?
by (320 points)
Rebex.FileServer.Full - 5.0.7620

1 Answer

0 votes
by (148k points)
edited by
 
Best answer

Update: This has been resolved in Rebex File Server R5.1.


This is was a bug in Rebex File Server. The exception occurs when the server-side implementation of SFTP protocol's SSH_FXP_CLOSE command (which closes a handle of a directory or a file) tried to clear a slot in an array that has been cleared. The array is cleared when the SFTP channel is being shut down.

Based on lftp's debug log, the client apparently issues SSH_FXP_CLOSE command, and then closes the SFTP session without actually waiting for the server to respond to it. This triggers the server-side bug described in the previous paragraph.

We'll fix this for the next release. We can also provide a hotfix within days, but I was unable to find any Rebex license purchase associated with your company in our database. Could you please contact us at support@rebex.net and provide an order number or an e-mail used to purchase a license so we can associate it with you? Thanks!

by (320 points)
Okay, i'm a outsource developer of another company, so i'll send an client's order number or email used to purchase a license to given support email later, when i'll find a person that could give me that information.

Thanks for quick response.
by (148k points)
I sent a link to a hotfix to your e-mail address. Please give this a try and let me know whether it solves the issue!
...