Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,089
    • Issues 3,089
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1,011
    • Merge requests 1,011
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • MesaMesa
  • mesamesa
  • Issues
  • #8198
Closed
Open
Issue created Jan 30, 2023 by Andrey Skvortsov@skv

allwinner a64: DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory after some time of apps usage

System information

System:
  Host: mobian-dev Kernel: 6.1-sunxi64 arch: aarch64
    bits: 64 compiler: N/A Desktop: GNOME wm: phoc
    dm: greetd Distro: Debian GNU/Linux bookworm/sid
CPU:
  Info: quad core model: N/A variant: cortex-a53
    bits: 64 type: MCP arch: ARMv8 rev: 4
  Speed (MHz): avg: 648 min/max: 648/1152 cores:
    1: 648 2: 648 3: 648 4: 648 bogomips: N/A
  Features: Use -f option to see features
Graphics:
  Device-1: sun50i-a64-mali driver: lima v: kernel
    bus-ID: N/A chip-ID: allwinner:1c40000
  Device-2: sun50i-a64-dw-hdmi
    driver: sun8i_dw_hdmi v: N/A bus-ID: N/A
    chip-ID: allwinner:1ee0000
  Device-3: sun50i-a64-display-engine
    driver: sun4i_drm v: N/A bus-ID: N/A
    chip-ID: allwinner:display-engine
  Device-4: sun9i-a80-hdmi-audio driver: N/A
    bus-ID: N/A chip-ID: allwinner:sound_hdmi
  Display: wayland server: X.Org v: 1.22.1.6
    with: Xwayland v: 22.1.6 compositor: phoc
    driver: N/A display-ID: :1 screens: 1
  Screen-1: 0 s-res: 450x900 s-dpi: 96
    monitors: <missing: xrandr>
  Monitor-1: DSI-1 size-res: N/A
  API: OpenGL v: 2.1 Mesa 22.3.4 renderer: Mali400
    direct render: Yes

Describe the issue

Open and close apps on PinePhone running Mobian with Phosh. After around 20 apps are open and closed apps start to crash with

янв 31 00:56:57 mobian-dev org.gnome.Settings.desktop[108298]: DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory
янв 31 00:56:57 mobian-dev org.gnome.Settings.desktop[108298]: DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory
янв 31 00:57:02 mobian-dev org.gnome.Weather[108647]: DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory
янв 31 00:57:02 mobian-dev org.gnome.Weather[108647]: DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory
янв 31 00:57:04 mobian-dev org.gnome.Contacts[108489]: DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory
янв 31 00:57:04 mobian-dev org.gnome.Contacts[108489]: DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory
янв 31 00:57:04 mobian-dev org.gnome.Nautilus[108561]: DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory
янв 31 00:57:04 mobian-dev org.gnome.Nautilus[108561]: DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory

At the end it's not possible to open even single simple terminal. It crashes immediately.

Regression

The problem started with mesa upgrade from 22.3.2 to 22.3.3. 22.3.4 and 23.0.0-rc1 do have the same problem. Since this is regression and the problem can be reproduced relatively easy, I've bisected the problem. Commit that caused the problem is 2adab724:

commit 2adab724e59c662a046cb1da8bfb3177330e01da
Author: Asahi Lina <lina@asahilina.net>
Date:   Wed Dec 21 00:37:31 2022 +0900

    kmsro: Fix renderonly_scanout BO aliasing
    
    BOs can only have one handle. If renderonly_create_gpu_import_for_resource
    ends up importing a BO that was already mapped for scanout, it will get
    the same handle. This leaves us with two renderonly_scanout objects for
    one handle, and the first one to be destroyed will free it.
    
    Import the BO map tracking logic from asahi, to avoid aliasing
    renderonly_scanout objects. Each actual BO now is only represented by a
    single object instance, which is reference counted.
    
    Fixes KWin full-screen PipeWire capture breaking scanout entirely.
    
    Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
    Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
    Signed-off-by: Asahi Lina <lina@asahilina.net>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20397>
    (cherry picked from commit ad4d7ca8332488be8a75aff001f00306a9f6402e)

I've reverted it and built mesa 22.3.3, 22.3.4 and 23.0.0-rc1 and issue was gone in all versions.

Any extra information would be greatly appreciated

Link to Debian issue

Edited Jan 31, 2023 by Michel Dänzer
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking