mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
memcpy spinning #315
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @splitice on GitHub (Apr 14, 2020).
Today on a production service we saw near 100% cpu usage. Some quick debugging with GDB and ltrace revealed brotli spinning in a 0 byte memcpy.
gdb revealed this to be Brotli:
We are still troubleshooting this. However I thought I would ask if anyone has encountered something similar, or if there is any common traps that we could fall into that could cause this behavior?
Revision:
c435f06675@eustas commented on GitHub (Apr 14, 2020):
Hello.
Zero length
memcpyis obviously not good, going to fix it ASAP. But the problem seems to be caused by the wrapping code - ngx_brunzip module.And, likely, it was fixed just recently:
93c3f71a1d@splitice commented on GitHub (Apr 14, 2020):
@eustas First thank you for your response. Yes I think that this is an issue in the wrapping code. I'm testing currently to be sure. It looks like it's a case of zlib assumptions not holding true with brotli. I'm hoping that's is all it is.
I figure brotli may need more space in the output buffer so while remaining length may not be 0 it may be insufficient for brotli output.
I'll close this if it is the case. However better handling though in brotli would be much appreciated by integrators I'm sure :)