Repository navigation
Closed
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
26.2.0
What operating system are you using?
Other Linux
Operating System Version
Arch Linux
What arch are you using?
x64
Last Known Working Electron version
25.8.0
Expected Behavior
The renderer should not crash.
Actual Behavior
An application I'm working on (which isn't open source yet) crashes on start when using Electron 26.0.0, 26.1.0 or 26.2.0.
The crash dump is always identical. The crashing thread crashed in the function electron!partition_alloc::internal::PartitionBucket::MaintainActiveList().
Here are the top 4 calls in the stack trace:
Operating system: Linux
6.4.12 -arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 24 Aug 2023 00:38:14 +0000 x86_64
CPU: amd64
family 25 model 33 stepping 0
32 CPUs
Crash reason: SIGSEGV / SEGV_PKUERR
Crash address: 0x2c0a30001048
Process uptime: 4 seconds
Thread 0 electron (crashed)
0 electron!partition_alloc::internal::PartitionBucket::MaintainActiveList() [partition_bucket.cc : 1163 + 0x0]
rax = 0x00002c0a30001040 rdx = 0x00002c0a30001040
rcx = 0x0000000000000000 rbx = 0x00005629523020b0
rsi = 0x0000000010600002 rdi = 0x00002c0a30008020
rbp = 0x00007ffcda1f5c30 rsp = 0x00007ffcda1f5c20
r8 = 0x0000000010600002 r9 = 0xf08f0100dc070000
r10 = 0x0000000000000000 r11 = 0x0000000000000001
r12 = 0x0000000000000000 r13 = 0x0000562952250008
r14 = 0x0000000000000000 r15 = 0x00005629523020b0
rip = 0x000056294dbd18c3
Found by: given as instruction pointer in context
1 electron!partition_alloc::PartitionRoot::PurgeMemory(int) [partition_root.cc : 1380 + 0x7]
rbx = 0x0000000000000003 rbp = 0x00007ffcda1f60c0
rsp = 0x00007ffcda1f5c40 r12 = 0x0000000000000000
r13 = 0x0000562952250008 r14 = 0x0000562952303488
r15 = 0x00005629523020b0 rip = 0x000056294dbd671c
Found by: call frame info
2 electron!partition_alloc::MemoryReclaimer::Reclaim(int) [memory_reclaimer.cc : 89 + 0x7]
rbx = 0x0000562952250008 rbp = 0x00007ffcda1f60f0
rsp = 0x00007ffcda1f60d0 r12 = 0x00000234002c34e0
r13 = 0x0000562952250008 r14 = 0x0000000000000003
r15 = 0x0000562952250018 rip = 0x000056294dbd01f4
Found by: call frame info
3 electron!base::allocator::(anonymous namespace)::RunMemoryReclaimer(scoped_refptr<base::SequencedTaskRunner>) [partition_alloc_support.cc : 227 + 0x7]
rbx = 0x0000023400239740 rbp = 0x00007ffcda1f6160
rsp = 0x00007ffcda1f6100 r12 = 0x0000000436d8d651
r13 = 0x0000562952250008 r14 = 0xaaaaaaaaaaaaaaaa
r15 = 0x00007ffcda1f6200 rip = 0x000056294daeb5d8
Found by: call frame info
Here are two symbolicated crash dumps for 26.0.0 and 26.2.0:
With 25.8.0, everything works fine. Let me know if there's any additional information I can provide!
Testcase Gist URL
No response
Additional Information
No response
Reacted by bfurtonmw, Sarah, Dima, Michal Pácal, Will Martin, Gergő Fándly and Hareendran MG
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fields👀 Unsorted Items
Activity
indutny-signal commentedon Sep 8, 2023
Just to add a data point: all of our internal Linux users experienced the very same crash (with the same stack trace)
deepak1556 commentedon Sep 11, 2023
Does it crash when you launch with the following flag
--disable-features=PartitionAllocBackupRefPtrdeepak1556 commentedon Sep 11, 2023
If the above does not crash, then please also check if the crash is avoided with
--enable-features=PartitionAllocBackupRefPtr:brp-mode/enabledwhich will disable the memory reclaimer feature enabled via https://chromium-review.googlesource.com/c/chromium/src/+/4597058.ayumi-signal commentedon Sep 11, 2023
@deepak1556 Thank you for the suggestion of flags to try. I tried to launch electron using
--disable-features=PartitionAllocBackupRefPtrand separately with--enable-features=PartitionAllocBackupRefPtr:brp-mode/enabledand in both cases electron crashes with the same error and location. The traces look the same as the trace from running without any flags. This is on Debian 12.deepak1556 commentedon Sep 12, 2023
@ayumi-signal to clarify, is the above crash from your application or from a sample electron app ? If it is from your application, add the feature flag to this callsite https://github.com/signalapp/Signal-Desktop/blob/4d2910d696fc22fd74dd36c3fa3749fb855e184a/app/main.ts#L1677
ayumi-signal commentedon Sep 12, 2023
@deepak1556 Ah thank you for the tip on how to use the feature flag correctly! However, after following the steps I'm still getting the same crash and stacktrace in
electron!partition_alloc::internal::PartitionBucket::MaintainActiveList().To confirm the flag was passed to electron I used
ps auxand observed electron was running with--disable-features=HardwareMediaKeyHandling,PartitionAllocBackupRefPtr,SpareRendererForSitePerProcess.Regarding the other flag
--enable-features=PartitionAllocBackupRefPtr:brp-mode/enabledI wasn't sure how to use it. When addingapp.commandLine.appendSwitch('enable-features', 'PartitionAllocBackupRefPtr:brp-mode/enabled')the switch seems to be discarded as observed withps aux. (But using just'enable-features', 'PartitionAllocBackupRefPtrworks correctly.)deepak1556 commentedon Sep 12, 2023
Thanks for confirming, I wanted to confirm if the BRP feature that was enabled by default on Linux https://chromium-review.googlesource.com/c/chromium/src/+/4478673 between 114 and 116 was related to the regression. But now that I look at the brp enabled process, it is only set to kBrowserProcess on Linux and given the crash is in renderer per the issue title the feature would be unrelated.
You can ignore this flag, it only affects the memory reclaimer code path associated with the BRP feature. The crash you are seeing is from https://source.chromium.org/chromium/chromium/src/+/refs/tags/116.0.5845.188:base/allocator/partition_alloc_support.cc;l=1429-1430
I would recommend the following as next steps:
partition_alloc::PartitionRoot::PurgeMemory. So first step would be to identify the root among https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/wtf/allocator/partitions.h;l=116-118 which can give clue to the application code that triggers the crash.fix(linux): downgrade electron to avoid renderer crashes
indutny-signal commentedon Sep 14, 2023
I did a small foray into it and found out that Debug build just crashes outside of partition allocator 😂 I can reproduce the crash consistently on Fedora Linux, but if I delete everything from our preload - it doesn't seem to happen.
I suspect that it could be our Neon rust addons that cause the trouble. Will look more into it today!
bfurtonmw commentedon Sep 14, 2023
Adding a datapoint: our users are only running into this crash on shared Linux environments (i.e. multiple users, no root access). I also tested on a Debian 11 VM (VMWare Fusion on iMac host, macOS Ventura), and did not experience the crash. In the past, we've had to implement workarounds (
--no-sandbox) on these kind of shared Debian machines due tosetuidrestrictions.23 remaining items
deepak1556 commentedon Sep 28, 2023
You can add the following to the fiddle before
app.whenReadyand minidump should be available at the path specified. If you want to change paths, update it beforecrashReporter.startYes you can also attach this.
threema-danilo commentedon Sep 28, 2023
Huh, I cannot reproduce the issue with the dcheck build. It reliably crashes with the regular 26.2.2 though.
Here's the minidump for 26.2.2: 62b76819-9ebe-4f4c-9d33-b9486dc5f45e.dmp.zip
Symbolicated backtrace:
My system information (in case it's useful):
deepak1556 commentedon Sep 29, 2023
@threema-danilo can you test with the following debug build as well, this is from our CI with latest 26-x-y. The build I created had enable_pkeys disabled which avoids creating a partition allocator pool used for V8 CFI. I had it disabled to investigate another crash but now I am curious if that also had impact on this bug or is it just debug builds generally avoid the crash.
downgrade to v25.8.4 to avoid renderer crash
deepak1556 commentedon Oct 3, 2023
Friendly ping, if anyone else is able to reliably repro the issue please test the fiddle https://gist.github.com/8c61fa47716d73db04ad61fe0201c69e with following two debug builds and post the results. It would help move this issue forward, thanks!
Debug build with threaded allocator disabled
Debug build
indutny-signal commentedon Oct 3, 2023
Sorry for the delay. I'll give it a go tomorrow!
indutny-signal commentedon Oct 3, 2023
@deepak1556 the debug build with threaded allocator disabled doesn't crash, and the second debug build link has expired or otherwise unavailable!
deepak1556 commentedon Oct 4, 2023
Sorry about the expired link, I have now republished the CI build here
Downgrades Electron to 25.9.0 to fix renderer crash issue: electron/e…
indutny-signal commentedon Oct 10, 2023
@deepak1556 sorry, I only got around to it now. The build in your last comment crashes for me. Here's the stack trace: https://gist.github.com/indutny-signal/7bfdbc44dfd8fdad9513facee33cb5f5
threema-danilo commentedon Oct 12, 2023
Sorry, I was travelling for 2 weeks.
I just tested with the fiddle at https://gist.github.com/8c61fa47716d73db04ad61fe0201c69e. Just like @indutny-signal reported:
andrewheadricke commentedon Oct 12, 2023
No longer an issue with the recently released 27.0.0
deepak1556 commentedon Oct 17, 2023
Thanks @indutny-signal and @threema-danilo for the test results, they are helpful. I have pinged Chromium channel with the data gathered so far. I will update here once there are some next steps.
deepak1556 commentedon Nov 28, 2023
Addressed in #40377, fix available with >= 26.4.3