Skip to content

[Impeller][Vulkan] Reproducible raster-thread SIGSEGV in vulkan.adreno.so at qglinternal::vkCmdBeginRenderPass — Adreno 829 / OnePlus 15R (Android 16) #192002

Open

Description

@stephen00001

Steps to reproduce

Reproducible on demand on one device, on a shipping app. I do not yet have a
minimal reproduction — see "What I can do next" below, and I am happy to build
one if it would help.

  1. Build any non-trivial Flutter app with Impeller enabled (the default) for
    Android, --profile or --release.
  2. Run it on a OnePlus 15R (CPH2769), Android 16, Adreno 829.
  3. Use it normally — anything that submits GPU work steadily. In my case:
    panning/pinch-zooming a CustomPaint board of a few thousand drawLine
    calls, switching themes, regenerating the scene.
  4. The raster thread takes SIGSEGV inside the Adreno Vulkan driver. Observed at
    20, 43 and 65 minutes of process uptime across three separate sessions
    on two dates twelve days apart.

Setting io.flutter.embedding.android.EnableImpeller=false in
AndroidManifest.xml makes it go away entirely — weeks of daily use on the
same device, same app, no crash.

Expected results

The app keeps rendering.

Actual results

Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x14 on the
1.raster thread. No application frame appears anywhere on the stack — the
top three frames are the Adreno driver, below that is libflutter.so all the
way down to __pthread_start.

The fault address is 0x14 in every occurrence I have captured, which suggests
a null-pointer dereference at a fixed struct offset rather than heap
corruption. Cause: null pointer dereference agrees.

Logs

Package name and install paths replaced with placeholders; everything
technical is verbatim.

Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x14 in tid 28233 (1.raster), pid 17490 (example.myapp)

Build fingerprint: 'OnePlus/CPH2769/OP612DL1:16/BP2A.250605.015/B.R4T3.28692ee-3bd6e0-3b1467:user/release-keys'
Revision: '0'
ABI: 'arm64'
Process uptime: 3876s
Cmdline: com.example.myapp
pid: 17490, tid: 28233, name: 1.raster  >>> com.example.myapp <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000014
Cause: null pointer dereference

    x0  b40000738832f580  x1  0000000000000004  x2  0000007c51439800  x3  0000000000000012
    x4  0000000000000142  x5  8080000000000000  x6  0000000000000000  x7  0000000000000000
    x8  0000000000000000  x9  00000000fffffffe  x10 0000000000000200  x11 00000000000000b4
    lr  0000007ca4cb1038  sp  0000007bab9f4860  pc  0000007ca4cb0d64  pst 0000000060001000

backtrace:
  #00 pc 000000000012ad64  /vendor/lib64/hw/vulkan.adreno.so (!!!0000!65bb4f16e1c4caf7a56f18c58bd23d!8cfe428358!+628) (BuildId: a4363716596948ef069238e0e6829169)
  #01 pc 000000000014b750  /vendor/lib64/hw/vulkan.adreno.so (!!!0000!2b54ec3f889e47c947f5102d244cd8!8cfe428358!+832) (BuildId: a4363716596948ef069238e0e6829169)
  #02 pc 000000000014b21c  /vendor/lib64/hw/vulkan.adreno.so (qglinternal::vkCmdBeginRenderPass(VkCommandBuffer_T*, VkRenderPassBeginInfo const*, VkSubpassContents)+108) (BuildId: a4363716596948ef069238e0e6829169)
  #03 pc 00000000008392a0  base.apk!libflutter.so (offset 0x15b8000) (BuildId: 029a0f63d413a17beda1b7c51096f6796a37607e)
  #04 pc 0000000000784ce8  base.apk!libflutter.so (offset 0x15b8000)
  #05 pc 0000000000806a08  base.apk!libflutter.so (offset 0x15b8000)
  #06 pc 000000000080697c  base.apk!libflutter.so (offset 0x15b8000)
  #07 pc 000000000080e594  base.apk!libflutter.so (offset 0x15b8000)
  #08 pc 000000000080d7ac  base.apk!libflutter.so (offset 0x15b8000)
  #09 pc 000000000080d4e4  base.apk!libflutter.so (offset 0x15b8000)
  #10 pc 00000000007f0bfc  base.apk!libflutter.so (offset 0x15b8000)
  ... (#11–#29 all base.apk!libflutter.so, offset 0x15b8000)
  #30 pc 0000000000016df8  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+1200)
  #31 pc 0000000000029aa8  /system/lib64/libandroid.so (ALooper_pollOnce+104)
  #32 pc 000000000050d59c  base.apk!libflutter.so (offset 0x15b8000)
  #33 pc 000000000050b4b0  base.apk!libflutter.so (offset 0x15b8000)
  #34 pc 000000000050b2c0  base.apk!libflutter.so (offset 0x15b8000)
  #35 pc 000000000009b9f4  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+184)
  #36 pc 000000000008deb4  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68)
37 total frames

Two earlier captures on the same device (2026-08-16, Flutter 3.41.9) faulted at
the same address on the same thread but entered the driver at
vkBeginCommandBuffer and at vkCmdDraw rather than vkCmdBeginRenderPass —
i.e. all three of the command-buffer entry points, same fault.

Device / driver

Device OnePlus 15R (CPH2769)
Android 16 — build B.R4T3.28692ee-3bd6e0-3b1467, dated 2026-07-07
GPU Adreno (TM) 829
Vulkan driver driverVersion 2150932521, apiVersion 4210983
Driver BuildId a4363716596948ef069238e0e6829169

No OTA has landed on this device between the 16 August and 28 August
reproductions, so the driver is unchanged across all three.

Relationship to #181069

#181069 is the same crash — same
library, same qglinternal::vkCmdBeginRenderPass, same null-pointer cause,
same shape of obfuscated driver frames above it — reported on Flutter 3.35.6 /
Android 12 and described as "predominantly OPPO devices". CPH#### is an OPPO
product code, so that is the same vendor's driver.

That issue was closed by the stale bot because the reporter had only Crashlytics
aggregates and could not reproduce it. This report exists because I can
reproduce it on demand
, which is what that thread was missing. It is now
locked, hence a new issue as the closing message instructs.

Between the two reports the crash survives four minor Flutter versions and four
Android versions, which points at the driver rather than at Impeller — but
Impeller is what triggers it, and disabling Impeller is currently the only
mitigation available to app developers.

Why this matters beyond one app

The only workaround is EnableImpeller=false, and the engine now logs
[Action Required]: Impeller opt-out deprecated. These options are going to go away in an upcoming Flutter release. When that escape hatch is removed, apps
hitting this will have no mitigation at all — the crash is in a vendor driver,
so there is nothing app-side to fix.

What I can do next

I have the device and can reproduce reliably. Happy to:

  • build and share a minimal reproduction app, if the pattern above is not
    enough to narrow it;
  • run a patched engine or a --local-engine build with extra validation;
  • capture with Vulkan validation layers enabled;
  • test any candidate fix.

flutter doctor -v

[√] Flutter (Channel stable, 3.41.9, on Microsoft Windows [Version 10.0.26200.9168], locale en-IE)
    • Flutter version 3.41.9 on channel stable at C:\tools\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 00b0c91f06 (4 months ago), 2026-04-29 10:03:19 -0700
    • Engine revision 42d3d75a56
    • Dart version 3.11.5
    • DevTools version 2.54.2

[√] Windows Version (Windows 11 or higher, 25H2, 2009)

[!] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
    • Platform android-36.1, build-tools 36.1.0
    • ANDROID_HOME = C:\Users\<user>\AppData\Local\Android\Sdk
    • Java version OpenJDK Runtime Environment Microsoft-13106404 (build 21.0.10+7-LTS)
    X Android license status unknown.

[√] Connected device (1 available)
    • CPH2769 (mobile) • Android 16 (API 36) • arm64

Activity

  1. added
    engine
    in triage
    e: impeller
    platform-android
    e: device-specific
    team-engine
    on Aug 29, 2026
  2. mbcorona commented on Aug 29, 2026

    @mbcorona
    Member

    Hi @stephen00001, thanks for the detailed report and the full native stack. Routing to the engine team.

    Since you have the device and offered: a minimal repro plus a capture with Vulkan validation layers enabled would both help the team narrow it. Thanks for the thorough writeup.

  3. stephen00001 commented on Aug 29, 2026

    @stephen00001
    Author

    I've got a minimal reproduction now, at the bottom of this comment. Single file, no packages or assets, and it crashes about five seconds after launch. I ran it three times and got the same crash each time.

    Impeller is left at its default, so there's no EnableImpeller entry in the manifest. The log confirms it:

    I flutter : Using the Impeller rendering backend (Vulkan).
    

    Create an empty project, paste the file below over lib/main.dart, and build in release:

    flutter create repro
    flutter build apk --release
    flutter install
    adb logcat -b crash
    

    Leave it in the foreground, it doesn't need any interaction. The crash lands in the crash buffer, not the default one.

    What causes it

    It only goes down when two things happen together. There's a ui.Picture with around 500 MaskFilter.blur draws in it, and that picture gets replayed inside saveLayer offscreens whose bounds change every frame.

    I took each one out on its own and ran it again. Without either of them it just keeps going.

    The layer count and the blur count change how long it survives rather than whether it does. Ten layers a frame kills it in about six seconds, one layer takes around thirty-six. Drop the blurred draws from 500 to 25 and it stops crashing.

    The crash

    Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x14 in tid 10912 (1.raster)
    Build fingerprint: 'OnePlus/CPH2769/OP612DL1:16/BP2A.250605.015/B.R4T3.28692ee-3bd6e0-3b1467:user/release-keys'
    Cause: null pointer dereference
    
    backtrace:
      #00 pc 000000000012ad64  /vendor/lib64/hw/vulkan.adreno.so (!!!0000!65bb4f16e1c4caf7a56f18c58bd23d!8cfe428358!+628) (BuildId: a4363716596948ef069238e0e6829169)
      #01 pc 000000000012cba8  /vendor/lib64/hw/vulkan.adreno.so (!!!0000!f87c7d9d04521af55418b0c3db7574!8cfe428358!+3208) (BuildId: a4363716596948ef069238e0e6829169)
      #02 pc 00000000008219dc  base.apk!libflutter.so (offset 0x300000)
      ... (#03 to #37 all base.apk!libflutter.so)
    

    Same #00 frame and driver BuildId as my original report, so the smaller program is hitting the same place. Fault address has been 0x14 in the three original captures and in every run of this one.

    Device

    Same as my original report, and no OTA has landed since, so it's the same driver throughout.

    Device OnePlus 15R (CPH2769)
    Android 16, build B.R4T3.28692ee-3bd6e0-3b1467
    GPU Adreno (TM) 829
    Driver BuildId a4363716596948ef069238e0e6829169
    Flutter 3.41.9 stable, engine 42d3d75

    Validation layers

    I can do that too, though the layers aren't in the NDK any more and loading them needs a debuggable build. That's JIT rather than AOT and I don't know yet whether it still crashes there, so the capture might not be telling you about the same thing. Getting one against a release build would mean finding a userdebug device. Either is fine by me, just say which is more use.

    I've still got the device and a run only takes a few seconds, so send a patch over whenever you have one.

    lib/main.dart
    // Minimal repro for flutter/flutter#192002.
    //
    // Raster-thread SIGSEGV in /vendor/lib64/hw/vulkan.adreno.so at
    // qglinternal::vkCmdBeginRenderPass. OnePlus 15R (CPH2769), Adreno 829,
    // Android 16. Crashes in about 6 seconds.
    //
    //   flutter create repro   (then paste this over lib/main.dart)
    //   flutter build apk --release && flutter install
    //   adb logcat -b crash
    //
    // Impeller is left at its default; no EnableImpeller entry in the manifest.
    // No packages, no assets.
    //
    // Two ingredients, both required. Each was verified by removing it:
    //   1. a ui.Picture containing ~500 MaskFilter.blur draws;
    //   2. that picture replayed inside saveLayer offscreens whose bounds
    //      change every frame.
    // Either one without the other runs indefinitely.
    
    import 'dart:math';
    import 'dart:ui' as ui;
    
    import 'package:flutter/material.dart';
    import 'package:flutter/scheduler.dart';
    
    /// Blurred draws recorded into the picture. 500 crashes; 25 does not.
    const int kBlurredLines = 500;
    
    /// Offscreen layers opened per frame. 10 crashes in ~6s, 1 in ~36s.
    const int kLayersPerFrame = 10;
    
    void main() => runApp(const MaterialApp(
          debugShowCheckedModeBanner: false,
          home: ReproPage(),
        ));
    
    class ReproPage extends StatefulWidget {
      const ReproPage({super.key});
    
      @override
      State<ReproPage> createState() => _ReproPageState();
    }
    
    class _ReproPageState extends State<ReproPage>
        with SingleTickerProviderStateMixin {
      late final Ticker _ticker;
      double _t = 0;
    
      @override
      void initState() {
        super.initState();
        _ticker = createTicker((e) {
          setState(() => _t = e.inMilliseconds / 1000.0);
        })
          ..start();
      }
    
      @override
      void dispose() {
        _ticker.dispose();
        super.dispose();
      }
    
      @override
      Widget build(BuildContext context) => Scaffold(
            backgroundColor: const Color(0xFF101014),
            body: CustomPaint(size: Size.infinite, painter: _Painter(_t)),
          );
    }
    
    class _Painter extends CustomPainter {
      _Painter(this.t);
    
      final double t;
    
      /// Recorded once, then replayed inside every layer below.
      static ui.Picture? _picture;
      static Size _pictureSize = Size.zero;
    
      ui.Picture _blurredPicture(Size size) {
        final cached = _picture;
        if (cached != null && size == _pictureSize) return cached;
    
        final recorder = ui.PictureRecorder();
        final canvas = Canvas(recorder);
        final rng = Random(7);
        for (var i = 0; i < kBlurredLines; i++) {
          final a = Offset(
            rng.nextDouble() * size.width,
            rng.nextDouble() * size.height,
          );
          final b = a +
              Offset(
                (rng.nextDouble() - 0.5) * size.width * 0.12,
                (rng.nextDouble() - 0.5) * size.height * 0.12,
              );
          canvas.drawLine(
            a,
            b,
            Paint()
              ..color = HSVColor.fromAHSV(
                1,
                i * 360 / kBlurredLines,
                0.65,
                0.95,
              ).toColor()
              ..strokeWidth = 3.2
              ..maskFilter = const MaskFilter.blur(BlurStyle.normal, 4),
          );
        }
        _pictureSize = size;
        return _picture = recorder.endRecording();
      }
    
      @override
      void paint(Canvas canvas, Size size) {
        if (size.isEmpty) return;
        final picture = _blurredPicture(size);
    
        for (var i = 0; i < kLayersPerFrame; i++) {
          final p = t * 0.9 + i * 0.7;
          // Bounds change every frame, so the offscreen render target is a
          // different size each time rather than being reused.
          final rect = Rect.fromCenter(
            center: Offset(
              size.width * (0.5 + 0.30 * cos(p * 0.6)),
              size.height * (0.5 + 0.30 * sin(p * 0.5)),
            ),
            width: size.width * (0.18 + 0.30 * (0.5 + 0.5 * sin(p))),
            height: size.height * (0.12 + 0.26 * (0.5 + 0.5 * cos(p * 1.3))),
          );
    
          canvas
            ..saveLayer(rect, Paint()..color = Colors.white.withValues(alpha: 0.85))
            ..drawPicture(picture)
            ..restore();
        }
      }
    
      @override
      bool shouldRepaint(_Painter old) => old.t != t;
    }
  4. winetree94 commented on Oct 28, 2026

    @winetree94

    Another data point: the same crash on a different Adreno generation (Adreno 750), seen in a production app and reproduced with the minimal repro from #192002 (comment).

    Device / driver

    Device Lenovo Tab (TB710FU)
    Android 16, build BP2A.250605.031.A3 (ZUI 17.5)
    GPU Adreno (TM) 750
    Driver [email protected] (GIT@346fca22e2, I26e0f54d9e), dated 2025-06-03
    Driver BuildId b82ed6457570e060ce70ef441016b975
    Flutter 3.47.7 stable, framework abaf9c5237, engine d8a2d6c768 (libflutter.so BuildId 1e74ae0dd31ca24a57846714751196975444f508)

    Production crash (symbolicated)

    Release build, Impeller autoselected Vulkan. fault addr 0x1c on 1.raster. The top driver frame is the same function as in this issue (!!!0000!65bb4f16e1c4caf7a56f18c58bd23d!). Only the offset and driver build differ.

    #00 vulkan.adreno.so (!!!0000!65bb4f16e1c4caf7a56f18c58bd23d!346fca22e2!+252)
    #01 vulkan.adreno.so (!!!0000!5d51db99116934eb298ea0edb653cf!346fca22e2!+2228)
    #02 vulkan.adreno.so (!!!0000!803c04a83cada1864e63faf3eba95b!346fca22e2!+412)
    #03 vulkan.adreno.so (!!!0000!a8a5578ec7eb449d8c8076f2948068!346fca22e2!+880)
    #04 vulkan.adreno.so (qglinternal::vkCmdBeginRenderPass(...)+960)
    #05 impeller::CommandBufferVK::OnCreateRenderPass(impeller::RenderTarget)
    #06 impeller::CommandBuffer::CreateRenderPass(impeller::RenderTarget const&)       command_buffer.cc:44
    #07 impeller::ContentContext::MakeSubpass(...)                                      content_context.cc:941
    #08 impeller::(anonymous namespace)::MakeBlurSubpass(...)                           gaussian_blur_filter_contents.cc:615
    #09 impeller::GaussianBlurFilterContents::RenderFilter(...)                         gaussian_blur_filter_contents.cc:929
    #10 impeller::FilterContents::GetEntity(...)                                        filter_contents.cc:246
    #11 impeller::FilterContents::Render(...)                                           filter_contents.cc:159
    #12 impeller::Canvas::AddRenderEntityToCurrentPass(impeller::Entity&, bool)         canvas.cc:2401
    #13 impeller::Canvas::AddRenderEntityWithFiltersToCurrentPass(...)                  canvas.cc:2268
    #14 impeller::Canvas::DrawPath(flutter::DlPath const&, impeller::Paint const&)      canvas.cc:472
    #15 flutter::DisplayList::Dispatch(flutter::DlOpReceiver&, impeller::TRect<float> const&) const
    #16 impeller::DlDispatcherBase::drawDisplayList(sk_sp<flutter::DisplayList>, float)  dl_dispatcher.cc:834
    #17 flutter::DisplayList::DispatchOneOp(...)
    #18 flutter::DisplayList::Dispatch(flutter::DlOpReceiver&) const
    #19 impeller::RenderToTarget(...)                                                   dl_dispatcher.cc:1336
    #20 flutter::GPUSurfaceVulkanImpeller::AcquireFrame(...)::$_0                       gpu_surface_vulkan_impeller.cc:125
    #21 flutter::SurfaceFrame::Submit()
    #22 flutter::Rasterizer::DrawToSurfacesUnsafe(...)                                  rasterizer.cc:835
    

    So in our case it is also a MaskFilter.blur draw (DrawPath with a mask blur that misses the shadow fast path), replayed from a nested display list, that ends up in GaussianBlurFilterContents → MakeBlurSubpass → vkCmdBeginRenderPass. This matches the two ingredients identified in the repro above.

    Minimal repro results on this device

    The lib/main.dart from the comment above was built unchanged, apart from the manifest meta-data noted below.

    Build Backend Result
    --release Impeller Vulkan (autoselect) SIGSEGV after ~3 s, fault addr 0x1c, same #00 driver frame
    --profile, ImpellerBackend=vulkan Impeller Vulkan SIGSEGV after ~2 s, #00–#02 identical to the production crash
    --profile, ImpellerBackend=opengles Impeller OpenGLES no crash in 90 s
    --release, EnableImpeller=false Skia no crash in 90 s

    In one of the release runs the driver was entered through vkBeginCommandBuffer (via ContextVK::CreateCommandBuffer() from GaussianBlurFilterContents::RenderFilter / Canvas::DrawLine) instead of vkCmdBeginRenderPass. The #00 frame and fault address were the same. This matches the earlier observation that several command-buffer entry points hit the same fault.

    So this affects at least Adreno 750 (Snapdragon 8 Gen 3 class, pineapple driver package) as well as Adreno 829, across vendors (Lenovo and OnePlus). It is not limited to one OEM. The crash happens only with the Impeller Vulkan backend. In release builds, the only mitigation available to apps is the deprecated EnableImpeller=false, because ImpellerBackend is ignored under FLUTTER_RELEASE.

    I still have the device and can test patches or engine builds.

  5. winetree94 commented on Oct 28, 2026

    @winetree94

    I put the minimal repro into a standalone project so it can be cloned and built directly: https://github.com/KantoRegion/adreno-vulkan-blur-repro

    lib/main.dart is the unchanged repro from @stephen00001's comment above. The rest is a stock flutter create --empty --platforms android project. The README lists the backend results on the Adreno 750 device.

    I found one more signature while re-running it on the same Adreno 750 device. One release run aborted on 1.raster instead of segfaulting:

    signal 6 (SIGABRT)
    Abort message: 'Scudo ERROR: internal map failure (error desc=Out of memory)'
    #08 libc.so (calloc+60)
    #09-#11 vulkan.adreno.so (!!!0000!...!346fca22e2!)
    #12 vulkan.adreno.so (qglinternal::vkCreateFramebuffer(...)+236)
    #13 libflutter.so ...
    

    At that point the process had about 17.5k memory mappings, about 9.8k of them unnamed anonymous (about 5.9 GB virtual). Our production SIGSEGV tombstone (fault addr 0x1c, vkCmdBeginRenderPass) on the same device showed a similar map: about 14.6k mappings, about 7.7k of them unnamed anonymous. The process may be exhausting mappings or address space while offscreen render targets churn. If so, the 0x1c null dereference could be an allocation failure that the driver does not check. That is an inference from the tombstones and is not verified.

  6. yazd commented on Oct 31, 2026

    @yazd

    This can be reproduced on a Galaxy Z Fold6 (SM-F956B, Adreno 750, Android 16) with Flutter 3.47.7, Impeller Vulkan, profile mode. The cause appears to be in the Vulkan command pool recycling.

    Trigger: the number of render passes per frame swings by more than 16 between frames. Blur and changing layer bounds aren't needed: tiny fixed 16×16 saveLayers are enough. GLES and Skia stay flat on the same device.

    Suspected mechanism (impeller/renderer/backend/vulkan/command_pool_vk.cc):

    • Each frame takes a command pool from CommandPoolRecyclerVK. Each render pass allocates a command buffer from it.
    • After the frame, BackgroundCommandPoolVK hands the pool to the resource manager thread. If more than 16 (kUnusedCommandBufferLimit) of its buffers went unused that frame, that thread frees all of them and resets the pool with VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT.
    • On Adreno 750 a reset with that flag took about 115 ms per pool of about 225 buffers, against about 5 ms without it. At 120 Hz a pool comes back every 8.3 ms, so one release reset leaves the thread more than 10 frames behind.
    • With a swinging pass count, every swing triggers that release reset. The single resource manager thread falls behind, recycled_ is empty at frame start, and Create() makes a new pool.
    • recycled_ has no cap and pools are never destroyed, so each new pool and its buffers stay alive for good.
    • Each live command buffer holds about 330 KB of driver (kgsl) memory. Live VkDeviceMemory stays flat at about 150 MB, so this memory is behind the command buffers, not in allocations Impeller tracks.
    • Graphics memory grows until a kgsl allocation fails, then the crash in vkCmdBeginRenderPass.

    Measurements, from a Vulkan layer that counts and times calls:

    • 2 s burst of a 24-layer swing on top of 200 steady layers: pools 6 → 18, live command buffers 1206 → 3417, graphics 529 → 1258 MB. Pool resets per second fell from about 116 to 22. Nothing was released after the burst.
    • Only Adreno 750 was measured.

    Repro

    200 small saveLayers every frame, plus 100 more for half of every 500 ms. No blur, and the layer bounds never change.

    On the Fold6, built with flutter build apk --profile on 3.47.7: graphics memory (the Graphics line of adb shell dumpsys meminfo <package>) went 642 → 1840 MB in 8 s and 2658 MB at 20 s. Then a kgsl allocation failed (mmap failed errno 12) and it crashed after about 22 s with the same stack as this issue: fault addr 0x1c, qglinternal::vkCmdBeginRenderPass+960, same #00 frame. With a swing of 24 instead of 100, memory still triples in 10 s, but it didn't crash within 60 s.

    import 'package:flutter/material.dart';
    
    void main() => runApp(const Repro());
    
    class Repro extends StatefulWidget {
      const Repro({super.key});
    
      @override
      State<Repro> createState() => _ReproState();
    }
    
    class _ReproState extends State<Repro> with SingleTickerProviderStateMixin {
      late final _controller = AnimationController(vsync: this, duration: const Duration(milliseconds: 500))..repeat();
    
      @override
      void dispose() {
        _controller.dispose();
        super.dispose();
      }
    
      @override
      Widget build(BuildContext context) => CustomPaint(painter: _Layers(_controller), size: Size.infinite);
    }
    
    class _Layers extends CustomPainter {
      _Layers(this.animation) : super(repaint: animation);
    
      final Animation<double> animation;
    
      @override
      void paint(Canvas canvas, Size size) {
        // 200 layers every frame, plus 100 more for half of every 500 ms.
        final count = 200 + (animation.value < 0.5 ? 100 : 0);
        final columns = size.width ~/ 20;
        for (var k = 0; k < count; k++) {
          final origin = Offset(k % columns * 20.0, k ~/ columns * 20.0);
          // Two overlapping draws, so the layer's opacity can't be folded into them.
          canvas
            ..saveLayer(origin & const Size(16, 16), Paint()..color = const Color(0x80ffffff))
            ..drawRect(origin & const Size(12, 12), Paint()..color = const Color(0xffe0b040))
            ..drawRect(origin + const Offset(4, 4) & const Size(12, 12), Paint()..color = const Color(0xff4080e0))
            ..restore();
        }
      }
    
      @override
      bool shouldRepaint(_Layers old) => false;
    }

    This investigation and write-up were AI-assisted. The repro and all numbers above come from runs on the device.

  7. HonQii commented on Nov 11, 2026

    @HonQii

    Additional device confirmation and frequency/idle controls for @yazd's small, fixed-bounds Canvas reproduction.

    We reproduced native failures with that unmodified Dart snippet in both profile and release on a physical vivo V2436A. No application assets, images, text, blur, plugins, or explicit Flutter GPU API calls are needed. We have not established that every crash reported in this issue has the same cause.

    Environment

    • Flutter 3.47.5; framework 6a19cca56475dbfba1478ee68d7bd0c2ef891da1.
    • Engine af7e796e161ae0bb1ff0758c71a7105418bd9ded.
    • vivo V2436A, Android 16; Adreno Vulkan driver 0762.36, driver BuildId 8d2847c14ffcc7c31372d12a7a595f8e.
    • Default Impeller/Vulkan; no backend override, attached VM profiler, or Perfetto.

    Standalone reproduction

    Create a stock Android Flutter project, replace lib/main.dart with the snippet below, build and install the profile APK, then launch it normally and leave it in the foreground. Repeat separately with the release APK. No interaction is required.

    flutter create --empty --platforms=android adreno_repro
    cd adreno_repro
    # Replace lib/main.dart with the code below.
    flutter build apk --profile
    adb install -r build/app/outputs/flutter-apk/app-profile.apk
    # Launch the app from its launcher icon; capture adb logcat -b all.
    
    # Repeat separately:
    flutter build apk --release
    adb install -r build/app/outputs/flutter-apk/app-release.apk
    lib/main.dart — unchanged reproduction from @yazd's comment
    import 'package:flutter/material.dart';
    
    void main() => runApp(const Repro());
    
    class Repro extends StatefulWidget {
      const Repro({super.key});
    
      @override
      State<Repro> createState() => _ReproState();
    }
    
    class _ReproState extends State<Repro> with SingleTickerProviderStateMixin {
      late final _controller = AnimationController(vsync: this, duration: const Duration(milliseconds: 500))..repeat();
    
      @override
      void dispose() {
        _controller.dispose();
        super.dispose();
      }
    
      @override
      Widget build(BuildContext context) => CustomPaint(painter: _Layers(_controller), size: Size.infinite);
    }
    
    class _Layers extends CustomPainter {
      _Layers(this.animation) : super(repaint: animation);
    
      final Animation<double> animation;
    
      @override
      void paint(Canvas canvas, Size size) {
        // 200 layers every frame, plus 100 more for half of every 500 ms.
        final count = 200 + (animation.value < 0.5 ? 100 : 0);
        final columns = size.width ~/ 20;
        for (var k = 0; k < count; k++) {
          final origin = Offset(k % columns * 20.0, k ~/ columns * 20.0);
          // Two overlapping draws, so the layer's opacity can't be folded into them.
          canvas
            ..saveLayer(origin & const Size(16, 16), Paint()..color = const Color(0x80ffffff))
            ..drawRect(origin & const Size(12, 12), Paint()..color = const Color(0xffe0b040))
            ..drawRect(origin + const Offset(4, 4) & const Size(12, 12), Paint()..color = const Color(0xff4080e0))
            ..restore();
        }
      }
    
      @override
      bool shouldRepaint(_Layers old) => false;
    }

    The unmodified reproduction produced raster-thread native crashes in both build modes; captured tombstones reported process uptimes of 7 s (profile) and 8 s (release). Across our captures, failure signatures included:

    Scudo: Can't populate more pages for size class 65552
    Adreno-GSL: mmap failed errno 12 Out of memory
    1.raster: SIGSEGV, fault addr 0x1c, vulkan.adreno.so
    

    Driver frames include vkBeginCommandBuffer / vkCmdBeginRenderPass across captures. Another attempt ended with a Scudo internal-map-failure SIGABRT through Adreno calloc; we keep that signature separate from the SIGSEGV captures.

    Frequency controls

    The following results come from a separate instrumented profile variant, not the unchanged snippet above. It uses the same layer drawing, adds phase/paint counters, starts with a static 200-layer warm-up for 5 s, and keeps the screen on. All rows used the same APK, with a fresh process per row. Each frequency/control condition was run once, for up to 120 s of active load.

    Intervals below are between high/low changes (200 ↔ 300 layers), so a complete cycle is twice the interval. Both levels continuously request frames; these are not idle intervals.

    High/low interval Result from active-load start Sampled maximum process PSS (MiB)
    250 ms SIGSEGV after 24.9 s 1014.1
    500 ms SIGSEGV after 31.6 s 986.9
    1000 ms Completed 120 s 1066.0
    2500 ms SIGSEGV after 45.2 s 1042.6
    5000 ms SIGSEGV after 90.1 s 1039.8
    Constant 300 layers Completed 120 s 375.7

    The constant-300-layer control continuously repainted too. The 1000 ms result is a single surviving trial with high memory usage, not a safe interval. Actual paint counts differed between conditions, and Canvas layer counts are not measured GPU pass or command-pool counts.

    Short burst → genuine idle → repeat

    Using the same instrumented profile APK, we ran five rounds of:

    1. Repaint for 1 s, alternating 200/300 layers every 250 ms.
    2. Stop the ticker and paint one static 200-layer frame.
    3. Idle for 60 s with the app in front and the screen on.

    A separate control process used a constant 300-layer load during each 1 s burst, then the identical static frame and idle. Both processes completed all five rounds. The paint counter remained unchanged throughout every idle window; ImageCache stayed at 0 bytes / 0 entries.

    Baseline process PSS was 233.2 MiB for the alternating process and 234.4 MiB for the constant-load control. Values near the end of each idle window:

    Round Alternating PSS (MiB) Alternating Native Heap Alloc (MiB) Constant-load PSS (MiB) Constant-load Native Heap Alloc (MiB)
    1 365.9 166.2 360.8 167.0
    2 476.7 241.7 405.6 195.3
    3 514.1 241.9 406.3 195.3
    4 549.4 251.3 408.1 195.3
    5 535.7 223.1 409.1 195.3

    Memory observation used host-side dumpsys meminfo approximately every 4 s, phase-boundary snapshots, and periodic /proc/<pid>/maps capture. The table uses samples wholly inside idle, around 57–59 s, excluding the next burst. Fifth-round 60 s snapshots agreed. These are sampled process-memory values, not guaranteed peaks or GPU allocation totals.

    The alternating workload retained more memory, but Native Heap Alloc was not monotonic and some memory was freed. These observations alone do not prove an unbounded leak or identify command-pool recycling as the cause. We have not yet measured pool counts, pending-recycle depth, reset durations, or GPU completion progress on this device.

    Candidate patches / next evidence

    Could the engine team advise whether #194793, the submission-backpressure work in #189580, or another patch is intended to cover this reproduction? We have not tested either patch.

    In particular, would limiting pools already returned to recycled_ also prevent active-load OOM if GPU completion or recycling is falling behind? Which counters or validation-layer capture would best distinguish those cases?

    This write-up was AI-assisted; the device results above were collected from actual runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    e: device-specifice: impellerenginein triageplatform-androidteam-engine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions