Bug 78717 - radeon: Failed to allocate a buffer with Tesseract
Summary: radeon: Failed to allocate a buffer with Tesseract
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-15 01:21 UTC by mmstickman
Modified: 2016-04-05 07:24 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Hack to allow allocating larger BOs (1.42 KB, patch)
2014-06-12 01:21 UTC, Michel Dänzer
no flags Details | Splinter Review

Description mmstickman 2014-05-15 01:21:30 UTC
When you set shadows to Ultra in the recently released open source game, Tesseract, the game will segfault with the following:

radeon: Failed to allocate a buffer:
radeon:    size      : 536870912 bytes
radeon:    alignment : 32768 bytes
radeon:    domains   : 4
radeon: Failed to allocate a buffer:
radeon:    size      : 536870912 bytes
radeon:    alignment : 32768 bytes
radeon:    domains   : 4
radeon: Failed to allocate a buffer:
radeon:    size      : 536870912 bytes
radeon:    alignment : 32768 bytes
radeon:    domains   : 4
radeon: Failed to allocate a buffer:
radeon:    size      : 536870912 bytes
radeon:    alignment : 32768 bytes
radeon:    domains   : 4
radeon: Failed to allocate a buffer:
radeon:    size      : 536870912 bytes
radeon:    alignment : 32768 bytes
radeon:    domains   : 4
radeon: Failed to allocate a buffer:
radeon:    size      : 536870912 bytes
radeon:    alignment : 32768 bytes
radeon:    domains   : 4
failed allocating shadow atlas!

MSAA also seems to hang the entire machine
Comment 1 Michel Dänzer 2014-05-15 03:05:20 UTC
This is probably due to the kernel radeon driver refusing to allocate BOs larger than the CPU mappable part of VRAM. Please attach the output of dmesg after the problem occurs.

> MSAA also seems to hang the entire machine

That would need to be tracked in a separate report.
Comment 2 mmstickman 2014-05-15 03:16:27 UTC
The output of dmesg when the crash occurs is:

[106117.559369] radeon_gem_object_create:62 alloc size 512Mb bigger than 256Mb limit
[106117.559470] radeon_gem_object_create:62 alloc size 512Mb bigger than 256Mb limit
[106117.559714] radeon_gem_object_create:62 alloc size 512Mb bigger than 256Mb limit
Comment 3 Michel Dänzer 2014-06-12 01:21:46 UTC
Created attachment 100907 [details] [review]
Hack to allow allocating larger BOs

If you have at least 1G of VRAM, this hack might help. You might also need to specify radeon.gartsize=1024 or larger on the kernel command line.
Comment 4 jackdachef 2014-07-19 07:40:09 UTC
potential fix for glamor that might fix this from a non-kernel approach (at least it did for me):

https://bugs.freedesktop.org/show_bug.cgi?id=71190
Comment 5 Boyd Stephen Smith Jr. 2016-04-02 21:09:43 UTC
Getting a lot of these in my dmesg:

[154272.660917] radeon_gem_object_create:62 alloc size 340Mb bigger than 256Mb limit
[154272.660925] radeon_gem_object_create:62 alloc size 340Mb bigger than 256Mb limit
[154272.661012] radeon_gem_object_create:62 alloc size 340Mb bigger than 256Mb limit
[154272.661020] radeon_gem_object_create:62 alloc size 340Mb bigger than 256Mb limit

They match the similar errors I'm getting from (modded) Minecraft:

[16:08:10] [Client thread/ERROR]: ########## GL ERROR ##########
[16:08:10] [Client thread/ERROR]: @ Post render
[16:08:10] [Client thread/ERROR]: 1285: Out of memory
[16:08:10] [Client thread/ERROR]: ########## GL ERROR ##########
[16:08:10] [Client thread/ERROR]: @ Post render
[16:08:10] [Client thread/ERROR]: 1285: Out of memory
[16:08:10] [Client thread/ERROR]: ########## GL ERROR ##########
[16:08:10] [Client thread/ERROR]: @ Post render
[16:08:10] [Client thread/ERROR]: 1285: Out of memory
[16:08:10] [Client thread/ERROR]: ########## GL ERROR ##########
[16:08:10] [Client thread/ERROR]: @ Post render
[16:08:10] [Client thread/ERROR]: 1285: Out of memory

I'm on Debian Jessie, but I should be able to figure out how to run a newer X or kernel for testing, if needed.
Comment 6 Michel Dänzer 2016-04-04 08:29:00 UTC
This seems to work fine with current versions of kernel and Mesa.
Comment 7 Boyd Stephen Smith Jr. 2016-04-04 12:41:48 UTC
Any hint about when kernel (or mesa) version fixed this?  I'd like to upgrade, but it could ease my way if I didn't have to go all the way to git HEAD.
Comment 8 Michel Dänzer 2016-04-05 07:24:30 UTC
(In reply to Boyd Stephen Smith Jr. from comment #7)
> Any hint about when kernel (or mesa) version fixed this?

The BO allocation size limit was lifted in kernel 3.17. Mesa shouldn't matter after all.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.