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

Potential deadlock in PCRE cache #9032

Open
tstarling opened this issue Mar 12, 2022 · 1 comment
Open

Potential deadlock in PCRE cache #9032

tstarling opened this issue Mar 12, 2022 · 1 comment

Comments

@tstarling
Copy link
Contributor

In 2014 I improved HHVM's PCRE compilation cache, introducing a new thread-safe container to hold cache entries. I also published the container class as a separate library. Another user of the library reported a deadlock issue, and it appears that it may also affect HHVM. If an application uses many different regexes and traffic is heavy, HHVM may globally deadlock. I'm not an HHVM user anymore, but out of courtesy I am forwarding the issue. The deadlock issue is discussed at tstarling/thread-safe-lru#5 and the proposed fix is tstarling/thread-safe-lru#6 .

@lexidor
Copy link
Collaborator

lexidor commented Sep 24, 2023

Adding probably easy. The fix presented in starling/thread-safe-lru#6 is a one liner (releasing a lock). This could be easily integrated into hhvm. The patch is licensed under Apache2. This is a simple copy paste fix.

I am not sure this reproduces in the context of hhvm.

I feel bad for the fact that your gesture went unanswered for 1½ years. The fact that you support a patch you made to hhvm a decade ago after leaving hhvm behind is truly commendable.

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

No branches or pull requests

2 participants