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

AssertionError: Malformated json. 'stacktrace' key doesn't exist. #35

Closed
cchung100m opened this issue Jan 26, 2019 · 5 comments
Closed

Comments

@cchung100m
Copy link

Hi @viirya ,

Sorry for any inconvenience.

I am trying to run Spark in the local mode, along with the JVM profiler, however, I encounter some issue when trying to generate flamegraph of Stacktrack Profiling result. I would appreciate if you can provide some suggestions, thank you.

Best regards,

Run Spark along with the JVM profiler:
cch:target cch$ spark-submit --class com.github.ehiggs.spark.terasort.TeraSort --conf "spark.driver.extraJavaOptions=-javaagent:/Users/cch/eclipse-workspace/jvm-profiler/target/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.FileOutputReporter,ioProfiling=true,outputDir=/Users/cch/Downloads/Stacktrace.json" --conf "spark.executor.extraJavaOptions=-javaagent:/Users/cch/eclipse-workspace/jvm-profiler/target/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.FileOutputReporter,ioProfiling=true,outputDir=/Users/cch/Downloads/Stacktrace.json" /Users/cch/eclipse-workspace/spark-terasort/target/spark-terasort-1.1-SNAPSHOT-jar-with-dependencies.jar /Users/cch/Downloads/terasort_in /Users/cch/Downloads/terasort_out

Generate flamegraph of Stacktrack Profiling result:

cch:target cch$ python /Users/cch/eclipse-workspace/jvm-profiler/stackcollapse.py -i /Users/cch/Downloads/Stacktrace.json/CpuAndMemory.json > /Users/cch/Downloads/StacktraceOut/CpuAndMemory.folded
Traceback (most recent call last):
  File "/Users/cch/eclipse-workspace/jvm-profiler/stackcollapse.py", line 17, in <module>
    assert 'stacktrace' in stacktraceLog, "Malformated json. 'stacktrace' key doesn't exist."
AssertionError: Malformated json. 'stacktrace' key doesn't exist.

Stacktrace.zip

@viirya
Copy link
Contributor

viirya commented Jan 26, 2019

Thanks for the ping. I will take a look at this.

@viirya
Copy link
Contributor

viirya commented Jan 27, 2019

Hi @cchung100m Looks like you didn't set sampleInterval parameter? If this value is not set or zero, the profiler will not do stacktrace sampling. Can you set it and re-try?

@cchung100m
Copy link
Author

Hi @viirya

Thank you for the prompt reply.

I get the flame graph after setting the parameter 'sampleInterval'.

Thank you for the suggestions.

Stacktrace.svg.zip

@felixcheung
Copy link
Collaborator

felixcheung commented Jan 29, 2019

thanks! @viirya

btw, should we clarify this in documentation?

@viirya
Copy link
Contributor

viirya commented Jan 29, 2019

@felixcheung ok. I will make a small PR to add it to the document.

felixcheung added a commit that referenced this issue Jan 30, 2019
This is proposed to help address issue like #35. The document is improved to clarify flame graph generation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants