@@ -14,10 +14,48 @@ jobs:
14
14
image : vsaglib/vsag:ci-x86
15
15
volumes :
16
16
- /opt:/useless
17
+ options : |
18
+ --privileged
17
19
concurrency :
18
20
group : asan_build_x86-${{ github.event.pull_request.number }}
19
21
cancel-in-progress : ${{ github.event_name == 'pull_request' }}
20
22
steps :
23
+ - name : Prepare CoreDump Env
24
+ run : |
25
+ mkdir -p /tmp/core_file/
26
+ mkdir -p /var/lib/systemd/coredump/
27
+ chown root:root /var/lib/systemd/coredump/
28
+ chmod 755 /var/lib/systemd/coredump/
29
+ apt install systemd-coredump -y
30
+ cd /tmp/core_file
31
+ ulimit -c unlimited
32
+ cat /proc/sys/kernel/core_pattern
33
+ echo "/tmp/core_file/" > /proc/sys/kernel/core_pattern
34
+ cat << 'EOF' > segfault.c
35
+ #include <signal.h>
36
+ #include <unistd.h>
37
+
38
+ int main() {
39
+ raise(SIGSEGV);
40
+ return 0;
41
+ }
42
+ EOF
43
+
44
+ gcc -o segfault segfault.c
45
+ ./segfault || true
46
+ ls -lh
47
+ ls -l /var/lib/systemd/coredump/
48
+ coredumpctl list
49
+ dmesg
50
+
51
+ - name : Find Core File
52
+ if : always()
53
+ run : |
54
+ cd /tmp/core_file
55
+ ls -lh
56
+ mkdir -p /var/lib/systemd/coredump/
57
+ cd /var/lib/systemd/coredump/
58
+ ls -lh
21
59
- name : Free Disk Space
22
60
run : rm -rf /useless/hostedtoolcache
23
61
- uses : actions/checkout@v4
@@ -90,6 +128,11 @@ jobs:
90
128
with :
91
129
name : test_x86-${{ github.run_id }}
92
130
path : ./build/
131
+ - name : Prepare CoreDump Env
132
+ run : |
133
+ mkdir -p /tmp/core_file/
134
+ ulimit -c unlimited
135
+ cat /proc/sys/kernel/core_pattern
93
136
- name : Do Asan Test In ${{ matrix.test_type }}
94
137
run : |
95
138
echo leak:libomp.so > omp.supp
@@ -104,6 +147,22 @@ jobs:
104
147
compression-level : 1
105
148
retention-days : 1
106
149
overwrite : ' true'
150
+ - name : Find Core File
151
+ if : always()
152
+ run : |
153
+ corefile_path=`find . -name "core.*"`
154
+ echo $corefile_path
155
+ mv corefile_path /tmp/core_file/
156
+ mkdir -p /var/lib/systemd/coredump/
157
+ find /var/lib/systemd/coredump/ -name "core.*"
158
+ - name : Upload Core File
159
+ uses : actions/upload-artifact@v4
160
+ with :
161
+ path : /tmp/core_file/core*, ./build/test/${{ matrix.test_type }}
162
+ name : corefile-x86-${{ matrix.test_type }}-${{ github.run_id }}
163
+ compression-level : 1
164
+ retention-days : 1
165
+ overwrite : ' true'
107
166
108
167
test_asan_aarch64 :
109
168
name : Test Aarch64
0 commit comments