You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2022/06/02 19:28:42 UTC
[pulsar] branch master updated: [Tests] Collect heap dumps when OutOfMemoryError happens in unit tests (#15909)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 4f715af0002 [Tests] Collect heap dumps when OutOfMemoryError happens in unit tests (#15909)
4f715af0002 is described below
commit 4f715af000263a34a7c98812bde3bf92adf3269c
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Thu Jun 2 22:28:34 2022 +0300
[Tests] Collect heap dumps when OutOfMemoryError happens in unit tests (#15909)
---
.github/workflows/pulsar-ci.yaml | 9 +++++++++
pom.xml | 3 ++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pulsar-ci.yaml b/.github/workflows/pulsar-ci.yaml
index 7fd807a3b99..3437d4f3700 100644
--- a/.github/workflows/pulsar-ci.yaml
+++ b/.github/workflows/pulsar-ci.yaml
@@ -244,6 +244,15 @@ jobs:
path: surefire-reports
retention-days: 7
+ - name: Upload possible heap dump
+ uses: actions/upload-artifact@v3
+ if: ${{ always() && needs.changed_files_job.outputs.docs_only != 'true' }}
+ with:
+ name: Unit-${{ matrix.group }}-heapdump
+ path: /tmp/*.hprof
+ retention-days: 7
+ if-no-files-found: ignore
+
- name: Wait for ssh connection when build fails
# ssh access is enabled for builds in own forks
uses: ./.github/actions/ssh-access
diff --git a/pom.xml b/pom.xml
index eff7442d9cb..837648798cc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -104,6 +104,7 @@ flexible messaging model and an intuitive client API.</description>
<testRealAWS>false</testRealAWS>
<testRetryCount>1</testRetryCount>
<testJacocoAgentArgument></testJacocoAgentArgument>
+ <testHeapDumpPath>/tmp</testHeapDumpPath>
<docker.organization>apachepulsar</docker.organization>
<skipSourceReleaseAssembly>false</skipSourceReleaseAssembly>
<skipBuildDistribution>false</skipBuildDistribution>
@@ -1420,7 +1421,7 @@ flexible messaging model and an intuitive client API.</description>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${testJacocoAgentArgument} -XX:+ExitOnOutOfMemoryError -Xmx1G -XX:+UseG1GC
+ <argLine>${testJacocoAgentArgument} -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${testHeapDumpPath} -XX:+ExitOnOutOfMemoryError -Xmx1G -XX:+UseG1GC
-Dpulsar.allocator.pooled=true
-Dpulsar.allocator.leak_detection=Advanced
-Dpulsar.allocator.exit_on_oom=false