|
164 | 164 | - cat "${XFAIL_LIST}" profiling/tests/php-language-xfail.list > /tmp/profiler-php-language-xfail.list |
165 | 165 | - "if php -r 'exit(PHP_VERSION_ID < 80400 ? 0 : 1);'; then cat profiling/tests/php-language-xfail-pre84.list >> /tmp/profiler-php-language-xfail.list; fi" |
166 | 166 | - export XFAIL_LIST=/tmp/profiler-php-language-xfail.list |
167 | | - - ulimit -c unlimited |
168 | | - - .gitlab/run_php_language_tests.sh |
| 167 | + - | |
| 168 | + ulimit -c unlimited |
| 169 | + output="${CI_PROJECT_DIR}/artifacts/php-language-tests" |
| 170 | + mkdir -p "${output}" |
| 171 | + { |
| 172 | + echo "core_limit=$(ulimit -c)" |
| 173 | + echo "core_pattern=$(cat /proc/sys/kernel/core_pattern)" |
| 174 | + echo "core_uses_pid=$(cat /proc/sys/kernel/core_uses_pid)" |
| 175 | + if [ -w /usr/local/src/php ]; then echo "core_directory_writable=yes"; else echo "core_directory_writable=no"; fi |
| 176 | + df -h /usr/local/src/php |
| 177 | + } | tee "${output}/core-dump-settings.txt" |
| 178 | + .gitlab/run_php_language_tests.sh |
169 | 179 | after_script: |
170 | 180 | - | |
171 | | - core=/usr/local/src/php/core |
172 | | - if [ -f "${core}" ]; then |
173 | | - output="${CI_PROJECT_DIR}/artifacts/php-language-tests" |
174 | | - mkdir -p "${output}" |
| 181 | + output="${CI_PROJECT_DIR}/artifacts/php-language-tests" |
| 182 | + mkdir -p "${output}" |
| 183 | + .gitlab/collect_artifacts.sh /usr/local/src/php |
| 184 | + core=$(find "${CI_PROJECT_DIR}/artifacts/core_dumps" -type f -name 'core*' -print -quit) |
| 185 | + if [ -n "${core}" ]; then |
175 | 186 | gdb --batch \ |
176 | 187 | -ex "set pagination off" \ |
177 | 188 | -ex "info threads" \ |
178 | 189 | -ex "thread apply all bt full" \ |
179 | 190 | -ex "thread apply all info registers" \ |
180 | 191 | -ex "info sharedlibrary" \ |
181 | 192 | /usr/local/bin/php "${core}" > "${output}/gdb-backtrace.txt" 2>&1 || true |
182 | | - mv "${core}" "${output}/core" |
| 193 | + else |
| 194 | + echo "No ELF core dump found under /usr/local/src/php" | tee -a "${output}/core-dump-settings.txt" |
183 | 195 | fi |
184 | 196 | artifacts: |
185 | 197 | when: on_failure |
186 | 198 | paths: |
187 | | - - artifacts/php-language-tests/ |
| 199 | + - artifacts/ |
0 commit comments