Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Electron segmentation fault on CentOS7 aarch64(arm64) #25387

Closed
3 tasks done
itas109 opened this issue Sep 9, 2020 · 20 comments
Closed
3 tasks done

[Bug]: Electron segmentation fault on CentOS7 aarch64(arm64) #25387

itas109 opened this issue Sep 9, 2020 · 20 comments
Labels
7-1-x 10-x-y blocked/need-info ❌ Cannot proceed without more information blocked/upstream ❌ Blocked on upstream; e.g. Chromium or Node bug 🪲 chromium crash 💥

Comments

@itas109
Copy link

itas109 commented Sep 9, 2020

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 an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 7.1.4
    • 10.1.1
  • Operating System:
    • centos 7.6 aarch64

Expected Behavior

Electron running normal

Actual Behavior

Electron failing with segmentation fault.

To Reproduce

wget https://github.com/electron/electron/releases/download/v10.1.1/electron-v10.1.1-linux-arm64.zip
unzip electron-v10.1.1-linux-arm64.zip
./electron
segmentation fault
@itas109
Copy link
Author

itas109 commented Sep 9, 2020

I think it is linux kernel's PAGESIZE problem.
PAGESIZE = 64k on cetos 7 aarch64 (redhat 7)
but,
PAGESIZE = 4K on other linux(such debian aarch64)
PAGESIZE = 4K on centos 7 x86_64

$ getconf PAGESIZE
65535

i think two way can resolve it :

  • recompile centos 7 aarch64 linux kernel, change PAGESIZE 64K to PAGESIZE 4K
  • recomplire electron on centos 7 aarch64 with PAGESIZE 64K

@bigben0123
Copy link
Contributor

bigben0123 commented Mar 19, 2021

In build/config/compiler

    if (current_cpu == "arm64") {
      # Reduce the page size from 65536 in order to reduce binary size slightly
      # by shrinking the alignment gap between segments. This also causes all
      # segments to be mapped adjacently, which breakpad relies on.
      ldflags += [ "-Wl,-z,**max-page-size=4096**" ]
      print(ldflags)
    }

Changing max page size from 4096 to 65536, fixed my issue.

@nornagon
Copy link
Member

nornagon commented Apr 1, 2021

Can you attach a crash dump? A core dump will do.

@abnerlee
Copy link

abnerlee commented Jul 19, 2021

seems same error on 13.1.7, relates #21395

@zachberger
Copy link

Same issue on Asahi linux which uses 16K pages

@jesse-savary
Copy link

Also running into this w/ CentOS 8: Output of uname -a:
Linux [redacted] 5.4.17-2136.302.7.2.1.el8uek.aarch64 #2 SMP Tue Jan 18 12:11:39 PST 2022 aarch64 aarch64 aarch64 GNU/Linux.

codebytere pushed a commit that referenced this issue May 31, 2022
* chore: backport a704c3a from chromium

Refs https://chromium-review.googlesource.com/c/chromium/src/+/3545665
Fixes #25387

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
@flotwig
Copy link
Contributor

flotwig commented Jul 15, 2022

This still seems to be an issue on CentOS 8 / RHEL 8 / Oracle Linux Server 8.6, with Electron 18.3.0, and the latest stable (19.0.0), and the latest beta (v20.0.0-beta.8).

Cypress users are affected by this as they try to use the linux-arm64 builds to test inside of A1 Ampere, more info: cypress-io/cypress#22820

@deepak1556 do you have any additional context on this issue? I see #34385 refs this

@Lemmingh
Copy link

Lemmingh commented Jul 23, 2022

It's said that:

Distributions, like CentOS, RedHat, or Oracle Linux, set the default page size to 64k 1 2

However, Chromium seems to show no interest in 64 Ki page size in the foreseeable future:

The rare 64kb case is still not supported due to further changes needed to SlotSpanMetadata. 3

SlotSpanMetadata is required to be 32 bits, however, with 64 KiB pages it requires ~34 bits. 4

Footnotes

  1. https://dev.to/aws-heroes/postgresql-on-arm-default-page-size-matters-2n7a

  2. https://access.redhat.com/discussions/5966451#comment-2295711

  3. https://chromium-review.googlesource.com/c/chromium/src/+/3545665

  4. https://chromium-review.googlesource.com/c/chromium/src/+/3545740

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Oct 31, 2022
@zebrapurring
Copy link

Bump

@nornagon nornagon added the blocked/need-info ❌ Cannot proceed without more information label Oct 31, 2022
@github-actions github-actions bot removed the stale label Nov 1, 2022
@ZhengXL1988
Copy link

Bump

@ZhengXL1988
Copy link

ZhengXL1988 commented Nov 4, 2022

same error, I tried to compile, but failed。Has anyone compiled the electron on arm64 with PAGESIZE=64K,give me a compiled copy,tks

@Yueming-Y
Copy link

I also encountered a problem. On the arrch service version, there is a segment error. What is the solution,thank you

@dsanders11 dsanders11 added chromium blocked/upstream ❌ Blocked on upstream; e.g. Chromium or Node labels Apr 2, 2023
@dsanders11 dsanders11 changed the title Electron segmentation fault on CentOS7 aarch64(arm64) [Bug]: Electron segmentation fault on CentOS7 aarch64(arm64) Apr 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 2, 2023

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Jul 2, 2023
@zebrapurring
Copy link

Bump

@github-actions github-actions bot removed the stale label Jul 3, 2023
@Z-eddy
Copy link

Z-eddy commented Sep 15, 2023

Bump,the same error

@codebytere
Copy link
Member

Per #25387 (comment) - this isn't something Chromium currently supports correctly. Should they do so, we can revisit this, but i'm closing this out for now.

@codebytere codebytere closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2023
@chenamy2017
Copy link

Bump,the same error.
Has anyone compiled the electron on arm64 with PAGESIZE=64K ? How to compile.

@itas109
Copy link
Author

itas109 commented Mar 13, 2024

Bump,the same error. Has anyone compiled the electron on arm64 with PAGESIZE=64K ? How to compile.

email to itas109#qq.com

@Rtoax
Copy link

Rtoax commented Apr 10, 2024

I think it is linux kernel's PAGESIZE problem. PAGESIZE = 64k on cetos 7 aarch64 (redhat 7) but, PAGESIZE = 4K on other linux(such debian aarch64) PAGESIZE = 4K on centos 7 x86_64

$ getconf PAGESIZE
65535

i think two way can resolve it :

  • recompile centos 7 aarch64 linux kernel, change PAGESIZE 64K to PAGESIZE 4K
  • recomplire electron on centos 7 aarch64 with PAGESIZE 64K

I got SIGTRAP dump when compiled chromium on Linux+ARM64 with 4kiB PAGESIZE, and run chromium on Linux+ARM64 with 64kiB PAGESIZE. If i compile chromium on Linux+ARM64 with 64kiB PAGESIZE, it'll not success, and i don't know way, have you ever meet this before?

[headless_shell:16128/41761] ACTION //net/data/ssl/chrome_roo...:gen_root_store_inc(//build/toolchain/linux/unbundle:default)
FAILED: gen/net/data/ssl/chrome_root_store/chrome-root-store-inc.cc gen/net/data/ssl/chrome_root_store/chrome-ev-roots-inc.cc 
/usr/bin/python3 ../../build/gn_run_binary.py root_store_tool --root-store=../../net/data/ssl/chrome_root_store/root_store.textproto --certs=../../net/data/ssl/chrome_root_store/root_store.certs --write-cpp-root-store=gen/net/data/ssl/chrome_root_store/chrome-root-store-inc.cc --write-cpp-ev-roots=gen/net/data/ssl/chrome_root_store/chrome-ev-roots-inc.cc
root_store_tool failed with exit code -5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7-1-x 10-x-y blocked/need-info ❌ Cannot proceed without more information blocked/upstream ❌ Blocked on upstream; e.g. Chromium or Node bug 🪲 chromium crash 💥
Projects
None yet
Development

No branches or pull requests