Remove packet read timeout to fix no traffic error on MacOS#56
Conversation
|
Hey, thanks for the PR! In my case this hangs the program when pressing |
|
TBH for the moment I'm not understanding the main problem, how the timeout can change the behavior of showing or not showing traffic. I would say something in the specific MacOS code must be influencing the behavior, but I'm not sure what. |
Which OS did you run this on? Trying to reproduce the hanging problem |
|
I'm on Linux According to the man page of And how |
|
Hmm... according to the pnet docs (if I understand correctly), If the quitting issue only happens on linux, and the no-traffic issue only happens on (some) macs, how about if as a quick and ugly fix we add a |
|
Correct me if I'm wrong, but I think OS X uses the BPF implementation by default |
|
@ebroto - I think you're right. I misunderstood the docs and didn't go too deeply into the code. This problem is affecting a lot of mac users and I'd really like at least an ugly fix for now that doesn't cause too much trouble. @zhangxp1998 - as a mac user, how does the tool behave for you if we remove this config? Can you quit easily with both ctrl-c and q? (if you can check under heavy traffic, eg. when downloading a linux distro that would be awesome). How about CPU utilization? iirc @ebroto used this to fix a situation where we were taking ~10-20% CPU. EDIT: @zhangxp1998 - if you'd also be willing to check the above with the value brought down to 1s so we know more, that would be much appreciated. |
|
Yes, I think that using 1 sec would be a better hotfix if it works as we will not block any thread (though responsiveness on It would be important also to test without |
|
@zhangxp1998 - thanks for the detailed report! Looks like for now we're headed for not having a read_timeout on a mac and having a 2s one on linux. Just to make sure: with no read_timeout you get no issues closing the app with "ctrl+c" or "q", and data keeps showing up even after ~1min? The all-interfaces issue has a fix here: #49 |
With no read_timeout, I have can quit bandwhich through |
|
This LGTM - I'm going to merge this and release it along with #49 in the next few days. Thank you very much for all your work on this @zhangxp1998! And thanks @ebroto for your input. :) |
|
@zhangxp1998 - could you revert the "Display 30 chars for process name" commit in this PR? I see you opened a different PR for it - let's discuss it there. |
|
Thank you for all your work and troubleshooting help on this, @zhangxp1998 ! |




Fix issue #51 , as discussed, removing the read timeout fixed the issue. With the timeout removed, I can still press
qto exit the program, or CTRL-C.