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

HyperScan ScratchInUseError #179

Open
sentry-io bot opened this issue May 3, 2024 · 5 comments
Open

HyperScan ScratchInUseError #179

sentry-io bot opened this issue May 3, 2024 · 5 comments

Comments

@sentry-io
Copy link

sentry-io bot commented May 3, 2024

This one has occurred once so far:

Sentry Issue: COURTLISTENER-75S

ScratchInUseError: error code -10
(4 additional frame(s) were not displayed)
...
  File "cl/search/views.py", line 544, in show_results
    render_dict.update(do_search(request.GET.copy()))
  File "cl/search/views.py", line 222, in do_search
    query_citation = get_query_citation(cd)
  File "cl/lib/search_utils.py", line 102, in get_query_citation
    citations = get_citations(cd["q"], tokenizer=HYPERSCAN_TOKENIZER)

Filed by: @albertisfu

@mlissner
Copy link
Member

mlissner commented May 3, 2024

Yikes, no results on Google:

image

@ERosendo
Copy link
Contributor

While debugging a separate issue related to hyperscan, I stumbled upon a docstring that explains this error:

/**
 * The scratch region was already in use.
 *
 * This error is returned when Hyperscan is able to detect that the scratch
 * region given is already in use by another Hyperscan API call.
 *
 * A separate scratch region, allocated with @ref hs_alloc_scratch() or @ref
 * hs_clone_scratch(), is required for every concurrent caller of the Hyperscan
 * API.
 *
 * For example, this error might be returned when @ref hs_scan() has been
 * called inside a callback delivered by a currently-executing @ref hs_scan()
 * call using the same scratch region.
 *
 * Note: Not all concurrent uses of scratch regions may be detected. This error
 * is intended as a best-effort debugging tool, not a guarantee.
 */
#define HS_SCRATCH_IN_USE       (-10)

Here's the description of a scratch-space from the dev-reference page:

@mlissner
Copy link
Member

Huh, weird. I guess this means we can do a retry as our best hope? I'm not sure how we're accessing the scratch region from multiple threads?

Copy link
Author

sentry-io bot commented Jun 19, 2024

Related:

Sentry Issue: COURTLISTENER-774

Filed by: @albertisfu

Copy link
Author

sentry-io bot commented Aug 22, 2024

This issue seems to be affecting the front-end now too, since we're now using eyecite while parsing queries:

Sentry Issue: COURTLISTENER-80Y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants