Hi,
I'm unable to find a solution to this anywhere and I'm desperate. Perhaps someone faced a similar issue and managed to find a solution. I'm running out of hairs on my head to pull them out.
I got installed SQL Server 2022 with latest CU on Windows Server 2022.
And my dev team is using SQL Server Machine Learning / SQL Server Launchpad for running R scripts / python code. The same issue happens on two different servers.
I've checked every piece of documentation, requirement, permissions, suggestions, even tried desperate attempts like temporarily add NT Service\MSSQLLaunchpad to Administrators to verify if that's not the permission issue, but same error persist.
In latest SQL Server versions, security design has changed and from what I saw Machine Learning is now using Appcontainer isolation. Many of the old problems/solutions do not apply to the recent versions.
In my case, so far most of the things work fine, except the fact that SQL Server Launchpad bloats error logs with thousands of error messages like the errors at the bottom of below log (Extlaunchererrorlog):
2024-07-24 15:04:32.570 Page exclusion bitmap is enabled.
2024-07-24 15:04:32.611 StartServiceDispatcherTask Completed. ErrorCode: 0x00000000
2024-07-24 15:04:32.611 Privilege SeAssignPrimaryTokenPrivilege is present in launchpad process token.
2024-07-24 15:04:32.611 Privilege SeChangeNotifyPrivilege is present in launchpad process token.
2024-07-24 15:04:32.611 Privilege SeIncreaseQuotaPrivilege is present in launchpad process token.
2024-07-24 15:04:32.612 Launchpad process is a part of Service Group. Launchpad does have SeServiceLogonRight.
2024-07-24 15:04:32.612 StartCheckpointingThread Completed. ErrorCode: 0x00000000.
2024-07-24 15:04:32.633 Negotiated Runtime Version for launcher RLauncher.dll is 4
2024-07-24 15:04:32.633 Got API for launcher RLauncher.dll with version 4
2024-07-24 15:04:32.633 Successfully loaded launcher RLauncher.dll and negotiated version
2024-07-24 15:04:32.642 Successfully initialized launcher RLauncher.dll
2024-07-24 15:04:32.642 Successfully found the launcher interfaces for launcher RLauncher.dll
2024-07-24 15:04:32.642 Successfully registered the launchcontext for launcher RLauncher.dll
2024-07-24 15:04:32.642 Successfully registered the launcher RLauncher.dll for the scriptType 1
2024-07-24 15:04:32.660 Negotiated Runtime Version for launcher Pythonlauncher.dll is 4
2024-07-24 15:04:32.660 Got API for launcher Pythonlauncher.dll with version 4
2024-07-24 15:04:32.660 Successfully loaded launcher Pythonlauncher.dll and negotiated version
2024-07-24 15:04:32.669 Successfully initialized launcher Pythonlauncher.dll
2024-07-24 15:04:32.669 Successfully found the launcher interfaces for launcher Pythonlauncher.dll
2024-07-24 15:04:32.669 Successfully registered the launchcontext for launcher Pythonlauncher.dll
2024-07-24 15:04:32.669 Successfully registered the launcher Pythonlauncher.dll for the scriptType 2
2024-07-24 15:04:32.671 Negotiated Runtime Version for launcher commonlauncher.dll is 4
2024-07-24 15:04:32.671 Successfully set runtime version to 4
2024-07-24 15:04:32.671 Got API for launcher commonlauncher.dll with version 4
2024-07-24 15:04:32.671 Successfully loaded launcher commonlauncher.dll and negotiated version
2024-07-24 15:04:32.679 Successfully initialized launcher commonlauncher.dll
2024-07-24 15:04:32.679 Successfully found the launcher interfaces for launcher commonlauncher.dll
2024-07-24 15:04:32.679 Successfully registered the launchcontext for launcher commonlauncher.dll
2024-07-24 15:04:32.679 Successfully registered the launcher commonlauncher.dll for the scriptType 0
2024-07-24 15:04:32.679 Successfully registered the launcher commonlauncher.dll for the scriptType 3
2024-07-24 15:04:32.679 Successfully registered the launcher commonlauncher.dll for the scriptType 101
2024-07-24 15:04:33.078 RemoveWorkingDirectories invoked.
2024-07-24 15:05:51.440 Failed to delete directory C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\ExtensibilityData\Appcontainer1\FFFEC268-6354-4ABD-A452-F80F1B78011C\Documents with HR 0x80070005.
2024-07-24 15:05:51.440 Failed to delete directory C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\ExtensibilityData\Appcontainer1\FFFD3B79-D84C-47C1-BAEA-EA37E29D300D\Documents with HR 0x80070005.
2024-07-24 15:05:51.440 Failed to delete directory C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\ExtensibilityData\Appcontainer1\FFFCEE20-BA34-49C9-830D-E7793ADC026C\Documents with HR 0x80070005.
2024-07-24 15:05:51.440 Failed to delete directory C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\ExtensibilityData\Appcontainer1\FFF994FE-456B-4122-91F3-9925D091147B\Documents with HR 0x80070005.
(...) 10k lines
2024-07-24 15:05:53.909 Failed to delete directory C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\ExtensibilityData\Appcontainer1\FFFEC268-6354-4ABD-A452-F80F1B78011C with HR 0x80070091.
2024-07-24 15:05:53.909 Failed to delete directory C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\ExtensibilityData\Appcontainer1\FFFD3B79-D84C-47C1-BAEA-EA37E29D300D with HR 0x80070091.
2024-07-24 15:05:53.909 Failed to delete directory C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\ExtensibilityData\Appcontainer1\FFFCEE20-BA34-49C9-830D-E7793ADC026C with HR 0x80070091.
2024-07-24 15:05:53.909 Failed to delete directory C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\ExtensibilityData\Appcontainer1\FFF994FE-456B-4122-91F3-9925D091147B with HR 0x80070091.
Pytnonlauncher log:
[2024-07-25 07:10:59.066][0000211C][0000220C][Always] ScaleRJobCleaner.Start() successfully started thread 8436 [000020F4].
[2024-07-25 07:10:59.066][0000211C][0000220C][Always] ProcessPoolTrimmer.Start() successfully started thread 10236 [000027FC].
[2024-07-25 07:10:59.066][0000211C][0000220C][Always] StaleDirectoryCleaner.Start() successfully started thread 11016 [00002B08].
[2024-07-25 07:10:59.066][0000211C][0000220C][Always] ComputerName=***********
[2024-07-25 07:10:59.066][0000211C][0000220C][Always] SystemRoot=C:\Windows
[2024-07-25 07:10:59.066][0000211C][0000220C][Always] User=NT Service\MSSQLLaunchpad
[2024-07-25 07:10:59.066][0000211C][0000220C][Always] UserProfile=C:\Windows\ServiceProfiles\MSSQLLaunchpad
[2024-07-25 07:10:59.066][0000211C][0000220C][Always] Users=0
[2024-07-25 07:10:59.066][0000211C][000020F4][Always] ScaleRStaleJobCleaner::Worker(000001B31A06A9C0) started successfully.
[2024-07-25 07:10:59.066][0000211C][000027FC][Always] ProcessPoolTrimmer::Worker(000001B31A06B770) started successfully.
And indeed, folders are not removed. But they seem to be empty, so contents are probably removed, but folder remains and error entries are added. These error logs can grow huge. Multiple GB.
As for the permissions, I'm sure that both NT Service\MSSQLLaunchpad as well as SQL Server service account have full rights on that structure. Moreover, as part of testing, I even added these accounts to local administrators. That also did not solve the issue.
I would really appreciate any hints or suggestions on finding the root cause.
Thanks in advance.