[MXS-1644] Segmentation fault (signal 11) after max_user_connections-related authentication failure Created: 2018-02-02  Updated: 2020-08-25  Resolved: 2018-06-25

Status: Closed
Project: MariaDB MaxScale
Component/s: readconnroute
Affects Version/s: 2.0.5
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Johan Wikman
Resolution: Incomplete Votes: 0
Labels: crash, need_feedback


 Description   

A user saw the following crash:

2018-02-01 08:27:13   error  : Invalid authentication message from backend. Error : 42000, Msg : User 'appuser' has exceeded the 'max_user_connections' resource (current value: 200)
2018-02-01 08:27:13   error  : Backend server didn't accept authentication for user appuser.
2018-02-01 08:27:13   error  : Loading database names for service Write Service encountered error when querying database privileges: Lost connection to MySQL server during query.
2018-02-01 08:27:13   error  : Write Service: Refresh rate limit exceeded for load of users' table.
2018-02-01 08:27:13   notice : Write Service: login attempt for user 'appuser'@10.1.1.2:16826, authentication failed.
2018-02-01 08:27:13   error  : Fatal: MaxScale 2.0.5 received fatal signal 11. Attempting backtrace.
2018-02-01 08:27:13   error  : Commit ID: 60c69d0f7f461a1773a4e848e87fa3fcc7b0e421 System name: Linux Release string: Red Hat Enterprise Linux Server release 6.9 (Santiago)
2018-02-01 08:27:13   error  : Invalid authentication message from backend. Error : 42000, Msg : User 'appuser' has exceeded the 'max_user_connections' resource (current value: 200)
2018-02-01 08:27:13   error  :   /usr/bin/maxscale() [0x403b9c] 
2018-02-01 08:27:13   error  :   /lib64/libpthread.so.0() [0x3c2fc0f7e0] 
2018-02-01 08:27:13   notice : Write Service: login attempt for user 'appuser'@10.1.1.3:51096, authentication failed.
2018-02-01 08:27:13   error  : Backend server didn't accept authentication for user appuser.
2018-02-01 08:27:13   error  : Write Service: Refresh rate limit exceeded for load of users' table.



 Comments   
Comment by Johan Wikman [ 2018-02-06 ]

GeoffMontee
As this is indirectly caused by appuser repeatedly being denied access, thus causing a reload of the users, it can be worked around by ensuring that the appropriate grants exist in the backend and/or by preventing unauthorized access to MaxScale.

Comment by Johan Wikman [ 2018-02-14 ]

The comment above was obvious nonsense as there is no actual authentication failure, but the connection attempt fails due to max connections having been reached, just as the bug description says.

I have not been able to repeat the crash, but I believe the symptom can be prevented by detecting that the connection failure is not due to an authentication failure and not reloading the users in that case.

Generated at Thu Feb 08 04:08:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.