Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,771
    • Issues 2,771
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 926
    • Merge requests 926
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Issues
  • #6286
Closed
Open
Created Apr 09, 2022 by neofeo@neofeo

bad memory managment on panfrost RK3399 - cannot alocate more ram - fury unleashed

Hi @icecream95 @bbrezillon @alyssa , I tested this same game (exact folder) on a z8350 (can only allocate 2gb to video but has 4gb of ram in total without any swap at all) with mesa and does work perfectly fine. I could not separate vram from ram and I dont know how to measure that on igpus that arent nvidia ones (neither on panfrost of course). the z8350 isnt a champ on memory managment neither, its a soc that should max out on 2gb of ram but they made a trick to use 4gb (in 2 ranks) instead and works less than decently.

z8350 pics

WhatsApp_Image_2022-04-08_at_9.54.29_PM

WhatsApp_Image_2022-04-08_at_9.54.29_PM__1_

the game seems to consume from 2 to 3 gb in total with the all xfce system included.

Now, on panfrost, we always had troubles with memory running out on games that should just run fine or at least without freaking out while you are close to 3 or 3.5 GB of ram used . panfrost seems to use an inmense amount of ram for some reason. I dont know how to debug this? is an apitrace a good tool for this too? I can make an apitrace if that's what you need.

System:    Host: pinebook-pro Kernel: 5.10.60-rockchip64 aarch64 bits: 64 compiler: N/A Desktop: Xfce 4.14.2 tk: Gtk 3.24.13 
           wm: xfwm4 dm: LightDM Distro: Ubuntu 20.04.3 LTS (Focal Fossa) 
CPU:       Topology: 6-Core (2-Die) model: N/A variant-1: cortex-a53 variant-2: cortex-a72 bits: 64 type: MCP MCM arch: ARMv8 
           rev: 4 
           features: Use -f option to see features bogomips: 0 
           Speed: 1200 MHz min/max: 408/1416:1800 MHz Core speeds (MHz): 1: 816 2: 816 3: 816 4: 816 5: 1200 6: 1200 
Graphics:  Device-1: display-subsystem driver: rockchip_drm v: N/A bus ID: N/A chip ID: rockchip:display-subsystem 
           Device-2: rk3399-mali driver: panfrost v: kernel bus ID: N/A chip ID: rockchip:ff9a0000 
           Display: x11 server: X.org 1.20.11 driver: modesetting unloaded: fbdev resolution: <xdpyinfo missing> 
           OpenGL: renderer: Mali T860 (Panfrost) v: 3.3 Mesa 21.3.0-devel (git-2b4b310 2021-08-21 focal-oibaf-ppa) 
           direct render: Yes 

I was able to go launch the game menu, but wasnt able to go ingame. box64 output with panfrost freaking out at the end:

pinebook-pro:game:% ./FuryUnleashed.x86_64 
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL PageSize:4096
Box64 with Dynarec v0.1.7 a4772ff built on Apr  7 2022 20:20:04
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 56 Env var
Looking for ./FuryUnleashed.x86_64
Using native(wrapped) libdl.so.2
Using native(wrapped) librt.so.1
Using emulated /lib/x86_64-linux-gnu/libstdc++.so.6
Using native(wrapped) libm.so.6
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Using native(wrapped) libpthread.so.0
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libX11.so.6
Using native(wrapped) libXext.so.6
Using native(wrapped) libxcb.so.1
Using native(wrapped) libXau.so.6
Using native(wrapped) libXdmcp.so.6
Using native(wrapped) libXcursor.so.1
Using native(wrapped) libXinerama.so.1
Using native(wrapped) libXi.so.6
Using native(wrapped) libXrandr.so.2
Using native(wrapped) libXrender.so.1
Using native(wrapped) libXss.so.1
Using native(wrapped) libXxf86vm.so.1
Using native(wrapped) libGL.so.1
Using native(wrapped) libudev.so.1
Found path: /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed.x86_64
Using emulated /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/MonoBleedingEdge/x86_64/libmonobdwgc-2.0.so
MonoBleedingEdge detected, disable Dynarec BigBlock and enable Dynarec StrongMem
Mono path[0] = '/media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Managed'
Mono config path = '/media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/MonoBleedingEdge/etc'
Error loading needed lib /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Managed/mscorlib.dll.so
Warning: Cannot dlopen("/media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Managed/mscorlib.dll.so"/0x95e6abe0, 101)
Error loading needed lib /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Managed/mono/aot-cache/amd64/mscorlib.dll.so
Warning: Cannot dlopen("/media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Managed/mono/aot-cache/amd64/mscorlib.dll.so"/0x95a725f0, 101)
Using emulated /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Plugins/x86_64/ScreenSelector.so
Using native(wrapped) libgtk-x11-2.0.so.0
Using native(wrapped) libgdk-x11-2.0.so.0
Using native(wrapped) libgobject-2.0.so.0
Using native(wrapped) libglib-2.0.so.0
Using native(wrapped) libgio-2.0.so.0
Using native(wrapped) libgmodule-2.0.so.0
Using native(wrapped) libgdk_pixbuf-2.0.so.0
Using native(wrapped) libpangocairo-1.0.so.0
Using native(wrapped) libpango-1.0.so.0
Preloaded 'ScreenSelector.so'
Using emulated /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Plugins/x86_64/libfmod.so
Warning: Weak Symbol __gmon_start__ not found, cannot apply R_X86_64_JUMP_SLOT @0xffff9acc8358 (0x21e26)
Preloaded 'libfmod.so'
Using emulated /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Plugins/x86_64/libfmodL.so
Warning: Weak Symbol __gmon_start__ not found, cannot apply R_X86_64_JUMP_SLOT @0xffff9a905360 (0x22be6)
Preloaded 'libfmodL.so'
Using emulated /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Plugins/x86_64/libfmodstudio.so
Warning: Weak Symbol __gmon_start__ not found, cannot apply R_X86_64_JUMP_SLOT @0xffff9a5579f8 (0x1e656)
Preloaded 'libfmodstudio.so'
Using emulated /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Plugins/x86_64/libfmodstudioL.so
Warning: Weak Symbol __gmon_start__ not found, cannot apply R_X86_64_JUMP_SLOT @0xffff9a1e5a18 (0x1ed76)
Preloaded 'libfmodstudioL.so'
Using emulated /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Plugins/x86_64/libgvraudio.so
Warning: Global Symbol __google_potentially_blocking_region_begin not found, cannot apply R_X86_64_GLOB_DAT @0xffff99d9c568 ((nil)) in /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Plugins/x86_64/libgvraudio.so
Warning: Global Symbol __google_potentially_blocking_region_end not found, cannot apply R_X86_64_GLOB_DAT @0xffff99d9c570 ((nil)) in /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Plugins/x86_64/libgvraudio.so
Warning: Weak Symbol __gmon_start__ not found, cannot apply R_X86_64_JUMP_SLOT @0xffff99d9c638 (0x79116)
Warning: Weak Symbol __google_potentially_blocking_region_begin not found, cannot apply R_X86_64_JUMP_SLOT @0xffff99d9fc28 (0x7fcf6)
Warning: Weak Symbol __google_potentially_blocking_region_end not found, cannot apply R_X86_64_JUMP_SLOT @0xffff99d9fc30 (0x7fd06)
Preloaded 'libgvraudio.so'
Using emulated /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Plugins/x86_64/libresonanceaudio.so
Preloaded 'libresonanceaudio.so'
Using emulated /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/Plugins/x86_64/libsteam_api.so
Preloaded 'libsteam_api.so'
Display 0 'eDP-1': 1920x1080 (primary device).
Loading player data from /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed_Data/data.unity3d
Logging to /home/salva/.config/unity3d/Awesome Games Studio/Fury Unleashed/Player.log
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.IO.Compression.DeflateStreamNative.CloseZStream (intptr) [0x00002] in <3845a180c26b4889bc2d47593a665814>:0
  at System.IO.Compression.DeflateStreamNative/SafeDeflateStreamHandle.ReleaseHandle () [0x00000] in <3845a180c26b4889bc2d47593a665814>:0
  at System.Runtime.InteropServices.SafeHandle.DangerousReleaseInternal (bool) [0x000a3] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
  at System.Runtime.InteropServices.SafeHandle.InternalDispose () [0x0000e] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
  at System.Runtime.InteropServices.SafeHandle.Dispose (bool) [0x00003] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
  at System.Runtime.InteropServices.SafeHandle.Dispose () [0x00000] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
  at System.IO.Compression.DeflateStreamNative.Dispose (bool) [0x0001f] in <3845a180c26b4889bc2d47593a665814>:0
  at System.IO.Compression.DeflateStream.Dispose (bool) [0x00000] in <3845a180c26b4889bc2d47593a665814>:0
  at System.IO.Stream.Close () [0x00000] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
  at System.IO.Stream.Dispose () [0x00000] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
  at (wrapper remoting-invoke-with-check) System.IO.Stream.Dispose () [0x00031] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
  at System.IO.Compression.GZipStream.Dispose (bool) [0x0000b] in <3845a180c26b4889bc2d47593a665814>:0
  at System.IO.Stream.Close () [0x00000] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
  at System.IO.Stream.Dispose () [0x00000] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
  at StorageModule.Unzip (string) [0x00026] in <d3799250e0ef481ebf32134d6ddf0933>:0
  at GameData.LoadSaveAndQuit (GameData,StorageData) [0x00011] in <d3799250e0ef481ebf32134d6ddf0933>:0
  at GameData.LoadFromStorageModule () [0x00043] in <d3799250e0ef481ebf32134d6ddf0933>:0
  at GameData.Start () [0x00108] in <d3799250e0ef481ebf32134d6ddf0933>:0
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0001e] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
/proc/self/maps:
0000000000400040-0000000000400238 rw-p 0000000000000040 b3:61 1966150 /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed.x86_64
0000000000400238-0000000000400254 rwxp 0000000000000238 b3:61 1966150 /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed.x86_64
0000000000400000-0000000001d3e005 r-xp 0000000000000000 b3:61 1966150 /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed.x86_64
0000000001f3ecf8-00000000020d1c48 r-xp 000000000193ecf8 b3:61 1966150 /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed.x86_64
0000000001fab338-0000000001fab578 -w-p 00000000019ab338 b3:61 1966150 /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed.x86_64
0000000000400254-0000000000400298 r--p 0000000000000254 b3:61 1966150 /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed.x86_64
0000000001a03af0-0000000001a8497c ---p 0000000001603af0 b3:61 1966150 /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed.x86_64
0000000001f3ecf8-0000000001fb1000 -w-p 000000000193ecf8 b3:61 1966150 /media/salva/DATA/LINUX/Fury Unleashed/game/FuryUnleashed.x86_64
    ffffb2423000-    ffffb2c23000 rw-p                0 00:00 0 [stack]

Native stacktrace:

DRM_IOCTL_PANFROST_CREATE_BO failed: Cannot allocate memory
BO creation failed
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking