lithnet / googleapps-managementagent

Google Workspace Management Agent for MIM 2016
MIT License
12 stars 4 forks source link

Miiserver crash on Export+Delta Import profile #77

Closed SirDester closed 1 year ago

SirDester commented 1 year ago

Hello @ryannewington I have a strange issue I would like to share with you.

I'm using the latest 2.1.8060 version and I tried to create a 2 step run profile with Export followed by a Delta Import to imediately confirm the latest exported entities.

When I run the profile the 2 steps correctly finish but after 5 minutes (more or less, but quite a fixed time) the miiserver crashes with a .NET unhandled exception and an Application Error of this type:

Application: miiserver.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 00007FFD954A3ECD
Stack:
Faulting application name: miiserver.exe, version: 4.6.607.0, time stamp: 0x61f42347
Faulting module name: mmsmaext.dll, version: 4.6.607.0, time stamp: 0x61f42322
Exception code: 0xc0000005
Fault offset: 0x0000000000013ecd
Faulting process id: 0x1de8
Faulting application start time: 0x01d901139a2f82dc
Faulting application path: C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Bin\miiserver.exe
Faulting module path: C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Bin\mmsmaext.dll
Report Id: fb69b23c-6bf8-43d6-82a8-bc95e1398cc1
Faulting package full name: 
Faulting package-relative application ID:

Doing various changes to understand the problem I tried to split the 2 step profile into 2 separate profiles Export and Delta Import and, in this way, the runs complete successfully and no server crash is thrown.

I reproduced this behaviour in both certification and production environments. As you can see I'm using latest build of MIM.

Do you have any hint or any other test I can try? Thanks in advance

ryannewington commented 1 year ago

@SirDester

I can't say I've seen this one before. Usually there is an event log error from the .NET runtime just before the event you logged with more relevant information in it. Can you provide the details of that event?

SirDester commented 1 year ago

Hello Ryan, I just did a new test in a completetely fresh MIM environment (1 AD Agent, 1 Lithnet Google Agent) to be sure to eliminate any interference from an "aged" server. The issue is totally riproducibile.

immagine

The first warning event is just the warning about a full synchronization is needed because I recently changed the configuration. The issue appears even if this warning is not present.

Then these are the events, in timestamp order:

Application: miiserver.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 00007FFD42336203
Stack:
Faulting application name: miiserver.exe, version: 4.6.607.0, time stamp: 0x61f42347
Faulting module name: ntdll.dll, version: 10.0.14393.5427, time stamp: 0x633688f6
Exception code: 0xc0000005
Fault offset: 0x0000000000066203
Faulting process id: 0x54c
Faulting application start time: 0x01d9024d06c0c8ab
Faulting application path: C:\Program Files\Microsoft Forefront Identity Manager\2010\Synchronization Service\Bin\miiserver.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 4c8aeb04-e48b-4f1d-b39f-9ad6d087fa92
Faulting package full name: 
Faulting package-relative application ID: 
Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: miiserver.exe
P2: 4.6.607.0
P3: 61f42347
P4: ntdll.dll
P5: 10.0.14393.5427
P6: 633688f6
P7: c0000005
P8: 0000000000066203
P9: 
P10: 

Attached files:

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_miiserver.exe_fdac393e29aaacde8ea7f08b1e1997efe97994cd_d9b0e421_145f8491

Analysis symbol: 
Rechecking for solution: 0
Report Id: 4c8aeb04-e48b-4f1d-b39f-9ad6d087fa92
Report Status: 4100
Hashed bucket: 
Fault bucket 1324078909732252047, type 5
Event Name: FaultTolerantHeap
Response: Not available
Cab Id: 0

Problem signature:
P1: miiserver.exe
P2: 4.6.607.0
P3: 61F42347
P4: ffffbaad
P5: 
P6: 
P7: 
P8: 
P9: 
P10: 

Attached files:
\\?\C:\Windows\SERVIC~2\LOCALS~1\AppData\Local\Temp\FTH83E5.tmp\fthempty.txt
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER8434.tmp.WERInternalMetadata.xml

These files may be available here:

Analysis symbol: 
Rechecking for solution: 0
Report Id: 18fece83-6e48-11ed-a2ce-000c29b0e639
Report Status: 0
Hashed bucket: 4247c629c692d8aaf26012c0cd2d698f
Fault bucket 1731857023992823208, type 4
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: miiserver.exe
P2: 4.6.607.0
P3: 61f42347
P4: ntdll.dll
P5: 10.0.14393.5427
P6: 633688f6
P7: c0000005
P8: 0000000000066203
P9: 
P10: 

Attached files:

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_miiserver.exe_fdac393e29aaacde8ea7f08b1e1997efe97994cd_d9b0e421_136b8879

Analysis symbol: 
Rechecking for solution: 0
Report Id: 4c8aeb04-e48b-4f1d-b39f-9ad6d087fa92
Report Status: 0
Hashed bucket: 05fa66af1a243566a808cac99cdb7da8

In many retries the "FaultTolerantHeap" not always happens.

As the crash happens after 5 minutes this let me think that's related with the unload of custom extensions and/or rules extensions from miiserver process when they're not needed anymore.

ryannewington commented 1 year ago

What's the contents of the .NET Runtime event? I don't see the content i'd expect to see in the list provided.

SirDester commented 1 year ago

It's the first event

immagine

Not so much informations from it anyway

ryannewington commented 1 year ago

@SirDester hmmm I'm not really sure about this one sorry. It might have to be a question for Microsoft.

SirDester commented 1 year ago

Thanks, i'll try to open a SR to Microsoft, I hope they'll not answer that is custom extension and they can't assist :)

I'll let you know if I discover something else

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.