-
-
Notifications
You must be signed in to change notification settings - Fork 242
245 lines (215 loc) · 8.03 KB
/
debug.yml
File metadata and controls
245 lines (215 loc) · 8.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
name: debug
on:
push:
branches:
- debug
pull_request:
branches:
- debug
workflow_dispatch:
jobs:
build-appimage-ubuntu-22-04:
if: github.ref == 'refs/heads/debug' || github.base_ref == 'debug'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.3.*'
version: '5.15.2'
host: 'linux'
target: 'desktop'
archives: 'qttools qtsvg qtimageformats qtbase qtmultimedia icu'
- name: Build application
run: |
cd ${GITHUB_WORKSPACE}/application
qmake
make -j"$(nproc)"
- name: Build AppImage with ci/appimage/bundle.sh
run: |
sudo apt-get update
sudo apt-get install -y libfuse2
cd ${GITHUB_WORKSPACE}
sh ./ci/appimage/bundle.sh
chmod +x Dust3D-x86_64.AppImage
mv Dust3D-x86_64.AppImage dust3d-debug-built.AppImage
- name: Upload built AppImage
uses: actions/upload-artifact@v4
with:
name: dust3d-debug-built-appimage
path: dust3d-debug-built.AppImage
fedora-appimage-crash-debug:
if: github.ref == 'refs/heads/debug' || github.base_ref == 'debug'
needs: build-appimage-ubuntu-22-04
runs-on: ubuntu-latest
container:
image: fedora:43
steps:
- name: Install debug dependencies
run: |
dnf -y update
dnf -y install \
file \
fontconfig \
gdb \
glibc-langpack-en \
libX11 \
libXcursor \
libXext \
libxcb \
mesa-dri-drivers \
mesa-libGL \
mesa-vulkan-drivers \
procps-ng \
which \
xorg-x11-server-Xvfb
- name: Download built AppImage artifact
uses: actions/download-artifact@v4
with:
name: dust3d-debug-built-appimage
path: .
- name: Prepare AppImage
run: |
mv dust3d-debug-built.AppImage dust3d.AppImage
chmod +x dust3d.AppImage
sha256sum dust3d.AppImage | tee sha256sum.txt
file dust3d.AppImage | tee file.txt
- name: Extract AppImage
run: |
./dust3d.AppImage --appimage-extract
- name: Verify extracted structure
run: |
echo "=== Verifying AppImage structure ==="
if [ ! -d squashfs-root ]; then
echo "ERROR: squashfs-root directory not created"
exit 1
fi
echo "Checking critical files:"
ls -lh squashfs-root/AppRun || echo "ERROR: AppRun not found"
ls -lh squashfs-root/usr/bin/dust3d || echo "ERROR: Binary not found"
ls -lh squashfs-root/usr/lib/libfontconfig.so.1 2>/dev/null || echo "WARNING: libfontconfig.so.1 not found"
echo ""
echo "Full directory structure:"
find squashfs-root -type f -executable | sort
- name: Run debug probes
run: |
set +e
cd squashfs-root
# Verify we're in the right place
echo "=== Current directory ==="
pwd
echo "AppRun details:"
file ./AppRun
./AppRun --version 2>&1 || echo "AppRun execution attempted"
echo ""
echo "Binary details:"
file ./usr/bin/dust3d
./usr/bin/dust3d --version 2>&1 || echo "Binary execution attempted"
ulimit -c 0
export DISPLAY=:99
export XDG_RUNTIME_DIR=/tmp/runtime-root
mkdir -p "$XDG_RUNTIME_DIR"
chmod 700 "$XDG_RUNTIME_DIR"
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
XVFB_PID=$!
sleep 2
echo ""
echo "=== Test 1: Running AppRun with debug logging ==="
timeout 10s env APPIMAGE_DEBUG=1 QT_DEBUG_PLUGINS=1 LIBGL_DEBUG=verbose MESA_DEBUG=1 ./AppRun \
> ../run-apprun-debug.log 2>&1
echo $? > ../run-apprun-debug.exitcode
kill $XVFB_PID 2>/dev/null || true
sleep 1
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
XVFB_PID=$!
sleep 1
echo "=== Test 2: Running AppRun with software OpenGL ==="
timeout 10s env QT_OPENGL=software ./AppRun > ../run-apprun-software-gl.log 2>&1
echo $? > ../run-apprun-software-gl.exitcode
kill $XVFB_PID 2>/dev/null || true
sleep 1
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
XVFB_PID=$!
sleep 1
echo "=== Test 3: Running usr/bin/dust3d directly ==="
timeout 10s ./usr/bin/dust3d > ../run-binary.log 2>&1
echo $? > ../run-binary.exitcode
kill $XVFB_PID 2>/dev/null || true
sleep 1
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
XVFB_PID=$!
sleep 1
echo "=== Test 4: Running usr/bin/dust3d with software OpenGL ==="
timeout 10s env QT_OPENGL=software ./usr/bin/dust3d > ../run-binary-software-gl.log 2>&1
echo $? > ../run-binary-software-gl.exitcode
kill $XVFB_PID 2>/dev/null || true
sleep 1
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
XVFB_PID=$!
sleep 1
echo "=== Test 5: Running gdb for AppRun ==="
timeout 10s gdb -q -batch \
-ex "set pagination off" \
-ex "run" \
-ex "bt full" \
-ex "thread apply all bt full" \
-ex "info sharedlibrary" \
--args ./AppRun > ../gdb-apprun.txt 2>&1 || true
kill $XVFB_PID 2>/dev/null || true
sleep 1
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
XVFB_PID=$!
sleep 1
echo "=== Test 6: Running gdb for usr/bin/dust3d ==="
timeout 10s gdb -q -batch \
-ex "set pagination off" \
-ex "run" \
-ex "bt full" \
-ex "thread apply all bt full" \
-ex "info sharedlibrary" \
--args ./usr/bin/dust3d > ../gdb-binary.txt 2>&1 || true
kill $XVFB_PID 2>/dev/null || true
echo ""
echo "=== Exit codes summary ==="
echo "AppRun debug: $(cat ../run-apprun-debug.exitcode)"
echo "AppRun software GL: $(cat ../run-apprun-software-gl.exitcode)"
echo "Binary: $(cat ../run-binary.exitcode)"
echo "Binary software GL: $(cat ../run-binary-software-gl.exitcode)"
- name: Upload debug artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: fedora-appimage-crash-debug
path: |
sha256sum.txt
file.txt
run-apprun-debug.log
run-apprun-debug.exitcode
run-apprun-software-gl.log
run-apprun-software-gl.exitcode
run-binary.log
run-binary.exitcode
run-binary-software-gl.log
run-binary-software-gl.exitcode
gdb-apprun.txt
gdb-binary.txt
- name: Evaluate crash results
run: |
apprun_code=$(cat run-apprun-debug.exitcode)
apprun_sw_code=$(cat run-apprun-software-gl.exitcode)
binary_code=$(cat run-binary.exitcode)
binary_sw_code=$(cat run-binary-software-gl.exitcode)
echo "AppRun debug exit code: $apprun_code"
echo "AppRun software GL exit code: $apprun_sw_code"
echo "Binary exit code: $binary_code"
echo "Binary software GL exit code: $binary_sw_code"
if [ "$apprun_code" = "139" ] || [ "$apprun_sw_code" = "139" ]; then
echo "Detected AppRun segmentation fault (exit code 139)."
exit 1
fi
if [ "$binary_code" = "139" ] || [ "$binary_sw_code" = "139" ]; then
echo "Detected direct binary segmentation fault (exit code 139)."
exit 1
fi
echo "No segmentation fault detected in AppRun or direct binary path."