ssh_sftp:write_file hangs in case of timeout
Mikael Pettersson
mikpelinux@REDACTED
Thu Jul 2 11:16:41 CEST 2020
On Wed, Jul 1, 2020 at 3:58 PM József Bérces <jozsef.berces@REDACTED> wrote:
>
> 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.
Can you capture the stack trace from that hanging process?
More information about the erlang-questions
mailing list