bblanchon / pdfium-binaries

📰 Binary distribution of PDFium
789 stars 166 forks source link

Issue: pdfium-linux-arm64 dynamic library reports a FATAL error on most aarch64 CentOS and Ubuntu operating systems #148

Closed svlys closed 3 months ago

svlys commented 5 months ago

Problem Description: When running the pdfium-linux-arm64 dynamic library on most aarch64 CentOS and Ubuntu operating systems, a FATAL error occurs with the following message: [FATAL:partition_root.cc(958)] Check failed: (internal::SystemPageSize() == (size_t{1} << 12)) || (internal::SystemPageSize() == (size_t{1} << 14)).

Steps to Reproduce:

Install and configure pdfium-linux-arm64 dynamic library on an aarch64 CentOS or Ubuntu operating system. Run a program that utilizes the pdfium-linux-arm64 dynamic library. Expected Behavior: The pdfium-linux-arm64 dynamic library should run without any FATAL errors on aarch64 CentOS and Ubuntu operating systems.

Actual Behavior: The pdfium-linux-arm64 dynamic library reports a FATAL error on most aarch64 CentOS and Ubuntu operating systems with the error message: [FATAL:partition_root.cc(958)] Check failed: (internal::SystemPageSize() == (size_t{1} << 12)) || (internal::SystemPageSize() == (size_t{1} << 14)).

bblanchon commented 5 months ago

Hi @svlys,

Thank you very much for reporting this issue. This reminds me of other issues we had with the partition allocator:

We previously fixed these issues by setting use_allocator_shim = false on Linux (#128) and then macOS (#138). I wonder if we should set pdf_use_partition_alloc = false instead as we do for WASM. @kleisauke, what do you think?

I started a build Linux/ARM64 with pdf_use_partition_alloc = false: https://github.com/bblanchon/pdfium-binaries/actions/runs/7057919061 @svlys, can you download the build artifact and tell me if it works?

Best regards, Benoit

marcoffee commented 4 months ago

Hi @bblanchon

I was having this same issue on (debian) linux arm64 containers hosted at AWS (c6* and c7* instance types) Looks like somewhere between tags chromium/6015 and chromium/6029 it stopped crashing (probably because of commit 87d254d5).

Marco

mara004 commented 3 months ago

I think pypdfium2 got a related report here: https://github.com/pypdfium2-team/pypdfium2/issues/292 We also had issues with PartitionAlloc in the past: https://github.com/pypdfium2-team/pypdfium2/issues/154, https://crbug.com/pdfium/2097#c9 So +1 for setting pdf_use_partition_alloc = false

svlys commented 2 months ago

Hi @svlys,

Thank you very much for reporting this issue. This reminds me of other issues we had with the partition allocator:

We previously fixed these issues by setting use_allocator_shim = false on Linux (#128) and then macOS (#138). I wonder if we should set pdf_use_partition_alloc = false instead as we do for WASM. @kleisauke, what do you think?

I started a build Linux/ARM64 with pdf_use_partition_alloc = false: https://github.com/bblanchon/pdfium-binaries/actions/runs/7057919061 @svlys, can you download the build artifact and tell me if it works?

Best regards, Benoit

Verified to be effective, thank you very much.