Out of VRAM freeze

Moderator: GZDoom Developers

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Sun Aug 18, 2019 2:48 pm

VK_ERROR_DEVICE_LOST again. And that's all I seem to be getting. Though it does crash faster certainly. Less than a minute this time.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby dpJudas » Sun Aug 18, 2019 9:03 pm

It sounds like you might be running out of video memory (maybe somehow due to a memory leak?), although it is strange that you don't get an explicit out of memory error. The device lost error is unfortunately the most useless thing vulkan can report back.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Mon Aug 19, 2019 9:57 am

Certainly seems to be. The higher the multiplier is, the quicker it'll crash.

I'd hesitate to call it an immediate memory leak. More along the lines of so many different sprites caching, because it's AEons of Death. And there are many... many sprites.

Furthermore I have a WIP addon included which includes some larger sprites (all of which I plan on compressing the sprite file sizes as soon as I'm happy with all of them and they don't need further changes done to them). The monsters in question have 16 sprite angles too. The strange thing is, OpenGL never has this issue. Ever. This makes the vulkan situation all the more bizarre...

I think at this stage, unless you have any other ideas, it may be time for a last resort. If you and/or _mental_ are ready and willing to try and trace it yourselves, I'll send you all the files in a bundle. I'll see about including a simple "LoadMe.pk3" file with GameInfo set up to load all the files for you to make this as smooth as possible for you.

I'll ensure everything's set up so you don't have to change any of the mod's options around to get the effect to replicate. All you'll have to do is start the game, attach the debugger and wait patiently for it to crash - which shouldn't take long at all.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby _mental_ » Mon Aug 19, 2019 1:35 pm

OpenGL driver will silently use main RAM if video memory is exhausted. Vulkan renderer requires explicit memory management in this case.
Unfortunately, I cannot help to debug this issue because I don’t have NVIDIA card in Windows PC.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Lockups occasionally occurring when rendering new things

Postby Marisa Kirisame » Mon Aug 19, 2019 2:04 pm

After checking that vulkaninfo output it really bothers me that on one of the memory heaps there's a larger budget than its size, which makes no sense and goes against the spec.

Code: Select allExpand view
        memoryHeaps[1] :
                size          = 4228358144 (0x1fc07a000) (3.94 GiB)
                budget        = 7670994739
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Lockups occasionally occurring when rendering new things

Postby dpJudas » Mon Aug 19, 2019 2:25 pm

The strange thing is that, if video memory is exhausted, I would expect our memory allocation library VMA to return an error.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Lockups occasionally occurring when rendering new things

Postby _mental_ » Mon Aug 19, 2019 2:44 pm

I did some testing on Kubuntu 18.04 notebook with Intel UHD 620 and NVIDIA MX150 (proprietary drivers).
Played MAP30 of Doom II with AEoD 6.66 Alpha 8, texture upscale was 6x.

Intel driver handles out of RAM correctly, and GZDoom exits with the corresponding message.
NVIDIA driver locks up entire system though. It didn’t hang completely, but response to a single key press was like in ten seconds.

On Windows it seems to be more graceful, but still works like crap. Apparently, Vulkan isn’t the primary target for NVIDIA.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Mon Aug 19, 2019 2:59 pm

I'm glad it was at least reproducible... Yeah, on Windows, GZDoom itself locks up but nothing else does, thankfully.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Mon Aug 26, 2019 8:46 am

Only curious but was this commit something I should test to see if the game stops freezing up whenever it runs into an error? Or was that to address something else?
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby dpJudas » Mon Aug 26, 2019 9:00 am

It has a chance of maybe being a fix for it. But only you can tell if it actually did.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Wed Aug 28, 2019 4:21 pm

It didn't help, it seems. But at the same time, I think I found a clue.

If you attempt to do error_fatal in console, instead of showing the box like it's supposed to, it keeps the window from the game and simply shrinks it down. You get nothing out of it otherwise. No dialogue box with the logs or anything.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby _mental_ » Sat Aug 31, 2019 1:20 am

Is this with default settings? I cannot test on NVIDIA graphics hardware, but on AMD fatal errors work fine for me.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Sat Aug 31, 2019 12:57 pm

Tested with my regular config file and default. It always happens on my NVidia card with vulkan enabled.

But just so you know, If you test with default settings, vulkan is disabled by default. On top of that, laptops use the default choice between graphics card providers - my intel in this case.

So after generating a brand new config, setting Vulkan back to On and setting the graphics card to Nvidia, this is what it looks like -a shrunken screen with the 'ghost' image frozen in on it. But you can see at the top it says "Fatal Error", caused by me entering the error_fatal command.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Lockups occasionally occurring when rendering new things

Postby _mental_ » Sat Aug 31, 2019 1:52 pm

Yes, I didn’t describe what I meant by default settings. Options you changes are OK, but could you please check with IWAD only, with and without map loaded?
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Lockups occasionally occurring when rendering new things

Postby Major Cooke » Sat Aug 31, 2019 1:55 pm

Same results there too. Last frame frozen in place.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

PreviousNext

Return to Vulkan Renderer Bugs

Who is online

Users browsing this forum: No registered users and 0 guests