Closed andreldmonteiro closed 11 months ago
ASF can't "continue in the background" if you shutdown/kill the process, ASF doesn't spawn any child processes to do that. I'd rather consult the way you run the program, as I don't believe there is anything to fix/improve in ASF in this regard.
If you can reliably reproduce it by using !exit
command, open new support thread and attach full log.txt, then maybe I'll have some ideas where to look for the issue on your machine. If not, then that's entirely OS/machine issue.
Normally the terminal asks always if I want to close it when ASF is running saying it will kill the process in doing so, but in this case it doesn't (when it downloaded an update, installed it and resumed farming) when I close it and the process continues in the background consuming 100% of a core and doing nothing because there was no more games to farm.
Ah, okay, you're refering to something entirely different - ASF spawns new process after update and kills/stops existing one, in this case indeed, old process as the only one attached to the console, is automatically closed, and your terminal doesn't have any say over new process, since it's not attached.
Either you can use AutoRestart: false
(see config section on the wiki for more info) and automatically start ASF process again after it updates, or use systemd unit (see management section on the wiki for more info) which will do the same.
There is no way for me to restart the process in the same terminal for you after update.
Ok, thanks, and the 100% core use can't be done anything about it if left unchecked and forgotten?
If ASF is using 100% core then it means it's doing something, such as purging old files after update or something else - log should tell you what it's doing, there is no infinite CPU load for no reason.
Well the log is really the one posted here and it is doing nothing: "...Não temos nada para 'farmar' nesta conta!" = nothing to farm on this account.
Then there is no reason for ASF to use 100% of CPU. You're doing something wrong, can you show screenshot of that CPU usage?
Yes, here it is:
Is it happening only after update, or did you run into this issue also when ASF is up-to-date and not updating?
It only happens after an update, and only goes to 100% after the terminal is closed.
Could you do the following:
Download older ASF release (e.g. V5.4.12.3), use "Headless": true
setting in ASF.json
, then make it update to V5.4.12.5 by launching in terminal as usual, wait for it to upgrade and start, then close terminal as usual. Check if process still uses 100% CPU.
This is the only part related to ASF that could (maybe) cause this scenario, all other parts are runtime-related.
Yes, it still happens.
I've reproduced your issue on my Linux machine, so it seems global. I don't have a solution for now, you can use AutoRestart: false
and manually restart ASF process or use systemd service as per management section in ASF wiki. I'll try to find out the root culprit and code a fix if possible, but I'm not sure if this isn't runtime-related issue I have no say in.
In any case, thanks for report.
Checklist
ASF version
Latest stable release
ASF variant
linux-x64
Bug description
Sometimes after closing the terminal that is running ASF, the process continues running in the background and consuming 100% of a core.
Expected behavior
The process should had been terminated.
Actual behavior
ASF continues running in the background and consuming 100% of a core.
Steps to reproduce
No response
Possible reason/solution
Perhaps happens when there is a new update and it is installed.
Can you help us with this bug report?
Somehow, I can test and offer feedback, but can't code
Full log.txt recorded during reproducing the problem
Global ASF.json config file
No response
BotName.json config of all affected bot instances
Additional info
No response