envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy

Home Page:https://www.envoyproxy.io

Repository from Github https://github.comenvoyproxy/envoyRepository from Github https://github.comenvoyproxy/envoy

[redis_proxy] New UNWATCH command causes unexpected behavior on release build only

dbarbosapn opened this issue · comments

When running UNWATCH on release build, it returns QUEUED instead of OK. If we initiate a transaction after that (with MULTI) and end it (with EXEC) we get a SEGFAULT and envoy crashes.

Preliminary investigation suggests that due to release compiler optimizations, memory ordering happens differently, causing class initialization to happen unexpectedly, and transaction.active_ to be true on filter initialization (when it shouldn't!)

Wondering if there's some CI improvements that could be made to run tests against a release/optimized build?
Wdyt @wbpcode, @mattklein123 ?

Wondering if there's some CI improvements that could be made to run tests against a release/optimized build?
Wdyt @wbpcode, @mattklein123 ?

Unless something has changed we do run tests on release/optimized builds, so I would imagine this a bug that is showing up with your specific compiler version or environment.

Wondering if there's some CI improvements that could be made to run tests against a release/optimized build?
Wdyt @wbpcode, @mattklein123 ?

Unless something has changed we do run tests on release/optimized builds, so I would imagine this a bug that is showing up with your specific compiler version or environment.

Then it's really a mystery, because we took the build from CI 😄 This one https://github.com/envoyproxy/envoy/actions/runs/12383502998

And the build from the linked PR doesn't reproduce the issue somehow 😕

Closing the issue as not able to reproduce with latest binaries. Will reopen if we notice this again 😃