-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nrf802154_sniffer.py doesn't exit on macOS when the capture is stopped #58
Comments
I just upgrade to Wireshark Version 4.2.4 (v4.2.4-0-g1fe5bce8d665) from v3.x (where it didn't occur) and this is still occurring. |
This is the error I get:
|
It also occurs with the system/Apple python:
|
I had a quick look and I it looks like the use of a non-blocking FIFO read in |
Please give this patch a try, I think it fixed the issue. Chapoly1305/nRF-Sniffer-for-802.15.4@master...Chapoly1305-patch-1 I have tested it on my Ubuntu 22.04, it can now stop once click Stop on toolbar. |
Thanks, but it still errors on my Mac: Error from extcap pipe: 2024-05-06 17:15:16,117 [ERROR] Failed to stop thread Thread-1 (control_reader) |
Please ensure you have used correct branch and updated your local file (/Users/YOUR_USERNAME/.local/lib/wireshark/extcap), I just tested on my macbook, it seems working just fine. For your convenience, you may use this py file directly. |
my bad, somehow a symlink turned into a copy of the file. Only had to apply the fix in #60 thank you. |
I'm using the latest version of this repo with Wireshark 4.0.4 on macOS.
When I start a capture, it populates Wireshark with 802.15 packets (as expected). But when I click Stop, it waits about 30 seconds and then pops up this error:
During the 30 second lag, I'm not able to start a new capture and I can see in
ps
that the sniffer script hasn't been terminated.If I add
os._exit(0)
at the top of thesig_stop_handler()
function, it makes this error go away. I verified thatsig_stop_handler()
is being called from MainThread.I don't understand the mechanism through which the
control_reader
loop is supposed to exit when Wireshark terminates the capture. Don't we need to signal it somehow to tell it to exit, before callingjoin()
on that thread?The text was updated successfully, but these errors were encountered: