Closed edhemphill closed 4 months ago
Also of note, I can't seem to work around it by handing Parse()
a context.WithTimeout
- still hangs
Risor eating CPU during the hang, looks like 1 core:
77913 risor 87.8 00:20.03 13/1 0 34 28M 0B 0B 77913 41995 running *0[1]
I tried --cpu-profile
but since I have to interrupt via signal, it's producing a zero byte file.
OK fix --cpu-profile to write on SIGINT - here is the profile. parser_hang.zip
Thank you @edhemphill. With all this info it shouldn’t be hard to track down and fix.
I whittled it down to this minimal case:
{ data: { blocks: [ { type: "divider" },
}
}
Will work on the fix this weekend.
The following incorrect risor code seems to hang the parser.
Note the lack of closing
]
forblocks
Pardon the commented out stuff - left it in for context.
I found this while working on code using risor embedded, but it does hang on the CLI also.
MacOS 14.3 / go version go1.22.0 darwin/arm64
Here is a stack trace dumped via a kill SIGQUIT on
risor
compiling it: