easyaudioencoder.exe hung in infinite loop

When watching a video with transcoding. Once I stop the video the easyaudioencoder process gets stuck in a notifychangedirectory call, and pegs one core of the server. I can not start another transcode until I manually terminate the process. The processmonitor output is as follows.
5:50:34.7370160 PM EasyAudioEncoder.exe 16852 NotifyChangeDirectory E:\spool\plex-transcode-temp\Transcode\Sessions\EasyAudioEncoder\Convert to WAV (to 2ch or less) DELETE PENDING Filter: FILE_NOTIFY_CHANGE_FILE_NAME, FILE_NOTIFY_CHANGE_DIR_NAME, FILE_NOTIFY_CHANGE_ATTRIBUTES, FILE_NOTIFY_CHANGE_SIZE, FILE_NOTIFY_CHANGE_LAST_WRITE, FILE_NOTIFY_CHANGE_LAST_ACCESS, FILE_NOTIFY_CHANGE_CREATION, FILE_NOTIFY_CHANGE_SECURITY
5:50:34.7370364 PM EasyAudioEncoder.exe 16852 NotifyChangeDirectory E:\spool\plex-transcode-temp\Transcode\Sessions\EasyAudioEncoder\Convert to WAV (to 8ch or less) DELETE PENDING Filter: FILE_NOTIFY_CHANGE_FILE_NAME, FILE_NOTIFY_CHANGE_DIR_NAME, FILE_NOTIFY_CHANGE_ATTRIBUTES, FILE_NOTIFY_CHANGE_SIZE, FILE_NOTIFY_CHANGE_LAST_WRITE, FILE_NOTIFY_CHANGE_LAST_ACCESS, FILE_NOTIFY_CHANGE_CREATION, FILE_NOTIFY_CHANGE_SECURITY
etc… etc… etc…

Any ideas?

@Falkinator said:
When watching a video with transcoding. Once I stop the video the easyaudioencoder process gets stuck in a notifychangedirectory call, and pegs one core of the server. I can not start another transcode until I manually terminate the process. The processmonitor output is as follows.
5:50:34.7370160 PM EasyAudioEncoder.exe 16852 NotifyChangeDirectory E:\spool\plex-transcode-temp\Transcode\Sessions\EasyAudioEncoder\Convert to WAV (to 2ch or less) DELETE PENDING Filter: FILE_NOTIFY_CHANGE_FILE_NAME, FILE_NOTIFY_CHANGE_DIR_NAME, FILE_NOTIFY_CHANGE_ATTRIBUTES, FILE_NOTIFY_CHANGE_SIZE, FILE_NOTIFY_CHANGE_LAST_WRITE, FILE_NOTIFY_CHANGE_LAST_ACCESS, FILE_NOTIFY_CHANGE_CREATION, FILE_NOTIFY_CHANGE_SECURITY
5:50:34.7370364 PM EasyAudioEncoder.exe 16852 NotifyChangeDirectory E:\spool\plex-transcode-temp\Transcode\Sessions\EasyAudioEncoder\Convert to WAV (to 8ch or less) DELETE PENDING Filter: FILE_NOTIFY_CHANGE_FILE_NAME, FILE_NOTIFY_CHANGE_DIR_NAME, FILE_NOTIFY_CHANGE_ATTRIBUTES, FILE_NOTIFY_CHANGE_SIZE, FILE_NOTIFY_CHANGE_LAST_WRITE, FILE_NOTIFY_CHANGE_LAST_ACCESS, FILE_NOTIFY_CHANGE_CREATION, FILE_NOTIFY_CHANGE_SECURITY
etc… etc… etc…

Any ideas?

Would this DELETE PENDING show in events even after a restart ?

If it does arise, could you post full logs zip and send me by PM the zipped PML file from procmon.
Please ensure debug logging is enabled on the server before restart - settings / server / general / show advanced

and capture the logs through settings / server / help / download logs

This just happened to me again. I stopped it from happening last time by moving the transcode directory to a different drive.

It worked fine for a long time then it just started happening again. I then changed it to a different directory on the same drive and it started working again.

What I did notice is that when things are broken I see:
X:\l\plex-transcode-temp
X:\l\plex-transcode-temp\Transcode
X:\l\plex-transcode-temp\Transcode\Sessions
X:\l\plex-transcode-temp\Transcode\Sessions\EasyAudioEncoder
X:\l\plex-transcode-temp\Transcode\Sessions\EasyAudioEncoder\Convert to Dolby Digital (High Quality - 640 kbps)
X:\l\plex-transcode-temp\Transcode\Sessions\EasyAudioEncoder\Convert to Dolby Digital (Low Quality - 384 kbps)
X:\l\plex-transcode-temp\Transcode\Sessions\EasyAudioEncoder\Convert to Dolby Digital Plus (High Quality - 384 kbps)
X:\l\plex-transcode-temp\Transcode\Sessions\EasyAudioEncoder\Convert to Dolby Digital Plus (Max Quality - 1024 kbps)
X:\l\plex-transcode-temp\Transcode\Sessions\EasyAudioEncoder\Convert to WAV (to 2ch or less)
X:\l\plex-transcode-temp\Transcode\Sessions\EasyAudioEncoder\Convert to WAV (to 8ch or less)

When things are working normally I don’t get those “Convert to …” directories I just get the following:
X: mp\plex-transcode-temp
X: mp\plex-transcode-temp\Transcode
X: mp\plex-transcode-temp\Transcode\Sessions
X: mp\plex-transcode-temp\Transcode\Sessions\plex-transcode-3EDB9803-E5BB-494A-9427-E0E3689D9C55-f81f3a6f-dd7e-4733-b6dd-45e676ba555f
X: mp\plex-transcode-temp\Transcode\Sessions\plex-transcode-3EDB9803-E5BB-494A-9427-E0E3689D9C55-f81f3a6f-dd7e-4733-b6dd-45e676ba555f\media-00010.ts
X: mp\plex-transcode-temp\Transcode\Sessions\plex-transcode-3EDB9803-E5BB-494A-9427-E0E3689D9C55-f81f3a6f-dd7e-4733-b6dd-45e676ba555f\media-00010.vtt

Any ideas what causes the “Convert to…” dirs?

Thanks.

Is this related to running an a non administrator account?

That probably just means the EasyAudioEncoder.exe was not running or cleared up the files on completion

I believe they get created before the job is started

If you have permissions wrong

The filesystem and path where the EasyAudioEncoder files are created needs to support notifications of changes and for that reason the default is to create an area under %TEMP% on windows and only if that fails would it switch to using the Transcoder Path. If the Transcoder Path is on a network drive then the notification would not work and you would end up with such a symptom

You are correct. It must have been direct playing the audio when I saw that the convert directories get not getting created

I PMd you the logs you requested, and the Process Monitor output. The transcode directory is not on a network drive.

A sample stack trace looks like:

user32.dll!TranslateMessageEx+0x2bb
ntdll.dll!NtNotifyChangeDirectoryFile+0xa
wow64.dll!Wow64EmulateAtlThunk+0x152a7
wow64.dll!Wow64SystemServiceEx+0xd7
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x2d
wow64.dll!Wow64SystemServiceEx+0x1ce
wow64.dll!Wow64LdrpInitialize+0x42a
ntdll.dll!RtlUniform+0x6e6
ntdll.dll!EtwEventSetInformation+0x1da09
ntdll.dll!LdrInitializeThunk+0xe
ntdll.dll!ZwNotifyChangeDirectoryFile+0x12
EasyAudioEncoder.exe+0x2350

The only handle open to those directories is the EasyAudioEncoder.exe

The directories are definitely deleted and I can’t view any data about them:

The real question is why is the encoder trying to do a NotifyChangeDirectory after the directory has been marked for deletion.

what is the x: drive ? what filesystem?

I will be referring this to the development team. Thank you very much for the process dump and all the Procmon captures and logs

In your opening post, you stated

When watching a video with transcoding. Once I stop the video the easyaudioencoder process gets stuck in a notifychangedirectory call, and pegs one core of the server. I can not start another transcode until I manually terminate the process.

So this means the first use of EasyAudioEncoder for DTS / Dolby is ok but not after? We do delete the EAE transcoding temp files and directories and recreate them everytime the process is started. It appears that the DELETE action is always ending up as PENDING - The latest procmon capture do not show why that is as we appear to get a success from the DELETE and also success results for the re-creates - however the next action which is a notify action is getting failed with DELETE PENDING result.

There is evidence of SearchIndexer.exe and MsMpEng.exe accessing the X: drive but not the directories - however some programs do access the filesystem using kernel interfaces - so not conclusive

I would like to see procmon capture (unfiltered) and logs for the first failure after a reboot and launch of Plex Media Server - at that point there should be no pending deletes from earlier jobs. You could before restarting delete the Transcode\Sessions\EasyAudioEncoder directory before the reboot

Edit: and please confirm if there is any virtualization of drives involved and any vmware - the procmon capture did show that you do have such software running - and best to provide the diagnostics i mentioned covering from launch to first failure after a reboot and with use of standard internal drive and no virtualization

As an experiment could you try the following
Delete the preference for the transcode temp directory

We should end up with the transcode temp directory being under %LocalAppData% but the EasyAudioEncoder files would be under %TEMP% - (we may hit the RDP issue with Per Session Temp Directory security feature - eg using Temp\1 or Temp\2 - but we can look into that if it arises

I am trying to establish if when purging the normal transcode temp directory sessions we are also purging the EasyAudioEncoder directories

curious as to why you are still on Windows 7? Windows 10 with media foundation would not need EasyAudioEncoder for this

The problem is now understood - so no need for anymore diagnostics

But worth trying with default transcode temp directory to get the EasyAudioEncoder temp directories end up in Temp and as a result should not get deleted inadvertently

and do seriously consider windows 10 !

The first use of EAE for EAC3 files works fine. As soon as the transcode session is finished the process loops on notifychangedirectory calls. If I kill the process I can run another transcode which will again loop when the session is ended.

I have removed the one folder which was on the X: drive which was being indexed by SearchIndexer.exe and I also disabled Microsoft Security Essentials formerly known as Windows Defender to stop the MsMpEng.exe application. The problem still occurred.

I am running a VMWare Linux guest on this host, but the PMP is running on the Host OS and the transcode directory is just a simple NTFS formatted internal drive.

I’m still on Windows 7 because MS dropped support for Windows Media Center on Win 10. I still use WMC.

I just removed the transcode temp directory setting and it defaulted to C:\Users\Mark\AppData\Local\Plex Media Server\Cache\Transcode\Sessions\EasyAudioEncoder and it doesn’t delete the transcode directory after the session, so the problem does not occur.

I’d prefer not to have the transcode directory on C:, but it does “solve” the problem.

If the Transcoder temporary directory field in settings is blank, I was expecting to use C:\Users\Mark\AppData\Local\Temp\EasyAudioEncoder and not C:\Users\Mark\AppData\Local\Plex Media Server\Cache\Transcode\Sessions\EasyAudioEncoder
and for the transcoder to use C:\Users\Mark\AppData\Local\Plex Media Server\Cache\Transcode\Sessions\

When you got settings / server / transcoder / show advanced, is this Transcoder temporary directory blank?

could i have a set of logs collected after a transcoder and EasyAudioEncoder test immediately after launch?

and i wanted to know which client apps were affected ? PMP ? Plex Web? Any others?

I have replied with all the requested info in our PM thread.

The development team still want to know the real impact of the bug and which Plex client apps it affects

what you said

As soon as the transcode session is finished the process loops on notifychangedirectory calls. If I kill the process I can run another transcode which will again loop when the session is ended.

Does the loop prevent other transcodes from starting?
Or is it a harmless loop?

I had replied in the PM thread. I’ll paste the response here:
The Plex client I replicated it on was iOS, AppleTV OS, and Plex Web App. Anytime it needs to encode EAC3 to AAC. I’ve not tried other transcode scenarios.

The symptom is that the CPU goes to 100% of one core, and trying to play another video on the client which requires a transcode does not work, the following error pops up on the client:
“Playback was terminated by the server. Conversion failed. The transcoder crashed or failed to start up.”

it prevents other transcodes from starting. It is not a harmless loop. Eating up 1 core of the machine isn’t exactly harmless either, even if it didn’t prevent a transcode from starting, which it does.

In the PM I put links to another PML and PMS log from a fresh start with the default transcode directory where the issue doesn’t occur because there is no directory deletion.

The bug has been found - could you as a test try to ensure the Temp Transcode Directory path does not have plex-transcode- in the path

Fixed! It works perfectly if I change the Temp Transcode Directory to soemthing like x:\pt-temp. Thanks for the help!