No Matches Found
Error: 'no stacks matching <method>'
Error: 'no stacks matching <method>'
Cause: The method name you specified with Common causes:ap-query warns you about this when it detects potential shell expansion issues.
-m doesn’t match any frames in the profile.Solution: ap-query provides fuzzy suggestions when no exact match is found:- Typo in method name (check fuzzy suggestions)
- Shell variable expansion ate
$in inner class names (e.g.,Handler$1.runbecomesHandler.run) - Method doesn’t appear in the profile (it’s not hot or was optimized away)
- Wrong event type selected (method only appears in
wall, notcpu)
Empty Profiles
Error: 'no samples (empty profile or all filtered out)'
Error: 'no samples (empty profile or all filtered out)'
Cause: The profile has no samples, or all samples were removed by filters.Common scenarios:Solution: Record for a longer duration or while the application is under load.Solution: Check recording duration with Solution: Use Solution: Remove
- Empty recording: The profiled process had no activity during recording
- Time window outside recording range:
ap-query info profile.jfr first.- Thread filter matched nothing:
ap-query threads profile.jfr to see available thread names.- All samples removed by
--no-idle:
--no-idle or investigate why application is entirely idle.Event Type Errors
Error: 'event not found (available: ...)'
Error: 'event not found (available: ...)'
Cause: You explicitly requested an event type (e.g., Solution: Use one of the available events listed in the error message, or omit Why this happens:
--event wall) that doesn’t exist in the profile.Example:--event to use the default (cpu).Check available events:- Profile was recorded with only CPU sampling:
asprof -o jfr -f profile.jfr <pid>(default is cpu only) - You requested
wallbut recording used CPU:asprof -e cpu(notwall)
Error: 'unknown event type' (collapsed text)
Error: 'unknown event type' (collapsed text)
Cause: You specified Solution: Omit
--event for a collapsed-stack text file, which has no event metadata.Example:--event when using collapsed text, or re-profile with -o jfr to capture event types.Collapsed text format doesn’t preserve event types — all samples are merged together. If you need event-specific analysis, record in JFR format.Format Detection Issues
stdin detection fails or treats binary as text
stdin detection fails or treats binary as text
Cause: ap-query auto-detects stdin format by inspecting the first 256 bytes. If the data looks binary (high bytes, control chars), it tries pprof; otherwise, it parses as collapsed text.Binary detection logic (from If pprof parsing fails on valid UTF-8 data, ap-query falls back to collapsed text (handles non-ASCII method names like For collapsed text with UTF-8 characters, ap-query will auto-detect correctly after pprof parse fails.
parse.go:stdinLooksBinary):café).Workaround for ambiguous input: Use explicit file extensions instead of stdin:Format extension not recognized
Format extension not recognized
Cause: ap-query detects format based on file extension:Solution: Rename files to use correct extensions:Or use explicit format hint via stdin with a symlink:
.jfr/.jfr.gz→ JFR.pb.gz/.pb/.pprof/.pprof.gz→ pprof- Everything else → collapsed text
Timeline Command Errors
Error: 'timeline requires a JFR file'
Error: 'timeline requires a JFR file'
Cause: You tried to use Solution: Timeline analysis requires per-sample timestamps, which only JFR format provides. Re-record using async-profiler with
timeline command on a pprof or collapsed text file.Example:-o jfr.Why pprof doesn’t work: pprof aggregates samples without timestamps. The timedEvents field is always nil for pprof profiles.Warning: '--from/--to ignored for non-JFR input'
Warning: '--from/--to ignored for non-JFR input'
Cause: You used Solution: Time-range filtering requires per-sample timestamps. Use JFR format instead.
--from or --to with a pprof or collapsed text file.Example:Large Profile Performance
Warning: 'N events collected; consider using --from/--to'
Warning: 'N events collected; consider using --from/--to'
Cause: When collecting timed events (for Solution: Narrow the time window to reduce memory usage:For non-timeline commands, this warning doesn’t appear because ap-query aggregates samples during parsing instead of storing them individually.
timeline or --from/--to), ap-query loads all samples into memory. Profiles with >10 million events trigger a performance warning.Example:Slow parsing of large JFR files
Slow parsing of large JFR files
Cause: Large JFR files (>500MB) can take several seconds to parse.Optimization tips:
- Use
--from/--toto parse only a time window (reduces memory and time) - Use
--threadto filter to specific threads early - Convert to collapsed format once and reuse:
ap-query collapse profile.jfr > profile.collapsed - Split large recordings into smaller chunks during collection:
asprof -d 30instead ofasprof -d 600
parse.go:readJFRBytes).Thread Filtering Issues
Thread filter matched nothing
Thread filter matched nothing
Cause: The Solution: Use Thread matching is substring-based and case-sensitive. Common patterns:
-t thread filter substring didn’t match any thread names.Example:threads command to see available thread names:Installation and Update Issues
Error: 'cannot self-update a dev build'
Error: 'cannot self-update a dev build'
Cause: You’re running a If built from source:To use auto-update, download a release binary from GitHub releases.
dev version (built from source via go build or go install) and tried to use ap-query update.Solution: If installed via go install:Update checksum mismatch
Update checksum mismatch
Cause: Downloaded update binary doesn’t match published SHA256 checksum.This is a security error. Do not ignore it.Solution:
- Check your network connection (proxy, MITM, DNS issues?)
- Retry the update:
ap-query update - If it persists, manually download from GitHub releases and verify checksums yourself
- Report the issue if you suspect a release integrity problem
Getting Help
If you encounter an issue not covered here:- Check command-specific help:
ap-query <command> --help - Use
infoto inspect profile metadata:ap-query info profile.jfr - Use
eventsto see available event types:ap-query events profile.jfr - Check recording command: Verify async-profiler flags (e.g.,
-e cpuvs-e wall) - Report bugs: Open an issue at github.com/jerrinot/ap-query/issues
Include the output of
ap-query version and the failing command when reporting issues.