-
Notifications
You must be signed in to change notification settings - Fork 955
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
ProxySQL segfaults when configured with servers outside the hosts network on alpine linux #715
Comments
Hi Ryan, |
Our intention in using proxysql is as a companion to select the current master for writes, for our environment in which MHA manages the replication topology. In this use case, monitoring is definitely a requirement to manage the replication groups. Current workaround is to not use proxysql and configure apps to direct connect to the database. In the event of a topology change, we would manually update application configs. You make a good point about monitoring though. I checked to see if proxysql can connect to servers in non-local subnets at all, and I was able to update hostgroup IDs manually to select servers in two other subnets and get query results back, so this is likely scoped to monitoring. |
Sounds like disabling monitoring is really not an option. Thanks, |
@ryanschwartz : is it possible to have a core dump? |
@ryanschwartz , I revisited the code and I can't find any bug. And in fact, I believe 3ad6c2d won't solve the issue. |
Attaching a couple core dumps. This does not appear to be an issue in non-alpine distributions, and I concur - 3ad6c2d does not resolve the crash. Here's the Dockerfile I'm using to build my test container - we have a script that performs the same build steps in our other application containers.
|
@renecannao - can I provide any further information on this? We're in a holding pattern on deploying proxysql until we can use it in our alpine containers. |
@ryanschwartz - please try 1.2.5-715 branch . |
@ryanschwartz : I think I finally narrowed this issue, and managed to reproduce it also without Alpine Linux. |
1.2.5-715 would not build for me in alpine. Make fails here:
My updated Dockerfile is:
|
Indeed,
Instead of:
sed -i -e '/PROXYSQL_VERSION/s:1.2.4:1.2.5-715:g' include/proxysql.h
|
Thanks for catching that So far, 1.2.5-715 looks good, no segfaults. Thank you very much. 🎉 I will see how things go for the next few days and report back if anything pops up. |
Thank you! |
Fixed long time ago |
We run apps in alpine containers on Google Container Engine, which is essentially a hosted kubernetes infrastructure. We run would like to run proxysql inside these containers as a database proxy layer.
I've run into a problem where proxysql will run for ~10 seconds, then it segfaults, but the only time it does so is if there are servers in the mysql_servers configuration block that exist in other sub-networks. For example from a client at 10.128.0.2 running proxysql with servers 10.128.0.3 and 10.128.0.4, proxysql runs fine. When I add 10.140.0.3 as a server, proxysql segfaults after 10s.
I've confirmed network connectivity is allowed.
I've run proxysql under gdb and it seems that the segfaults occur in MySQL_Monitor.cpp at line 167 or 173:
The other common segfault occurs here:
I have confirmed that this behavior effects both 1.2.1 and 1.2.4.
I'm happy to provide what further information I can, including tcpdump captures if that would be helpful.
The text was updated successfully, but these errors were encountered: