Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite crashes #7893

Open
MennoVink opened this issue Apr 23, 2024 · 5 comments
Open

Test suite crashes #7893

MennoVink opened this issue Apr 23, 2024 · 5 comments
Labels
CI/Tests Anything related to CI or testing

Comments

@MennoVink
Copy link

Environment:

  • OS: Windows
  • GPU and driver version: NVIDIA GeForce RTX 3070 (driver version: 2311913472)
  • SDK or header version if building from repo: tag vulkan-sdk-1.3.280 (installed that sdk as well)
  • Options enabled (synchronization, best practices, etc.):
  • OBS: 17.1.3
  • RTSS: 7.3.4

Describe the Issue

I'm trying to run the testsuite according to these steps:
#7891 (comment)
It mostly works fine up until about 30 tests in. Then it crashes inside TEST_F(VkBestPracticesLayerTest, UseDeprecatedInstanceExtensions)
The loader jumps through graphics-hook64 (i think obs?) and then crashes in RTSSVkLayer64 (riva tuner statistics server, shipped with MSI Afterburner)

Expected behavior

The testsuite protects itself against faulty implicit layers. For example with the VK_LOADER_LAYERS_DISABLE + VK_LOADER_LAYERS_ENABLE combination.

@artem-lunarg
Copy link
Contributor

artem-lunarg commented Apr 23, 2024

OBS causes this issue. There is this documentation section: https://github.com/KhronosGroup/Vulkan-ValidationLayers/tree/main/tests#implicit-layers-note

Maybe this can be categorized as this issue #3681 (@spencer-lunarg )

I also have problem with OBS locally, and usually use this brute force solution (notice the underscore to disable layer), but I guess the best practice is to use the method from documentation:
image

@charles-lunarg
Copy link
Contributor

VK_LOADER_LAYERS_DISABLE=VK_LAYER_OBS_HOOK works well for disabling layers while running tests. To make it work for multiple layers, use a semicolon for windows and colon for linux/macOS.

So for windows:
VK_LOADER_LAYERS_DISABLE=VK_LAYER_OBS_HOOK;VK_LAYER_RTSS

Linux/MacOS
VK_LOADER_LAYERS_DISABLE=VK_LAYER_OBS_HOOK:VK_LAYER_RTSS

As for the tests setting these by themselves, its possible but doesn't work on older loaders (so only loaders 1.3.234 and newer will respect the environment variable).
VK_LOADER_LAYERS_DISABLE=~implicit~ is the way to disable ALL implicit layers.

@spencer-lunarg spencer-lunarg added the CI/Tests Anything related to CI or testing label Apr 23, 2024
@spencer-lunarg
Copy link
Contributor

@charles-lunarg is there a way for the app (in this case the VVL test app) to do the VK_LOADER_LAYERS_DISABLE here when creating the VkInstance?

@charles-lunarg
Copy link
Contributor

@charles-lunarg is there a way for the app (in this case the VVL test app) to do the VK_LOADER_LAYERS_DISABLE here when creating the VkInstance?

If you mean through the Vulkan API, there is not one as far as I know.

However, it is not difficult to set environment variables. I recently made validation set VK_LAYER_PATH if it wasn't set already. It'd be trivial to set VK_LOADER_LAYERS_DISABLE=implicit as well.

@MennoVink
Copy link
Author

In my own apps i do something like this before i start using vulkan, copy it as you please

static bool SetEnvVar( char* envVarString )
{
#if defined( MEVI_WINDOWS )
	return _putenv( envVarString ) == 0;
#else
	return putenv( envVarString ) == 0;
#endif
}
bool VulkanLoader::SetDisabledLayers( ArrayProxy< const String > globPatterns )
{
	String envVar = "VK_LOADER_LAYERS_DISABLE=";
	for( size_t index = 0; index < globPatterns.Size(); ++index )
	{
		envVar << globPatterns[ index ];
		if( index < globPatterns.Size() - 1 )
			envVar << ",";
	}
	return SetEnvVar( envVar.GetCString() ) == 0;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/Tests Anything related to CI or testing
Projects
None yet
Development

No branches or pull requests

4 participants