Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
d4543e1
run Linux CI only
Guest0x0 Sep 1, 2026
db8c0f7
dump system information on CI
Guest0x0 Sep 1, 2026
983dac4
dump current cgroup info
Guest0x0 Sep 1, 2026
e2c4423
log `EAGAIN` in process spawning
Guest0x0 Sep 1, 2026
4a0859c
more log
Guest0x0 Sep 1, 2026
23dc985
tweak log
Guest0x0 Sep 1, 2026
adad90a
try fix: add registration ID for event bus
Guest0x0 Sep 2, 2026
1cb8897
do not block `SIGCHLD`
Guest0x0 Sep 2, 2026
06285a1
more log
Guest0x0 Sep 2, 2026
7738027
retry on `waitid` return `EAGAIN`
Guest0x0 Sep 2, 2026
1432b59
add C repro for pidfd spurious wakeup
Guest0x0 Sep 2, 2026
a15398a
more iteration
Guest0x0 Sep 2, 2026
0e44578
parallel children
Guest0x0 Sep 2, 2026
d605c15
replace timer delay with `wait_read` again
Guest0x0 Sep 2, 2026
6c1c919
instrument
Guest0x0 Sep 2, 2026
26a283b
instrument
Guest0x0 Sep 2, 2026
f9de985
more repro experiment
Guest0x0 Sep 2, 2026
d5ef4dc
fix instrument
Guest0x0 Sep 2, 2026
3eec02a
fix repro
Guest0x0 Sep 2, 2026
a636650
more repro
Guest0x0 Sep 2, 2026
5c20c49
more repro
Guest0x0 Sep 3, 2026
6016358
focused repro
Guest0x0 Sep 3, 2026
3641988
more repro
Guest0x0 Sep 3, 2026
d291d2b
try more focused test
Guest0x0 Sep 3, 2026
d59c0b5
focused test
Guest0x0 Sep 3, 2026
df4b7f4
focus
Guest0x0 Sep 3, 2026
9dde5c4
more lgo
Guest0x0 Sep 3, 2026
2deb33b
more log
Guest0x0 Sep 3, 2026
771432f
focus
Guest0x0 Sep 3, 2026
2364fee
no hard cancel
Guest0x0 Sep 3, 2026
df55d10
new repro
Guest0x0 Sep 3, 2026
968f72a
ASAN
Guest0x0 Sep 3, 2026
e350880
ASAN
Guest0x0 Sep 3, 2026
173a41e
repro: pure C
Guest0x0 Sep 3, 2026
d77bf99
O0
Guest0x0 Sep 3, 2026
ebc6d1d
delay pipe close
Guest0x0 Sep 3, 2026
33dd9ba
back to hard cancel
Guest0x0 Sep 3, 2026
d9e4d73
less log & more test
Guest0x0 Sep 3, 2026
9b16d16
shrink
Guest0x0 Sep 3, 2026
80f5890
shrink
Guest0x0 Sep 3, 2026
d961d23
variation
Guest0x0 Sep 4, 2026
9f9e0ce
variation
Guest0x0 Sep 4, 2026
8a5adbd
close gap
Guest0x0 Sep 4, 2026
66e5abf
try C repro again
Guest0x0 Sep 4, 2026
f25f969
variation
Guest0x0 Sep 4, 2026
fb82808
try C repro again
Guest0x0 Sep 4, 2026
bc11d45
shrink
Guest0x0 Sep 4, 2026
8107436
shrink
Guest0x0 Sep 4, 2026
0367ecf
shrink
Guest0x0 Sep 4, 2026
a2d663e
shrink
Guest0x0 Sep 4, 2026
d5ae316
try C repro again
Guest0x0 Sep 4, 2026
6bf37ab
signal
Guest0x0 Sep 4, 2026
3187d45
signal
Guest0x0 Sep 4, 2026
90356b9
strace
Guest0x0 Sep 4, 2026
e71e325
refine
Guest0x0 Sep 4, 2026
9fc7697
test
Guest0x0 Sep 4, 2026
c645f28
test
Guest0x0 Sep 4, 2026
cb12bee
test
Guest0x0 Sep 7, 2026
b5927bc
fix build
Guest0x0 Sep 7, 2026
46aa3a5
check
Guest0x0 Sep 7, 2026
70bbfb4
log
Guest0x0 Sep 7, 2026
8ce2293
no `set -e`
Guest0x0 Sep 7, 2026
980c3e1
no `set -e`
Guest0x0 Sep 7, 2026
9c4c51d
try fix
Guest0x0 Sep 7, 2026
014c7f9
fix
Guest0x0 Sep 7, 2026
c894bfa
fix
Guest0x0 Sep 7, 2026
c53341d
try trace `moon test`
Guest0x0 Sep 7, 2026
4604d0f
no LSAN
Guest0x0 Sep 7, 2026
0715dc7
collect
Guest0x0 Sep 7, 2026
272d5b9
update repro
Guest0x0 Sep 7, 2026
c93c3a5
cleanup strace
Guest0x0 Sep 7, 2026
66704d6
enable LSAN
Guest0x0 Sep 7, 2026
8f5d5c8
more log
Guest0x0 Sep 7, 2026
5983fc8
enable LSAN & no `set -e`
Guest0x0 Sep 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
286 changes: 42 additions & 244 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,212 +10,25 @@ env:
MOONBIT_ASYNC_CHECK_FD_LEAK: 1

jobs:
stable-build:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest","macos-latest", "windows-latest"]

runs-on: ${{ matrix.os }}
continue-on-error: false
# The test suite cold-builds a few small `moonx` tool packages on every
# fresh runner; give the full-matrix build jobs headroom for that.
timeout-minutes: 15
steps:
- name: disable auto CRLF
if: ${{ matrix.os == 'windows-latest' }}
run: git config --global core.autocrlf false

- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: '>=22.4.0'
- name: install MSVC (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: ilammy/msvc-dev-cmd@v1

- name: install (Unix)
if: ${{ matrix.os != 'windows-latest' }}
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> $GITHUB_PATH

- name: install (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser; irm https://cli.moonbitlang.com/install/powershell.ps1 | iex
"C:\Users\runneradmin\.moon\bin" | Out-File -FilePath $env:GITHUB_PATH -Append

- name: moon version
run: |
moon version --all
moonrun --version

- name: moon update
run: |
moon update

- name: moon check
run: moon check --deny-warn

- name: moon test
run: moon test

- name: moon test (release)
run: moon test --release

nightly-build:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest","macos-latest", "windows-latest"]

runs-on: ${{ matrix.os }}
continue-on-error: false
# The test suite cold-builds a few small `moonx` tool packages on every
# fresh runner; give the full-matrix build jobs headroom for that.
timeout-minutes: 15
steps:
- name: disable auto CRLF
if: ${{ matrix.os == 'windows-latest' }}
run: git config --global core.autocrlf false

- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: '>=22.4.0'

- name: install MSVC (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: ilammy/msvc-dev-cmd@v1

- name: install (Unix)
if: ${{ matrix.os != 'windows-latest' }}
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash -s nightly
echo "$HOME/.moon/bin" >> $GITHUB_PATH

- name: install (Windows)
if: ${{ matrix.os == 'windows-latest' }}
env:
MOONBIT_INSTALL_VERSION: nightly
run: |
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser; irm https://cli.moonbitlang.com/install/powershell.ps1 | iex
"C:\Users\runneradmin\.moon\bin" | Out-File -FilePath $env:GITHUB_PATH -Append

- name: moon version
run: |
moon version --all
moonrun --version

- name: moon update
run: |
moon update

- name: moon check
run: moon check

- name: moon test
run: moon test

- name: moon test (release)
run: moon test --release

js-build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

- name: install
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> $GITHUB_PATH

- name: moon version
run: |
moon version --all
moonrun --version

- name: moon check
run: |
moon check --target js --deny-warn

- name: moon test
run: |
moon test --release --target js
moon test --target js

wasm-check:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

- name: install
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> $GITHUB_PATH

- name: moon version
run: |
moon version --all
moonrun --version

- name: moon check
run: |
moon check --target wasm --deny-warn
moon check --target wasm-gc --deny-warn

moon-format:
pidfd-sigkill-line-limit-repro:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

- name: install
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> $GITHUB_PATH

- name: moon version
run: |
moon version --all
moonrun --version

- name: moon update
run: |
moon update

- name: format diff
run: |
moon fmt
git diff --exit-code

moon-info:
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 5
env:
MOONBIT_NEW_NATIVE: 0
MOONBIT_ALLOCATOR: system
steps:
- uses: actions/checkout@v4

- name: install
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
echo "$HOME/.moon/bin" >> $GITHUB_PATH

- name: moon version
run: |
moon version --all
moonrun --version

- name: moon update
- name: build repro
run: |
moon update
gcc -O0 -Wall -Wextra -fsanitize=address -pthread tools/pidfd_sigkill_line_limit_repro.c -o /tmp/pidfd_sigkill_line_limit_repro
gcc -O0 -g -fno-omit-frame-pointer -fsanitize=address -Wall -Wextra tools/pidfd_repro_cat.c -o /tmp/pidfd_repro_cat_asan

- name: moon info
- name: run repro
run: |
moon info
git diff --exit-code
for i in $(seq 1 100); do
/tmp/pidfd_sigkill_line_limit_repro 1 /tmp/pidfd_repro_cat_asan 1 20 1
done

sanitizer-check:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -246,49 +59,34 @@ jobs:
- name: setup sanitizer check
run: |
moon run --debug test_programs/setup_sanitizer_check

- name: run test with address sanitizer
run: |
export MOONBIT_ASYNC_TEST_SANITIZER_ENABLED=1
moon test

sanitizer-check-windows:
runs-on: windows-latest
timeout-minutes: 10
env:
MOONBIT_NEW_NATIVE: 0
MOONBIT_ALLOCATOR: system
steps:
- name: disable auto CRLF
run: git config --global core.autocrlf false

- uses: actions/checkout@v4
- uses: actions/setup-node@v6
gcc -O0 -g -fno-omit-frame-pointer -fsanitize=address -Wall -Wextra tools/pidfd_repro_cat.c -o /tmp/pidfd_repro_cat_asan

- name: build pidfd sequential repro
run: |
moon build examples/pidfd_sequential_repro

- name: run pidfd sequential repro with address sanitizer
run: |
mkdir -p /tmp/pidfd-moonbit-repro
repro="_build/native/debug/build/moonbitlang/async_examples/pidfd_sequential_repro/pidfd_sequential_repro.exe"
for i in $(seq 1 300); do
log="/tmp/pidfd-moonbit-repro/attempt-${i}.log"
MOONBIT_ASYNC_PIDFD_EAGAIN_FATAL=1 \
MOONBIT_ASYNC_PIDFD_TRACE=1 \
"$repro" /tmp/pidfd_repro_cat_asan > "$log" 2>&1
status=$?
set -e
if [ "$status" -ne 0 ]; then
echo "MoonBit pidfd sequential repro failed on attempt ${i} with status ${status}"
cat "$log"
exit "$status"
fi
rm -f "$log"
done

- uses: actions/upload-artifact@v4
if: failure()
with:
node-version: '>=22.4.0'

- uses: ilammy/msvc-dev-cmd@v1

- name: install
run: |
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser; irm https://cli.moonbitlang.com/install/powershell.ps1 | iex
"C:\Users\runneradmin\.moon\bin" | Out-File -FilePath $env:GITHUB_PATH -Append

- name: moon version
run: |
moon version --all
moonrun --version

- name: moon update
run: |
moon update

- name: setup sanitizer check
run: |
moon run --debug test_programs/setup_sanitizer_check

- name: run test with address sanitizer
run: |
$env:ASAN_OPTIONS='fast_unwind_on_malloc=0'
$env:MOONBIT_ASYNC_TEST_SANITIZER_ENABLED=1
moon test
name: pidfd-moonbit-repro-logs
path: /tmp/pidfd-moonbit-repro
if-no-files-found: ignore
Loading
Loading