Deadlock when trying to put file

0 votes
asked Feb 6, 2013 by kenneth (170 points)
edited Sep 29, 2014

I run a number of concurrent connections (at this time 32) and every now and then, once a week or so, I get this deadlock. This could become a real problem when released to customers. Do you have any idea what could cause this? It has been detected on Windows 7 32-bit with Rebex 2.0.3854

ntdll.dll!_NtWaitForMultipleObjects@20() + 0x15 bytes
ntdll.dll!_NtWaitForMultipleObjects@20() + 0x15 bytes
KERNELBASE.dll!_WaitForMultipleObjectsEx@20() + 0x36 bytes
kernel32.dll!_WaitForMultipleObjectsExImplementation@20() + 0x8e bytes
[Managed to Native Transition] Rebex.Net.Sftp.dll!Rebex.Net.Scp.cqcMbi(object , string , System.IO.Stream , long ) + 0x110 bytes
Rebex.Net.Sftp.dll!Rebex.Net.Scp.cqcMbi(object , string , string , long ) + 0xe5 bytes
SE.DeviceAdministrator.Utils.dll!SE.DeviceAdministrator.SshTransfer.Put() + 0x88 bytes

Applies to: Rebex SFTP

2 Answers

+1 vote
answered Feb 6, 2013 by Tomas Knopp (58,890 points)
edited Feb 6, 2013

Thank you for reporting, however, the version you are using is from year 2010. Meanwhile, there have been at least two known bugs fixed related to the deadlock problem you reported (both bugfixes were released in version 2012 R1) as can be seen from the Rebex SFTP release history:

  • SSH Core: Fixed a race condition that may have occured when sending and reading from a single SSH channel at the same time.
  • SSH Core: Fixed a deadlock that may have occured when using multiple SSH channels from multiple threads.

So it is possible that the bug you report might have already been solved.

I can see that you upgraded your support contract just yeasterday. Could you please download the latest Rebex SFTP from, reference the newest version (be sure to remove all references to old dlls and then add references to the new ones) and then test it?

If you also encounter a deadlock with the newest version, please let us know.

0 votes
answered Feb 6, 2013 by kenneth (170 points)
edited Sep 29, 2014

Sounds good, just what I was hoping for, some hope that it is already solved.

commented Feb 6, 2013 by Tomas Knopp (58,890 points)
edited Sep 29, 2014

We hope so. If you come accross a deadlock during your testing, please report it back to us.