ssh_sftp:write_file hangs in case of timeout

József Bérces jozsef.berces@REDACTED
Wed Jul 1 15:58:10 CEST 2020


Hi,

I encountered strange behavior of ssh_sftp:write_file/4 when it times out. Instead of returning {error, Reason}, it just hangs. Checking the process_info, the process is in gen:do_call and the timeout signal is in its message queue:

(xxxx@REDACTED)7> process_info(pid(0,1505,0)).
[{current_function,{gen,do_call,4}},
{initial_call,{erlang,apply,2}},
{status,waiting},
{message_queue_len,1},
{messages,[{#Ref<0.724234097.2107637761.253125>,
             {error,timeout}}]},
{links,[]},
{dictionary,[]},
{trap_exit,false},
{error_handler,error_handler},
{priority,normal},
{group_leader,<0.58.0>},
{total_heap_size,244},
{heap_size,233},
{stack_size,25},
{reductions,96},
{garbage_collection,[{max_heap_size,#{error_logger => true,kill => true,size => 0}},
                      {min_bin_vheap_size,46422},
                      {min_heap_size,233},
                      {fullsweep_after,65535},
                      {minor_gcs,0}]},
{suspending,[]}]

This is with Erlang/OTP 20 [erts-9.0] on Raspberry Pi.

Does anyone know if this has been fixed in a newer Erlang release?

Thanks,
Jozsef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20200701/9e04383d/attachment.htm>


More information about the erlang-questions mailing list