Skip to content

Commit 55fe9ac

Browse files
committed
executorch: drop the gdb diagnostic, run the smoke test with faulthandler
The gdb run (cp312 only, RelWithDebInfo) never produced a backtrace: the job sat in the cibuildwheel step for 2h40m and then lost its runner, so no log was ever uploaded. Its test command also exits 1 on both branches, so it could never pass. Restore the real cp312/cp313/cp314 release build. The failure it was chasing is unchanged and deterministic on every leg: the wheel builds and repairs fine, then the smoke test aborts with Error in cpuinfo: failed to parse file /sys/devices/system/cpu/cpu0/topology/core_id: "-1" is not an unsigned number Fatal error in cpuinfo: cpuinfo_get_uarch called before cpuinfo is initialized This runner's kernel reports core_id -1 (gotcha 14), cpuinfo's riscv64 Linux init gives up, and something in the wheel calls cpuinfo_get_uarch() without checking that cpuinfo_initialize() succeeded. Run the smoke test under -X faulthandler so the SIGABRT at least dumps the Python frame that triggers it, which pins down the native caller to patch.
1 parent d7e44f0 commit 55fe9ac

1 file changed

Lines changed: 2 additions & 30 deletions

File tree

‎.github/workflows/build-executorch.yml‎

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ jobs:
5252
# cp310/cp311 are dropped: torch and pytorch-tokenizers (both hard runtime
5353
# deps) have no riscv64 wheel for either on pypi.riseproject.dev. cp314t
5454
# is dropped too: upstream itself ships no free-threaded wheel.
55-
# TEMP: restricted to cp312 only while diagnosing the cpuinfo abort
56-
# under gdb (gotcha 115) - restore ["cp312", "cp313", "cp314"] once done.
57-
python: ["cp312"]
55+
python: ["cp312", "cp313", "cp314"]
5856
name: Build executorch ${{ matrix.version }} ${{ matrix.python }}-manylinux_riscv64
5957
runs-on: ubuntu-24.04-riscv
6058
timeout-minutes: 720
@@ -185,17 +183,9 @@ jobs:
185183
pip install "cmake>=3.24,<4.0.0" "packaging>=24.2" pyyaml
186184
"setuptools>=77.0.3" wheel zstd certifi &&
187185
pip install --only-binary=:all: "torch==2.13.0"
188-
# TEMP diagnostic (gotcha 115): keep debug symbols so gdb's backtrace
189-
# resolves symbols instead of bare addresses. setup.py's get_build_type()
190-
# only offers Debug/Release via $DEBUG, but appends $CMAKE_ARGS after its
191-
# own -DCMAKE_BUILD_TYPE flag, so CMAKE_ARGS wins (RelWithDebInfo matches
192-
# this repo's own precedent in build-tesserocr.yml, and keeps optimizations
193-
# on so the crash still reproduces the same way as the real release build).
194186
CIBW_ENVIRONMENT: >-
195187
CMAKE_BUILD_PARALLEL_LEVEL=8
196188
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
197-
CFLAGS=-g CXXFLAGS=-g
198-
CMAKE_ARGS=-DCMAKE_BUILD_TYPE=RelWithDebInfo
199189
# The torch wheel already carries these and loads them RTLD_GLOBAL (gotcha 17).
200190
CIBW_REPAIR_WHEEL_COMMAND: >-
201191
auditwheel repair -w {dest_dir} {wheel}
@@ -212,25 +202,7 @@ jobs:
212202
# a newer torch than the extension was actually compiled against.
213203
CIBW_TEST_REQUIRES: torch==2.13.0
214204
CIBW_TEST_SOURCES: riscv64_smoke_test.py
215-
# TEMP diagnostic (gotcha 115): gdb works on the real riscv64 runner
216-
# (not under QEMU). The abort is 100% deterministic across all 3
217-
# python legs already observed, so a single gdb run is enough - no
218-
# retry loop needed. Fail the step either way so the log is easy to
219-
# spot: once with the backtrace if the abort reproduces, once with a
220-
# clear "did not reproduce" message otherwise.
221-
CIBW_BEFORE_TEST_LINUX: dnf -y install gdb
222-
CIBW_TEST_COMMAND: >-
223-
gdb -batch -ex run -ex "thread apply all bt 25" --args python riscv64_smoke_test.py
224-
> /tmp/gdb-backtrace.log 2>&1;
225-
gdb_status=$?;
226-
cat /tmp/gdb-backtrace.log;
227-
echo "gdb exit status: $gdb_status";
228-
if grep -qE "SIGABRT|Aborted" /tmp/gdb-backtrace.log;
229-
then echo "=== crash reproduced under gdb (backtrace above) ===";
230-
exit 1;
231-
else echo "=== SIGABRT/Aborted NOT found - crash did not reproduce under gdb ===";
232-
exit 1;
233-
fi
205+
CIBW_TEST_COMMAND: python -X faulthandler riscv64_smoke_test.py
234206

235207
- name: Check the extensions and the vendored licences made it into the wheel
236208
run: |

0 commit comments

Comments
 (0)