Skip to content

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

Closed as not planned

Description

@itas109

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

Activity

  1. itas109 commented on Sep 9, 2020

    @itas109
    Author

    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
  2. bigben0123 commented on Mar 19, 2021

    @bigben0123
    Contributor

    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.

  3. nornagon commented on Apr 1, 2021

    @nornagon
    Contributor

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

  4. abnerlee commented on Jul 19, 2021

    @abnerlee

    seems same error on 13.1.7, relates #21395

  5. zachberger commented on Mar 20, 2022

    @zachberger

    Same issue on Asahi linux which uses 16K pages

  6. jesse-savary commented on Apr 2, 2022

    @jesse-savary

    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.

  7. flotwig commented on Jul 15, 2022

    @flotwig
    Contributor

    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

  8. Lemmingh commented on Jul 23, 2022

    @Lemmingh

    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 ↩

  9. github-actions commented on Oct 31, 2022

    @github-actions
    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!

  10. 7 remaining items

  11. added
    blocked/upstream ❌
    on Apr 2, 2023
  12. changed the title [-]Electron segmentation fault on CentOS7 aarch64(arm64)[/-] [+][Bug]: Electron segmentation fault on CentOS7 aarch64(arm64)[/+] on Apr 2, 2023
  13. github-actions commented on Jul 2, 2023

    @github-actions
    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!

  14. zebrapurring commented on Jul 2, 2023

    @zebrapurring

    Bump

  15. Z-eddy commented on Sep 15, 2023

    @Z-eddy

    Bump,the same error

  16. codebytere commented on Oct 10, 2023

    @codebytere
    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.

  17. chenamy2017 commented on Mar 13, 2024

    @chenamy2017

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

  18. itas109 commented on Mar 13, 2024

    @itas109
    Author

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

    email to itas109#qq.com

  19. Rtoax commented on Apr 10, 2024

    @Rtoax

    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
    
  20. liuhann commented on Jun 18, 2024

    @liuhann

    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.

    Hi do you have a compiled version of electron, Thanks for your share

  21. liuhann commented on Jul 3, 2024

    @liuhann

    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.

    Hi do you have a compiled version of electron, Thanks for your share

    Simple change compile scripts does not work. I had find there are quite a lot of code with 4096 hard code on it . but the code are not belong to electron, mybe chrominum

    I had changed some of the code, and got a binary, it can simply run by with error when running https pages or call importCertificate

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

    10-x-y7-1-xblocked/need-info ❌blocked/upstream ❌bug 🪲chromiumcrash 💥

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions