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

Invalid JSON produced by the profiler #1713

Closed
langston-barrett opened this issue Oct 21, 2020 · 2 comments · Fixed by #1715
Closed

Invalid JSON produced by the profiler #1713

langston-barrett opened this issue Oct 21, 2020 · 2 comments · Fixed by #1715
Labels
bug - identified Bugs with an identified cause

Comments

@langston-barrett
Copy link
Contributor

langston-barrett commented Oct 21, 2020

Here's a JSON file that the profiler produced: prof.json.zip. jq says it's invalid JSON:

cat prof.json | jq
parse error: Invalid escape at line 81229, column 93

souffle-profile doesn't seem to like it, either:

souffle-profile prof.json 
exception whilst reading profile DB: Parse error: invalid escape character '.' (46)
souffle-profile: ./include/souffle/utility/MiscUtil.h:195: void souffle::fatal(const char*, const Args& ...) [with Args = {const char*}]: Assertion `false && "fatal error; see std err"' failed.
Aborted (core dumped)
souffle --version
Souffle: 2.0.2(32bit Domains)
Copyright (c) 2016-19 The Souffle Developers.
Copyright (c) 2013-16 Oracle and/or its affiliates.

I can try to produce a MWE if necessary, just thought I'd post early in case the error is obvious from inspection.

@mmcgr
Copy link
Member

mmcgr commented Oct 21, 2020

I think the initial rule contains an escaped .. That makes sense in the original string as a regex, but our simplistic escaping fails to produce valid json.

@b-scholz b-scholz added the bug - identified Bugs with an identified cause label Oct 22, 2020
@langston-barrett
Copy link
Contributor Author

Thanks for taking a look @mmcgr!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - identified Bugs with an identified cause
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants