Repository navigation
malloc: error for object 0x3: pointer being freed was not allocated #77404
Copy link
Copy link
Closed
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressionc: contributor-productivityTeam-specific productivity, code health, technical debt.Team-specific productivity, code health, technical debt.c: crashStack traces logged to the consoleStack traces logged to the consolec: flakeTests that sometimes, but not always, incorrectly passTests that sometimes, but not always, incorrectly passengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.
Description
backdrop_filter_perf_ios__timeline_summary flaked on unrelated PR 7e02cc3
[backdrop_filter_perf_ios__timeline_summary] [STDOUT] stdout: [+2234 ms] Runner(923,0x16d98b000) malloc: *** error for object 0x3: pointer being freed was not allocated
[backdrop_filter_perf_ios__timeline_summary] [STDOUT] stdout: [ ] Runner(923,0x16d98b000) malloc: *** set a breakpoint in malloc_error_break to debug
[backdrop_filter_perf_ios__timeline_summary] [STDOUT] stdout: [ +62 ms] Process 923 stopped
[backdrop_filter_perf_ios__timeline_summary] [STDOUT] stdout: [ ] * thread #10, name = 'io.flutter.1.ui', stop reason = signal SIGABRT
[backdrop_filter_perf_ios__timeline_summary] [STDOUT] stdout: [ ] frame #0: 0x00000001b3c6c84c libsystem_kernel.dylib`__pthread_kill + 8
[backdrop_filter_perf_ios__timeline_summary] [STDOUT] stdout: [ ] libsystem_kernel.dylib`__pthread_kill:
[backdrop_filter_perf_ios__timeline_summary] [STDOUT] stdout: [ ] -> 0x1b3c6c84c <+8>: b.lo 0x1b3c6c868 ; <+36>
[backdrop_filter_perf_ios__timeline_summary] [STDOUT] stdout: [ ] 0x1b3c6c850 <+12>: stp x29, x30, [sp, #-0x10]!
[backdrop_filter_perf_ios__timeline_summary] [STDOUT] stdout: [ ] 0x1b3c6c854 <+16>: mov x29, sp
[backdrop_filter_perf_ios__timeline_summary] [STDOUT] stdout: [ ] 0x1b3c6c858 <+20>: bl 0x1b3c49f5c ; cerror_nocancel
[backdrop_filter_perf_ios__timeline_summary] [STDOUT] stdout: [ ] Target 0: (Runner) stopped.
[backdrop_filter_perf_ios__timeline_summary] [STDOUT] stdout: [ ] ios-deploy exited with code 0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressionc: contributor-productivityTeam-specific productivity, code health, technical debt.Team-specific productivity, code health, technical debt.c: crashStack traces logged to the consoleStack traces logged to the consolec: flakeTests that sometimes, but not always, incorrectly passTests that sometimes, but not always, incorrectly passengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.
Activity
[-]malloc: *** error for object 0x3: pointer being freed was not allocated[/-][+]malloc: error for object 0x3: pointer being freed was not allocated[/+]zanderso commentedon Mar 8, 2021
Also on flutter_gallery_ios__transition_perf:
https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20flutter_gallery_ios__transition_perf/134/overview
kf6gpe commentedon Mar 8, 2021
/cc @kf6gpe
chinmaygarde commentedon Mar 8, 2021
@jmagman: Right now, errors like this are hard to trace because they have no backtrace. However, setting the appropriate environment variables (specifically
MallocStackLogging) before running running the application should give us more detailed information. Can we enable this for our perf tests please?As an aside, we should enable the same for engine unit-tests and also enable asan instrumented builds.
jmagman commentedon Mar 8, 2021
I don't know how adding the
Mallocenv variables would impact the benchmark numbers. This one is https://github.com/flutter/flutter/tree/master/dev/benchmarks/macrobenchmarks/ios. Feel free to edit anything that would be useful for the engine team to triage.chinmaygarde commentedon Mar 8, 2021
Negatively, and significantly so.
It is probably not viable to enable this for the benchmarks. But it could be useful in de-flaking. Right now, there is very little information to work with.
zanderso commentedon Mar 8, 2021
If the malloc flags will be too big a hit to enable by default, then this will have to be repro'd locally with the flags. This sort of flake makes me nervous esp. when we aren't getting a backtrace to help localize it, so I am going to bump this to P2, and work on finding an owner. The priority can be dropped once we know where this is coming from, if appropriate.
iskakaushik commentedon Mar 9, 2021
I was able to get a stack trace for this:
iskakaushik commentedon Mar 9, 2021
More complete back-trace:
For all threads: https://gist.github.com/iskakaushik/16dac01b01ec6395fb7cb3d5837ba232
zanderso commentedon Mar 11, 2021
Copying over from a chat thread: @iskakaushik will attempt an ASAN run, and the Skia fix here https://skia-review.googlesource.com/c/skia/+/381222 could be related.
iskakaushik commentedon Mar 16, 2021
I'm closing this to continue discussion and debugging efforts at: #78076 given that this is a P1 and this is a P2.
github-actions commentedon Aug 4, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.