-
Notifications
You must be signed in to change notification settings - Fork 153
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
Memory leak? #419
Comments
Try the latest commit (c2167e1) |
I'm still learning github. So I would need to recompile do you have a compiled plain link? |
You can either compile or download from https://pvpgn.pro/download.html |
I am now on the latest dev version. The memory leak might have been fixed (Prior Updates). I need about 12-24 hours to tell. This definitely runs a lot better on the CPU. Thank YOU! If the memory leak on the LUA script is gone. I will close tomorrow. Thanks again! |
Sadly, The leaks are still happening with the most current updated development. About 8 hours idle with 12 bots, the CPU went from 3% to 90%. If there is something I can do please let me know. The only difference from default should be the Lua script I mentioned above. EDIT: hmm... not sure if Lua was causing this now. I removed all 12 bot's on the same IP. Be back in 12 hours with an update. |
Try run bots on different machine than pvpgn. Probably undefined udp packets cause this behavior because of the same udp port. |
Yes, the bot's (my desktop), pvpgn (my VPS). I enabled more verbose debugging and the CPU is already at 5 CPU% for pvpgn. There is not much coming in the debug console. There is a bad echo timing when they connect. Aug 30 09:29:30 [info ] pvpgn::bnetd::conn_destroy: [628] closed bnet connection I do have these which seem common with or without a leak. <-- could be wrong EDIT: The server is near 10% already. The UDP packets are the only thing coming in the logs. I closed the bot the server instantly went to 0% CPU and I'm still getting those UDP packets. Remember the server and bot are from different networks and hosts. |
Did you try master branch to make sure it was not caused by last changes? Or even this one https://github.com/pvpgn/pvpgn-server/releases/tag/1.99.7.2.1 Immediately after you stop bots cpu load on pvpgn server becomes normal, Is that correct? |
It definitely wasn't caused by the latest build. I actualy havent updated since Finalize 1.99.7.2.1 release #362 is the version were I found the original leak. Now I'm on your latest dev build. Still here also. Yes, once the bot got closed. The server CPU instantly went to 0%. |
The robust way (but may be not so fast in your case) is to try different commits to find where the issue was started. Brief tutor how to do it:
Don't try every commit, first find which works fine. It can be far away from the current commit, so pass several pages and start from there. When you find it - follow backward to find the commit which contain the issue. |
If you only run 1 bot, how long would it take for CPU usage to go up? |
Our SVN branch we use in production is using 100% CPU since we moved from freebsd to debian for unknown reasons. So it might be that there is some kind of resource leak even since 1.99. Luckily it does not seem to affect bnetd working normally in any way. I have not yet deep dived into the problem since we plan to move on from 1.99. |
I would have to prepare for this bounty. I think that would take a great amount of time. It would have to occur next weekend.
One bot connected and instantly seen CPU activity. Sits at 0% for 30 seconds then hops to .1% back to 0% hops to .2% back to 0% hops backs to .3%. Just in a matter of minutes. EDIT: If someone is abusing this bot and bug against you're server. You can defend yourself with the /alert command. It causes the bot to error out. |
So not sure if i'm going crazy or pvpgn is using a lot more cpu over time.
I edited the LUA script. handle_game.lua
function handle_game_create(game)
channel_send_message("War2BNE", tostring(game.mapname) .. " hosted by " .. tostring(game.owner), message_type_info)
end
Works great to notify channel of game hosted but after 12 hours or so the cpu sadly went from 3% to 95% had to terminate the process and reopen to make server stable again.
I cannot use the latest development build with email because it has my cpu at 90% default.
The text was updated successfully, but these errors were encountered: