TrueNAS12 Latest release PMS Public Detect Intros causes Memory Leak/Crash

Server Version#: 1.22.3.4392
Player Version#: Web

I’ve spent the last week trying to get a handle on why my Plex has been killing itself daily for the last month or so. System specs:
AMD Ryzen 2700X
16GB Crucial DDR4 ECC
ASUS TUF B450M-Plus GAMING (supports ECC)
4xSeagate Ironwolf 8TB + 1xWD White Label WD80EMAZ 8TB (slotted for replacement over the Summer)
Boot drive: KingDian 240GB SSD (though same issue happens with any other boot or install when using this config)
Corsair CX650M

I’ve tried enabling and disabling a number of the Scheduled Tasks/Library Scheduled Tasks and there seems to be a memory leak or race condition whenever the Detect Intros feature is run during the maintenance time.

See attached logs and database. I’ve gone through a number of steps to ensure it wasn’t TrueNAS or jail version or anything like that, to the point where I set up an additional Plex plugin install fresh and that had the exact same issue right out of the gate.

Any assistance would be appreciated, but I’m pretty sure this is going to end up being discovered as a bug that needs fixing.

Everything starts fine at the maintenance window’s hour mark but about 5-6 minutes in the tasks look like this and never stop until the after Plex PID is killed:

PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
54273 972 11 42 7 326M 169M uwait 6 7:21 714.04% Plex Med
480 root 47 20 0 984M 696M kqread 10 18:55 4.28% python3.
491 root 5 20 0 204M 92M usem 5 2:10 0.35% python3.
54085 972 37 52 0 374M 135M uwait 0 0:56 0.27% Plex Med
54149 972 13 52 15 125M 58M piperd 6 0:06 0.23% Plex Scr
54155 972 10 52 0 95M 54M piperd 6 0:03 0.14% Plex Scr
54154 972 11 20 0 48M 22M uwait 12 0:01 0.08% Plex Tun
52399 root 1 20 0 13M 3236K CPU10 10 0:02 0.07% top
1647 www 1 20 0 36M 2356K kqread 4 0:06 0.05% nginx

After a bit, Plex Media Server will die stating that it failed to get additional swap space. This is untrue, as I have 0% swap utilization throughout. It just runs out of RAM after services ends up eating up more than 14GB, forcing the ZFS ARC to shrink massively and then everything clears out. Restarting the iocage is the only reliable way to recover from this.

I have disabled the feature for the time being outside of needing to generate any more logs that you all might request.Plex Media Server Logs_2021-05-09_09-59-252.zip (40.1 KB)