-
-
Notifications
You must be signed in to change notification settings - Fork 298
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
Electron processes shown as UNKNOWN #196
Comments
See also:
|
Hi all. I recently added the relevant logging to be able to diagnose this issue, and had some curious discoveries. First, there is this thing known as "IPv4-mapped IPv6 addresses" (Wikipedia), which we have previously failed to ugh... address. For example:
I have now patched this in 76956cf. I suspect there is a decent probability that this was the original root cause behind this particular bug report. However, I am still seeing some orphan connections in the logs, which I would like to investigate further. And it would be great if you can help provide some data points. Can you please:
From what I can see, many of these remaining connections are very transient in nature, so trying to eyeball it might be somewhat difficult. You may wish to pipe the output of your alternate connection monitoring application to a file, and compare them afterwards. Thank you all in advance. |
I think it would helpful if the source and destination ip addresses and ports are inluded in the bandwhich log. With only one side of the connection is hard to figure out what program a connection belongs to. |
- Per recommendation in #196 (comment)
@mercurytoxic suggestion implemented on As per usual, you can pull and build locally, or you can download the latest CI build here (once all jobs are finished). |
I've done a bit of investigation myself. And also now that I'm a bit more familiar with the codebase in general, I feel I can speculate about the root cause of this issue with a bit more certainty. As I previously said, it seems like the remaining The ideal solution is to move the process resolution into the sniffer threads, although that will most certainly cause some performance impact due to it being executed much more frequently. This is something that I would have to experiment and benchmark. But meanwhile, I recognise that this transience problem, while having the same symptoms as the reported issue, is of a complete different cause. Knowing the likely cause of the remaining What I am uncertain about however, is whether this is indeed the same problem encountered by the original reporter of this problem on FreeBSD. From his screenshot (in FreeBSD's bug tracker), it seems like his situation was a lot worse - no connections were being resolved to processes at all. This is mildly concerning - there is a small chance that something is critically broken for BSD builds. So I would like to ask @grahamperrin to test and see if the symptoms have improved for him or not before closing this issue. Thank you all for all the help. Edit: |
- Per recommendation in #196 (comment)
* Refactor & reorganisation of `get_proc_name` * Log both src & dst when we fail to resolve connection to process - Per recommendation in #196 (comment)
Maybe this help someone. I was using Stupid me 😊 |
Ah yes very nice catch. Since wireguard is implemented in kernel space, it obviously doesn't have a user space process. So this is actually an entirely different class of problem that we previously overlooked. I'll do some research and see if there are mechanisms available to identify kernel space connections. |
While investigating, I also found that container processes also seem to fall under unknown. Yet another category of issues I guess. |
Yes. The root cause of the problem is that the global connection table is used to build up the lookup table which doesn't contain the connections from namespaces. Instead of going that route my guess is that the connection info must be obtained via the inodes of the processes fds. Just a guess. |
Ah okay so that's the root cause. I was investigating this the other day and was honestly very lost. My understanding of network namespaces is quite basic so I'm just going to ask. Is data from another namespace accessible from Thanks for your help in advance. |
Hi. I played with aggregation code a little bit and there is beside What makes me think is that the key to the map of open sockets is
which is not unique across network namespaces. So Results can never be accurate unless the no namespaces are involved. |
For me, everything is UNKNOWN. Installed from snap on Ubuntu 23. |
Every Electron ap is shown as “UNKNOWN”. I’m not sure about the details. I don’t know how
bandwhich
determines the process names, but utilities liketop
andps
shows Electron process names just fine.To reproduce:
Edit: This issue previously misidentified the cause as Flatpak. However, it turns out the root cause seems to be Electron apps (either running in Flatpak or unconstrained).
The text was updated successfully, but these errors were encountered: