-
Notifications
You must be signed in to change notification settings - Fork 23
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
Panic from Rust code when parsing possibly bad input #26
Comments
Thank you for raising this issue. If you could figure out some way to provide the HTML that causes the panic, that would be ideal and would allow me to get at the root cause. I do understand, though, that the panic is not making it easy to figure out where things are messing up. Would you be able to do something like log the url of each page right before you attempt to parse a page, and then check which url is last logged before the application dies? I also appreciate you bringing the issue of panics not providing any good debug info to my attention because that is not very user-friendly at all. |
I've got a few stack traces now but I'm not sure it helps much:
Regarding the URLs, then yeah, I'll probably have to do that. The output volume is going to be pretty extreme, but I'll see if I can catch a repro that way. |
That might be enough info for me to fix the problem. It's gonna be interesting to test without data to reproduce the error, though, so if you can figure out a way to get the HTML causing the problem it would be great. |
I've just deployed with additional debugging. I'll update here when I find a smoking gun. :) Thanks for your attention to this, by the way. |
I have a repro now, it's this URL: http://hcasouthatlantic.com/careers/search.dot?jobId=26573-137096&src=CWS-10230 Ironically that seems to be down right now. At least for me. But I've uploaded the HTML that causes issues here: https://pastebin.com/w6hkqLtB I got a more detailed stack as well:
|
Okay, I have a solution (see the reference above), and I've both reproduced the error and confirmed that the proposed fix works. I'll see if I can figure out a good test to add to the library and get that fix out shortly. |
That's perfect. Thank you so much. :) |
Problem should be fixed as of Thank you again for reporting and for providing the data I needed to test. |
I am closing this issue, but if your problem is not resolved please re-open. |
Embarrassingly I don't have a repro or much information on what happens. But I get this message on stderr right before the entire application is shut down:
This error happens in an application that parses thousands of pages from the same site as a streaming operation. It takes down the entire application when this happens. Ideally this parser issue would be returned as an error tuple or something to that effect so I could either discard them or log the issue somewhere.
Any pointers on how I may capture more information when this sort of crash happens would be greatly appreciated. I don't have much experience working with NIFs or Rust for that matter.
PS: I have since set the RUST_BACKTRACE variable and I will update this issue if I capture more output from crashed applications.
The text was updated successfully, but these errors were encountered: