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
High CPU utilization when disconnect #502
Comments
Thanks for the port. I got this reproduced on Ubuntu 16.04 with the loki branch ; indeed. Not sure if this is related but I see the following error message on the console:
UPDATE: --> no it's definitely not ; this code is specific to loki. |
I am also having these messages |
Tested with latest loki build on el7 and I could not reproduce the issue. |
Please upload image of your general settings and connection settings, particularly this ones |
In Mint, I do not see the errors nor the CPU spike. I repeated setps 1 ,2 20 times with no errors. I think is related to some options that have to close stuff at the end of a sesson, like : Session logs, statistics, that is why I need those settings to confirm. |
Have to add that I'm testing with the must current loki branch, no rc2 |
Hi @hanspr ... maybe an exported debug config helps in this case ... |
Maybe but, that version could export some sensitive data, that is why I did not requested. It does not have the fixes we worked on. |
Same issue with idle asbru-cm running for too long results in 100% CPU usage per user running the process, we stumbled over it because I could not log in at first try on that machine that day. |
This issues are very difficult to replicate and a statement saying that it happens does not gives enough information to address a problem. I personally use asbru (under Mint) for more than 8 hours straight, every day and I have never had a high cpu usage). My suggestions would be to begin adding more information that could clarify the running environment at the time of the issue, among them:
In general this issue requires some effort from users to provide possible conditions under which the issue happens, other wise would be a matter of chance to find the issue and fix it. |
Fyi, I've been able to reproduce this behavior on Ubuntu 16.04 / Ásbrú loki with a completely new configuration file by simply opening / closing local shells. Don't even need to start a remote connection. This is "nearly" systematic:
When trying the same of Ubuntu 18.04 ; I've been unable to reproduce it. I looked around in the Ásbrú code but could not find any loop that would cause this behavior. So I suspect we are making a system call that is entering into an infinite loop. This has probably been fixed in the most recent OS but I could not find a way to workaround this. Any additional information or help will be appreciated to troubleshoot this further. |
My 2 cents: this problem often arises when closing a terminal that's been detached from the main window (which I use a lot). |
It's worse than that. I thought it was random but it doesn't seem to be.
No interesting log when started from a terminal (no output except the few regular lines on start). |
Thanks for the additional information nanawel. As mentioned above, I'm unable to reproduce this on a recent very of Ubuntu (with the same Ásbrú code base) so I'm really suspecting a system issue we won't be able to fix.. |
I managed to reproduce, but have no solution yet. Current loky version The steps described by @nanawel do reproduce the problem. Make sure you look at the detail of : only one CPU core goes to 100% not all the CPUs. If you open another terminal, the CPU goes back to normal If you properly exit the connection and then close the window, it does not happen. @gfrenoy, maybe we should disconnect the sessions and then destroy windows, and not the other way around. When I get some time this weekend will try to give it a closer look. |
You mean on a recent version of Ubuntu ? |
Current Mint 20, that is based on Ubuntu 20.04 focal |
Ok got it reproduced on 20.04 as well. Not on 18.04 though, strange.
I believe this is what we are doing. And, btw, with the way I reproduced it (see here), I explicitly closed the connection before closing the window. Really tricky one ! |
- Order of events created a 1 core cpu 100% usage for window terminals - Moved the window destruction after removing all connections, sockets, watch events, etc.
I believe @hanspr fixed the issue ; thanks a lot, you rock :) I applied the fix on both loki and master branches. One will be able to use the "snapshot" or "loki" releases in a few minutes. Can some confirm the problem has been correctly fixed ? |
Thanks! |
I just cloned the latest version of the master branch (Revision: 01a961e - 2020-10-12 22:29:34) and still have the issue that asbru-cm jumps to 100% CPU utilisation. I can reproduce it simply by opening a new local shell and closing it (CTRL+D). Regardless of how many connections I open,... as soon as I close one connection, the CPU jumps to 100% I'm running on: |
Could you clone the current loki branch and check. |
Same thing with the loki branch. As soon as I close the local shell, CPU jumps to 100% sysread() on closed filehandle GEN19 at /opt/asbru-cm-loki/lib/PACTerminal.pm line 1550. |
- Otherwise closing the socket while it might still be read was causing side effects
At the end I manged to randomly replicate the problem on mint 18.3, and a new change has been applied to loki Update loki branch and check if in your system fixes the problem too. |
Thanks, but still the same issue on my PC after pulling the update. As you mentioned, it may be related to my current setup. |
FYI: When I close the terminal by pressing the 'x' on the tab-header (force-close terminal), then the CPU stays 'normal' |
I tried again and again but I really cannot reproduce this ; really sorry. We just released 6.2.2 assuming that it was fixed. Please give it a try with this version and create a new issue describing your environment and the steps to demonstrate the issue. Thanks for your help and understanding. |
Describe the bug
When a connection is disconnected, asbru cpu usage is 100%.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Asbru process should not use cpu 100%
Screenshots
Screenshot CPU usage
https://i.postimg.cc/qMRHC9LS/Screenshot-from-2020-03-24-11-55-19.png
Desktop (please complete the following information):
Additional context
I am not sure how many times connect/disconnect
The text was updated successfully, but these errors were encountered: