marzent / IINACT

A Dalamud plugin to run the FFXIV_ACT_Plugin in an ACT-like enviroment with a heavily modified port of Overlay Plugin
https://www.iinact.com
GNU General Public License v3.0
182 stars 41 forks source link

IINACT spawning large numbers of threads and causing lag on processor #1

Closed chris-davis-siv closed 1 year ago

chris-davis-siv commented 2 years ago

Occasionally when loading the software with FFXIV, I notice performance issues (framey): checking Task Manager, IINACT appears to have a ridiculous number of threads when this happens (last noted occurrence had slightly above 167,000).

Attempting to end-task IINACT under these circumstances will freeze entire machine. Of the two observed occurrences, one just froze it for several minutes, the other did not appear to ever resolve and required hard reboot.

marzent commented 2 years ago

Did you notice anything in the debug log while this happened?

Off the top of my head this is probably caused by the one of the three threads that process loglines, write the combat log and the after action processing since these can auto-restart themselves upon failure...

Also which overlays (if any) were you using with IINACT at that time?

chris-davis-siv commented 2 years ago

Network_26601_20220723.log The network log is the only log I could find immediately, let me know if there's somewhere else I should be looking. Not super familiar with IINACT's structure yet.

The most notable thing I see is a lot of messages from the IPDecoder along the lines of:

251|2022-07-23T10:21:42.3693665-04:00|IPDecoder: IP protocol version is neither 4 nor 6. Version is 7|8ae422ad0c4b033e 251|2022-07-23T10:21:42.3693665-04:00|IPDecoder: IP protocol version is neither 4 nor 6. Version is 5|7245d7257fb1fbe8

Values range from 0 to 13, and all of the several hundred messages take place over a 4-minute window.

I was using Browsingway to display Cactbot Combined Raidboss and the Xephero DPS meter, although I don't think either one was very active on the last occurrence: logged in, noticed framerate issues after walking around a bit, and started debugging.

chris-davis-siv commented 2 years ago

Something a friend proposed: IINACT is running from a subdirectory of Program Files, which is traditionally pretty restricted in Windows.

Could be possible that one of those processes is dying for permission-related reasons, spawning a new thread, and repeating, maybe? The app has been functional, so there has to be some other confounder there, it can't just always be blocked from reading or writing lines

marzent commented 2 years ago

Running from within Program Files shouldn't really be an issue; if there is anything wrong with the threads IINACT handles it should for sure show up in the Debug Log, which you can find at the bottom of the settings window (opened by right clicking on the tray icon)

If that is not conclusive it is probably something going wrong with Overlay Plugin, in that case a debug build might help since that logs the crap out of that section...

If the UI is totally unresponsive there I could change it so it additionally logs to a file.

marzent commented 1 year ago

This cannot happen anymore with the reworked logging in 2.1