Skip to content

Commit

Permalink
[Java] Enable core dumps on Linux and MacOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyazelenko committed Jan 16, 2025
1 parent 50ffcd7 commit ac3e701
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci-low-cadence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,23 @@ jobs:
with:
distribution: 'zulu'
java-version: ${{ env.JAVA_VERSION }}
- name: Enable core dumps (Linux)
if: runner.os == 'Linux'
run: |
ulimit -c unlimited
sudo systemctl stop apport.service
sudo systemctl disable apport.service
sudo mkdir /var/coredump
sudo chmod a+rw /var/coredump
sudo sysctl -w kernel.core_pattern="/var/coredump/core_%e.%p"
- name: Enable core dumps (MacOS)
if: runner.os == 'macOS'
run: |
ulimit -c unlimited
sudo mkdir /var/coredump
sudo chmod a+rw /var/coredump
sudo sysctl -w kern.coredump=1
sudo sysctl -w kern.corefile="/var/coredump/core.%P"
- name: Build and Run Slow Tests with Gradle
run: ./gradlew slowTest
env:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@ jobs:
Resize-Partition -DiskNumber 1 -PartitionNumber 1 -Size ($new_size)
New-Partition -DiskNumber 1 -Size 30MB -DriveLetter T | Format-Volume -FileSystem NTFS -Confirm:$false
mkdir T:/tmp_aeron_dir
- name: Enable core dumps (Linux)
if: runner.os == 'Linux'
run: |
ulimit -c unlimited
sudo systemctl stop apport.service
sudo systemctl disable apport.service
sudo mkdir /var/coredump
sudo chmod a+rw /var/coredump
sudo sysctl -w kernel.core_pattern="/var/coredump/core_%e.%p"
- name: Enable core dumps (MacOS)
if: runner.os == 'macOS'
run: |
ulimit -c unlimited
sudo mkdir /var/coredump
sudo chmod a+rw /var/coredump
sudo sysctl -w kern.coredump=1
sudo sysctl -w kern.corefile="/var/coredump/core.%P"
- name: Build with Gradle
run: ./gradlew -x javadoc --console=plain
- name: Remove small temp file system (Linux)
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -1371,6 +1371,7 @@ tasks.register('copyTestLogs', Copy) {
include '**/build/test-output/**'
include '**/*.hprof'
include '**/*.mdmp'
include '/var/coredump/core*'
include '**/*.log'
include '**/*.tlog'
include '**/build/reports/tests/**'
Expand Down

0 comments on commit ac3e701

Please sign in to comment.