answered
2018-04-29 15:32:36 +0200
too 629 ●18 ●28 ●33
I found at least something significant: NAT timeouts.
I've been now running tcpdump -n -i wlan0 -s 256 port not 22
for over an hour, and netstat -natp
, both in root shells
Currently relevant part of netstat -natup
output is:
tcp 0 363 myipv6:55876 2a03:2880:f20a:c6:face::443 ESTABLISHED 5097/com.whatsapp
tcp 1 0 myipv6:52013 2a00:1450:400f:806::200:443 CLOSE_WAIT 5097/com.whatsapp
tcp 38 0 myipv6:58590 2001:14b8:1800:401:face:443 CLOSE_WAIT 5097/com.whatsapp
WhatsAPP thinks the first, ESTABLISHED
is live. It is not -- wlan NAT has forgotten it already. in tcpdump
output
I saw dozen packets with Flags [P.]
attempted to be sent to that remote address (with increasing delay between attempts). And no ACKs to those!
Probably, as whatsapp tries to save network bandwidth it has first been silent too long and it's tcp6 connection has been reaped from NAT. When it then tries to send packets it just doesn't recognize that it cannot get those through.
(I'd be interested how WhatsAPP on android devices work -- does the android layer there work better or ...?)
The other 2, CLOSE_WAIT
lines are interesting. The one with source port 52013
has been there over an hour.
From https://stackoverflow.com/questions/15912370/how-do-i-remove-a-close-wait-socket-connection
- CLOSE_WAIT means that the local end of the connection has received a FIN from the other end, but the OS is waiting for the program at the local end to actually close its connection.
I.e. WhatsAPP has, for some reason, not closed the tcp6 socket fo these connections. It probably just leaked the fd's (as there is no heavy read(2)/poll(2) activity -- well top(1) doesn't show anything going on there).
ls /proc/5097/fd
shows com.whatsapp
has currently 141 file descriptors open. most probably for IPC between other local processes (or itself!), but probably also at least those 2 garbage fd's)
look my question for the same yesterday. we'll have to dig deeper. i used whatsapp web to help. for me whatsapp work better when on mobile network...
too ( 2018-04-26 20:23:13 +0200 )editIs "browsing" with an Android app (e.g. Firefox)?
Background:
On my Jolla 1 all Android apps almost always lose network access, when SFOS automatically switches from mobile network (3G in my case) to a known WLAN. Some apps show this (e.g. Firefox), some don't (e.g. Conversations).
"Restarting network" per Sailfish-utilities usually makes no difference then, but restarting AlienDalvik always does. And sometimes (rather rarely) network access for Android apps over WLAN starts working automatically a while (many minutes) after such a network switch.
I found a couple of reports here on TJC, which may be related to this, but none of them was detailed enough to check if this is the same issue (or to narrow it down even further).
olf ( 2018-04-26 20:28:49 +0200 )editThus, can you please check that you are seeing the same behaviour.
@olf : nope, browsing occours with native browser. EDIT : unless you mean "browsing with an android browser"; in my case this was opera, and i Happened to use it some time before this happened (few days). Note that I cant recall if I rebooted the phone in between. It is also true that I switch daily between office & home. Also restarting network did not seem to help; I had to reboot the phone.
tortoisedoc ( 2018-04-26 20:34:26 +0200 )edit@tortoisedoc, well then please test other Android apps, when (i.e. right after) Whatsapp fails for you, so you know, if you are hunting down an issue with Whatsapp under SFOS / AlienDalvik or one WRT the AlienDalvik integration into SFOS.
Well, this seems to be at least similar to what I described above.
And that you don't need to reboot (see there).
Please do test.
olf ( 2018-04-26 20:39:14 +0200 )editI tested using WhatsAPP Web -- using that for all activities and leaving Xperia X on the table. After a while I get message 'Phone not connected' on web browser window. Now when I tried to ping 9.9.9.9 it did not make any difference, but when starting Chrome Android browser and surfing a bit WhatsAPP Web became alive again. This was just a brief experiment, have to try more.
More details of my case in https://together.jolla.com/question/183306/whatsapp-delays-on-certain-wifis-works-fine-on-mobile-network/
too ( 2018-04-27 00:53:18 +0200 )edit