<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; background-color: var(--neutralPrimarySurface);">Our App uses libssh2 to do scp in the non-blocking mode. </span><br>
</div>
<div style="direction: ltr;" class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Works great normally.</span></div>
<div style="direction: ltr;" class="elementToProof"><span style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 16px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Currently running OWRT
version 1.11.0-pre1 from PKG_SOURCE_DATE:=2022-04-11.</span></div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Ran into a forever loop today.</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Looks like scp_recv() ran into an error mid file transfer and tried to free the channel.</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Now the recvfrom on the socket always returns -EAGAIN and the app is stuck in the while loop in libssh2_channel_close() forever.<br>
Anyone see anything like this ? Any chance it is fixed in the release ?<br>
<br>
Another weird thing is the socket, which was valid at one point, is still in the ESTABLISHED state according to the system, but the IP that it is connected to is long gone. Not even in the ARP table any longer.<br>
Does libssh2 set some socket option to disable keep alive ?</div>
<div style="direction: ltr; font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);">#0 __cp_end () at src/thread/aarch64/syscall_cp.s:30</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);">#1 0x0000007fa1d77ba4 in __syscall_cp_c (nr=207, u=<optimized out>, v=<optimized out>, w=<optimized out>, x=<optimized out>,</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);"> y=<optimized out>, z=<optimized out>) at src/thread/pthread_cancel.c:33</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);">#2 0x0000007fa1d5d880 in __alt_socketcall (f=f@entry=0, e=e@entry=0, d=<optimized out>, c=<optimized out>, b=<optimized out>,</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);"> a=<optimized out>, cp=1, sock=12, sys=207) at ./src/internal/syscall.h:64</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);">#3 recvfrom (fd=<optimized out>, buf=<optimized out>, len=<optimized out>, flags=<optimized out>, addr=addr@entry=0x0, alen=alen@entry=0x0)</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);"> at src/network/recvfrom.c:6</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);">#4 0x0000007fa1d5d858 in recv (fd=<optimized out>, buf=<optimized out>, len=<optimized out>, flags=<optimized out>) at src/network/recv.c:5</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);">#5 0x0000007fa1cb3314 in _libssh2_recv (sock=<optimized out>, buffer=<optimized out>, length=<optimized out>, flags=<optimized out>,</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);"> abstract=<optimized out>) at /sandbox/colinw/tot/polecat/openwrt/build_dir/target-aarch64_cortex-a53_musl/libssh2-1.11.0-pre1/src/misc.c:140</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);">#6 0x0000007fa1cbfecc in _libssh2_transport_read (session=session@entry=0x7fa16092b0)</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);"> at /sandbox/colinw/tot/polecat/openwrt/build_dir/target-aarch64_cortex-a53_musl/libssh2-1.11.0-pre1/src/transport.c:369</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);">#7 0x0000007fa1ca8910 in _libssh2_channel_close (channel=channel@entry=0x7fa171c010)</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);"> at /sandbox/colinw/tot/polecat/openwrt/build_dir/target-aarch64_cortex-a53_musl/libssh2-1.11.0-pre1/src/channel.c:2616</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);">#8 0x0000007fa1ca8c44 in _libssh2_channel_free (channel=channel@entry=0x7fa171c010)</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);"> at /sandbox/colinw/tot/polecat/openwrt/build_dir/target-aarch64_cortex-a53_musl/libssh2-1.11.0-pre1/src/channel.c:2744</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);">#9 0x0000007fa1ca8f7c in libssh2_channel_free (channel=0x7fa171c010)</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);"> at /sandbox/colinw/tot/polecat/openwrt/build_dir/target-aarch64_cortex-a53_musl/libssh2-1.11.0-pre1/src/channel.c:2831</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);">#10 0x0000007fa1cb87d0 in scp_recv (session=session@entry=0x7fa16092b0, path=path@entry=0x7fa15e0880 "/tmp/mesh/stats.json",</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);"> sb=sb@entry=0x7fdf4dcba0) at /sandbox/colinw/tot/polecat/openwrt/build_dir/target-aarch64_cortex-a53_musl/libssh2-1.11.0-pre1/src/scp.c:768</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);">#11 0x0000007fa1cb9458 in libssh2_scp_recv (session=0x7fa16092b0, path=0x7fa15e0880 "/tmp/mesh/stats.json", sb=0x7fa16fe490)</span></div>
<div style="direction: ltr;"><span style="font-family: Consolas, Courier, monospace; font-size: 12pt; color: rgb(0, 0, 0);"> at /sandbox/colinw/tot/polecat/openwrt/build_dir/target-aarch64_cortex-a53_musl/libssh2-1.11.0-pre1/src/scp.c:799</span></div>
<br>
<p style="font-family:Calibri;font-size:8pt;color:#000000;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Center">
General Business<br>
</p>
</body>
</html>