Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new core dump tool for OSX #6014

Merged
merged 1 commit into from
Jul 14, 2021
Merged

Conversation

mikezhang1234567890
Copy link
Contributor

Dumping core using the signal requires an the task-get-allow
entitlement, which prevents notarization. Thus we dump the core
with a user space tool which does not require an entitlement.

Signed-off-by: Mike Zhang [email protected]

Resolves #5813

fyi @keithc-ca

@dusanboskovic
Copy link

FYI @manqingl

@manqingl
Copy link

@klangman @JamesKingdon : FYI

@mikezhang1234567890
Copy link
Contributor Author

On one of the Open9 DDR tests, the utility creates a vastly inflated core file (100GB+) running the following command:

java   -Xmx4m -Xaot:forceaot,count=0 -Xshareclasses:name=shareddbgext -cp /Users/jenkins/workspace/Grinder/openjdk-tests/TKG/../../jvmtest/functional/cmdLineTests/utils/utils.jar -Xdump:system:file=j9core.dmp,events=vmstop org.openj9.test.ivj.Hanoi 2

Looking into the issue now.

@mikezhang1234567890
Copy link
Contributor Author

Fixed the issue with core file size inflation. This PR is ready for review.

port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
@mikezhang1234567890
Copy link
Contributor Author

Updated the PR, can you take another look please @keithc-ca

port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
@mikezhang1234567890
Copy link
Contributor Author

@keithc-ca I've updated the PR, can you take another look please?

port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Show resolved Hide resolved
port/osx/omrosdump.c Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Show resolved Hide resolved
port/osx/omrosdump.c Show resolved Hide resolved
@mikezhang1234567890
Copy link
Contributor Author

@keithc-ca Updated the PR again.

port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Outdated Show resolved Hide resolved
port/osx/omrosdump.c Show resolved Hide resolved
Copy link
Member

@keithc-ca keithc-ca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be squashed: one commit is sufficient for one new file.

Please create an issue to address removal of memory allocations (that will fail in low memory scenarios).

@mikezhang1234567890
Copy link
Contributor Author

Squashed commits into one.

Dumping core using the signal requires an the task-get-allow
entitlement, which prevents notarization. Thus we dump the core
with a user space tool which does not require an entitlement.

Signed-off-by: Mike Zhang <[email protected]>
@fjeremic
Copy link
Contributor

Jenkins build all

@fjeremic fjeremic merged commit 821f4a5 into eclipse:master Jul 14, 2021
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.

Implement core dumps for notarized applications on macOS
5 participants