Skip to content

Conversation

kinke
Copy link
Member

@kinke kinke commented Jun 6, 2025

No description provided.

@kinke
Copy link
Member Author

kinke commented Jun 6, 2025

Argh, GitHub runner limitations:

Run actions/checkout@v4
Error: JavaScript Actions in Alpine containers are only supported on x64 Linux runners. Detected Linux Arm64

@kinke kinke force-pushed the gha_alpine_aarch64 branch from 04f2927 to d5a099f Compare June 6, 2025 11:17
@kinke
Copy link
Member Author

kinke commented Jun 6, 2025

A few failures, looking like exception backtraces are incomplete with optimized code (although the frame pointers are kept).

@calvin2021y
Copy link

I am not sure this related, maybe try with apk add libunwind-dev

@kinke kinke force-pushed the gha_alpine_aarch64 branch from d5a099f to 60eec9c Compare October 3, 2025 14:51
@kinke
Copy link
Member Author

kinke commented Oct 3, 2025

I am not sure this related, maybe try with apk add libunwind-dev

Thx, but that gives:

$ apk add libunwind-dev
ERROR: unable to select packages:
  libunwind-dev-1.8.1-r0:
    breaks: llvm-libunwind-19.1.4-r1[!libunwind-dev]
    satisfies: world[libunwind-dev]

@kinke kinke force-pushed the gha_alpine_aarch64 branch from 3010816 to b71717d Compare October 3, 2025 16:47
@calvin2021y
Copy link

calvin2021y commented Oct 5, 2025

I finally build the static binary and run the test:

ldc/tests/codegen/exception_stack_trace.d can be fix with printf("%.*s\n", cast(int) s.length, s.ptr);

@calvin2021y
Copy link

calvin2021y commented Oct 5, 2025

Thx, but that gives:

$ apk add libunwind-dev
ERROR: unable to select packages:
  libunwind-dev-1.8.1-r0:
    breaks: llvm-libunwind-19.1.4-r1[!libunwind-dev]
    satisfies: world[libunwind-dev]

not sure how to fix this, but I guess maybe libunwind-dev not needed.

I checked my own static build of ldc2, and the official Alpine x86_64 release (v1.41.0) also lacks the --link-internally.

I guess lacks the --link-internally cause by lld20-dev can not be static linked.

@calvin2021y
Copy link

calvin2021y commented Oct 5, 2025

ln -sf /usr/lib/llvm20/lib/LLVMgold.so /usr/lib/LLVMgold.so fix the LLVMgold.so. 2 tests error remain

1884: runlit.py: /opt/ldc_build/tests/lit.site.cfg:56: warning: Setting a timeout per test not supported: Requires the Python psutil module but it could not be found. Try installing it via pip or via your operating system's package manager.
1884: LLD 20.1.8
1884: Lit version:  20.1.0dev
1884: -- Testing: 380 tests, 8 workers --
1884: FAIL: LDC :: codegen/exception_stack_trace.d (1 of 380)
1884: ******************** TEST 'LDC :: codegen/exception_stack_trace.d' FAILED ********************
1884: Exit Code: 1
1884: 
1884: Command Output (stdout):
1884: --
1884: # RUN: at line 1
1884: /opt/ldc_build/bin/ldc2 -g /opt/projects/ldc/tests/codegen/exception_stack_trace.d -of=/opt/ldc_build/tests/codegen/Output/exception_stack_trace.d.tmp
1884: # executed command: /opt/ldc_build/bin/ldc2 -g /opt/projects/ldc/tests/codegen/exception_stack_trace.d -of=/opt/ldc_build/tests/codegen/Output/exception_stack_trace.d.tmp
1884: # RUN: at line 2
1884: /opt/ldc_build/tests/codegen/Output/exception_stack_trace.d.tmp | FileCheck /opt/projects/ldc/tests/codegen/exception_stack_trace.d
1884: # executed command: /opt/ldc_build/tests/codegen/Output/exception_stack_trace.d.tmp
1884: # executed command: FileCheck /opt/projects/ldc/tests/codegen/exception_stack_trace.d
1884: # .---command stderr------------
1884: # | /opt/projects/ldc/tests/codegen/exception_stack_trace.d:37:11: error: CHECK: expected string not found in input
1884: # | // CHECK: exception_stack_trace{{.*$}}
1884: # |           ^
1884: # | <stdin>:2:17: note: scanning from here
1884: # | ----------------
1884: # |                 ^
1884: # | 
1884: # | Input file: <stdin>
1884: # | Check file: /opt/projects/ldc/tests/codegen/exception_stack_trace.d
1884: # | 
1884: # | -dump-input=help explains the following input dump.
1884: # | 
1884: # | Input was:
1884: # | <<<<<<
1884: # |           1: object.Exception@/opt/projects/ldc/tests/codegen/exception_stack_trace.d(6): lala 
1884: # |           2: ---------------- 
1884: # | check:37                     X error: no match found
1884: # | >>>>>>
1884: # `-----------------------------
1884: # error: command failed with exit status: 1
1884: 
1884: --
1884: 
1884: ********************
1884: FAIL: LDC :: sanitizers/fuzz_basic.d (2 of 380)
1884: ******************** TEST 'LDC :: sanitizers/fuzz_basic.d' FAILED ********************
1884: Exit Code: 1
1884: 
1884: Command Output (stdout):
1884: --
1884: # RUN: at line 6
1884: /opt/ldc_build/bin/ldc2 -g -fsanitize=fuzzer /opt/projects/ldc/tests/sanitizers/fuzz_basic.d -of=/opt/ldc_build/tests/sanitizers/Output/fuzz_basic.d.tmp
1884: # executed command: /opt/ldc_build/bin/ldc2 -g -fsanitize=fuzzer /opt/projects/ldc/tests/sanitizers/fuzz_basic.d -of=/opt/ldc_build/tests/sanitizers/Output/fuzz_basic.d.tmp
1884: # RUN: at line 7
1884: not /opt/ldc_build/tests/sanitizers/Output/fuzz_basic.d.tmp 2> /opt/ldc_build/tests/sanitizers/Output/fuzz_basic.d.tmp.out
1884: # executed command: not /opt/ldc_build/tests/sanitizers/Output/fuzz_basic.d.tmp
1884: # .---command stdout------------
1884: # | dwarfeh(399) fatal error
1884: # `-----------------------------
1884: # RUN: at line 8
1884: FileCheck /opt/projects/ldc/tests/sanitizers/fuzz_basic.d < /opt/ldc_build/tests/sanitizers/Output/fuzz_basic.d.tmp.out
1884: # executed command: FileCheck /opt/projects/ldc/tests/sanitizers/fuzz_basic.d
1884: # .---command stderr------------
1884: # | /opt/projects/ldc/tests/sanitizers/fuzz_basic.d:14:11: error: CHECK: expected string not found in input
1884: # | // CHECK: fuzz_basic.d([[@LINE+1]]): Assertion failure
1884: # |           ^
1884: # | <stdin>:1:1: note: scanning from here
1884: # | WARNING: Failed to find function "__sanitizer_acquire_crash_state".
1884: # | ^
1884: # | <stdin>:1:1: note: with "@LINE+1" equal to "15"
1884: # | WARNING: Failed to find function "__sanitizer_acquire_crash_state".
1884: # | ^
1884: # | <stdin>:16:21: note: possible intended match here
1884: # | ==18344== ERROR: libFuzzer: deadly signal
1884: # |                     ^
1884: # | 
1884: # | Input file: <stdin>
1884: # | Check file: /opt/projects/ldc/tests/sanitizers/fuzz_basic.d
1884: # | 
1884: # | -dump-input=help explains the following input dump.
1884: # | 
1884: # | Input was:
1884: # | <<<<<<
1884: # |             1: WARNING: Failed to find function "__sanitizer_acquire_crash_state". 
1884: # | check:14'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
1884: # | check:14'1                                                                          with "@LINE+1" equal to "15"
1884: # |             2: WARNING: Failed to find function "__sanitizer_print_stack_trace". 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |             3: WARNING: Failed to find function "__sanitizer_set_death_callback". 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |             4: INFO: Running with entropic power schedule (0xFF, 100). 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |             5: INFO: Seed: 4053972532 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~
1884: # |             6: INFO: Loaded 1 modules (13 inline 8-bit counters): 13 [0xaaaad469b408, 0xaaaad469b415),  
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |             .
1884: # |             .
1884: # |             .
1884: # |            11: #6 NEW cov: 8 ft: 8 corp: 2/5b lim: 4 exec/s: 0 rss: 27Mb L: 4/4 MS: 4 ChangeByte-ChangeBit-CopyPart-CopyPart- 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |            12: #34 REDUCE cov: 8 ft: 8 corp: 2/4b lim: 4 exec/s: 0 rss: 27Mb L: 3/3 MS: 3 ShuffleBytes-CopyPart-EraseBytes- 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |            13: #401 REDUCE cov: 9 ft: 9 corp: 3/8b lim: 6 exec/s: 0 rss: 27Mb L: 4/4 MS: 2 InsertByte-CMP- DE: "F\000\000\000"- 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |            14: #445 REDUCE cov: 9 ft: 9 corp: 3/7b lim: 6 exec/s: 0 rss: 27Mb L: 3/3 MS: 4 CopyPart-ChangeByte-EraseBytes-CrossOver- 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |            15: #5766 REDUCE cov: 10 ft: 10 corp: 4/10b lim: 58 exec/s: 0 rss: 27Mb L: 3/3 MS: 1 CMP- DE: "U\000"- 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |            16: ==18344== ERROR: libFuzzer: deadly signal 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # | check:14'2                         ?                      possible intended match
1884: # |            17: NOTE: libFuzzer has rudimentary signal handlers. 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |            18:  Combine libFuzzer with AddressSanitizer or similar for better crash reports. 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |            19: SUMMARY: libFuzzer: deadly signal 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |            20: MS: 3 PersAutoDict-InsertByte-ChangeBinInt- DE: "U\000"-; base unit: a752bc62cd5e46579fc55a6b2c161ffe70cc20c1 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |            21: 0x46,0x55,0x5a,0x0,0x0,0x6, 
1884: # | check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1884: # |             .
1884: # |             .
1884: # |             .
1884: # | >>>>>>
1884: # `-----------------------------
1884: # error: command failed with exit status: 1
1884: 
1884: --
1884: 
1884: ********************


1884: 
1884: 1 warning(s) in tests
1884: ********************
1884: Failed Tests (2):
1884:   LDC :: codegen/exception_stack_trace.d
1884:   LDC :: sanitizers/fuzz_basic.d
1884: 
1884: 
1884: Testing Time: 12.05s
1884: 
1884: Total Discovered Tests: 380
1884:   Unsupported      :  48 (12.63%)
1884:   Passed           : 328 (86.32%)
1884:   Expectedly Failed:   2 (0.53%)
1884:   Failed           :   2 (0.53%)
1/1 Test #1884: lit-tests ........................***Failed   12.13 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =  12.16 sec

@calvin2021y
Copy link

calvin2021y commented Oct 5, 2025

I guess __sanitizer_acquire_crash_state test error cause by there is no libclang_rt.asan.a for alpine aarch64 until llvm22.

so maybe we need disable sanitizer for alpine aarch64 until we support llvm22 ?

@calvin2021y
Copy link

calvin2021y commented Oct 5, 2025

after disable lsan;asan;msan;fuzzer for TEST_COMPILER_RT_LIBRARIES, only 1 errortests/codegen/exception_stack_trace.d left for test-lit.

try apk add libunwind-static and apk add llvm-libunwind-static still failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants