Skip to content

Provide chmod command for -XX:OnOutOfMemoryError from shell script#17054

Merged
abhishekrb19 merged 5 commits intoapache:masterfrom
abhishekrb19:chmod_script
Sep 13, 2024
Merged

Provide chmod command for -XX:OnOutOfMemoryError from shell script#17054
abhishekrb19 merged 5 commits intoapache:masterfrom
abhishekrb19:chmod_script

Conversation

@abhishekrb19
Copy link
Copy Markdown
Contributor

@abhishekrb19 abhishekrb19 commented Sep 12, 2024

A command line arg -XX:OnOutOfMemoryError='chmod 644 ${project.parent.basedir}/target/*.hprof' was added to collect heap dumps: #17029

This arg is causing problems when running tests from Intellij. Intellij doesn't seem to likechmod 644, but this command works as expected in mvn. So as a workaround, add the chmod 644 ${BASE_DIR/target/*.hprof' command in a shell script that can then be executed when OnOutOfMemoryError happens to make Intellij happy.

Verified that I'm able to run tests on Intellij successfully on reimporting pom.xml with this change.

A bug in Intellij that doesn't parse the chmod command line correctly.
…level.

Fixes the following error:
/home/runner/work/druid/druid/dev/chmod-heap-dumps.sh: line 19: ${project.parent.basedir}/target/*.hprof: bad substitution
@abhishekrb19 abhishekrb19 merged commit 668169d into apache:master Sep 13, 2024
@abhishekrb19 abhishekrb19 deleted the chmod_script branch September 13, 2024 04:17
pranavbhole pushed a commit to pranavbhole/druid that referenced this pull request Sep 17, 2024
apache#17054)

A command line arg -XX:OnOutOfMemoryError='chmod 644 ${project.parent.basedir}/target/*.hprof' was added to collect heap dumps: apache#17029

This arg is causing problems when running tests from Intellij. Intellij doesn't seem to likechmod 644, but this command works as expected in mvn. So as a workaround, add the chmod 644 ${BASE_DIR/target/*.hprof' command in a shell script that can then be executed when OnOutOfMemoryError happens to make Intellij happy.
@adarshsanjeev adarshsanjeev added this to the 32.0.0 milestone Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants