[MXS-2224] MaxScale 2.3.2 Memory leaks causes OOM Created: 2018-12-18  Updated: 2018-12-22  Resolved: 2018-12-22

Status: Closed
Project: MariaDB MaxScale
Component/s: readwritesplit
Affects Version/s: 2.3.2
Fix Version/s: 2.2.18, 2.3.3

Type: Bug Priority: Major
Reporter: Daniel Snow Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Environment:

Debian 8, Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) x86_64 GNU/Linux


Attachments: PNG File Zrzut ekranu 2018-12-18 o 5.46.13 PM.png    
Issue Links:
Problem/Incident
is caused by MXS-2213 Growing memory consumption with 2.2.17 Closed
Relates
relates to MXS-1977 Maxscale 2.2.6 memory leak Closed

 Description   

Hello! We've tried to upgrade MaxScale to the 2.3.2 from 2.1.17, unfortunately, the story from the issue https://jira.mariadb.org/browse/MXS-1977 remains despite of fix

Profile of memory consumption the same as in mxs-1977 - gradual growth, config is following:

[maxscale]
threads=4
 
[server0]
type=server
address=192.168.34.34
port=3306
protocol=MySQLBackend
serversize=0
priority=6
 
[server1]
type=server
address=192.168.34.35
port=3306
protocol=MySQLBackend
serversize=100
priority=1
 
[server2]
type=server
address=192.168.34.36
port=3306
protocol=MySQLBackend
serversize=100
priority=2
 
[server3]
type=server
address=192.168.34.37
port=3306
protocol=MySQLBackend
serversize=100
priority=5
 
[server4]
type=server
address=192.168.34.38
port=3306
protocol=MySQLBackend
serversize=100
priority=3
 
[MySQL Monitor]
type=monitor
module=galeramon
#module=mmmon
servers=server0, server1, server2, server3, server4
user=maxscale
passwd=maxscale
monitor_interval=5000
use_priority=true
 
[Read-Write-Master Service]
type=service
router=readconnroute
servers=server0, server1, server2, server3, server4
user=maxscale
passwd=maxscale
router_options=master
 
[Read-Write Service]
type=service
router=readwritesplit
servers=server0, server1, server2, server3, server4
user=maxscale
passwd=maxscale
max_slave_connections=1
slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS
master_accept_reads=true
strict_multi_stmt=true
 
[Read-Only Service]
type=service
router=readconnroute
servers=server0, server1, server2, server3, server4
user=maxscale
passwd=maxscale
router_options=slave
weightby=serversize
 
[MaxAdmin Service]
type=service
router=cli
 
[Read-Write-Master Listener]
type=listener
service=Read-Write-Master Service
protocol=MySQLClient
port=4007
 
[Read-Write Listener]
type=listener
service=Read-Write Service
protocol=MySQLClient
port=4006
 
[Read-Only Listener]
type=listener
service=Read-Only Service
protocol=MySQLClient
port=4005
 
[MaxAdmin Listener]
type=listener
service=MaxAdmin Service
protocol=maxscaled
socket=default

And last messages in log before crash:

2018-12-18 17:17:02   notice : [Read-Write-Service] No users were loaded but 'inject_service_user' is enabled. Enabling service credentials for authentication until database users h
ave been successfully loaded.
OOM: func
OOM: func
2018-12-18 17:17:02   error  : mysql_init:
2018-12-18 17:17:02   error  : (2) Failed to create DCB object for client connection.
2018-12-18 17:17:02   error  : mysql_init:
2018-12-18 17:17:02   error  : mysql_init:
2018-12-18 17:17:02   error  : mysql_init:
2018-12-18 17:17:02   error  : mysql_init:
OOM: func
OOM: func
2018-12-18 17:17:02   error  : (57723057) Routing the query failed. Session will be closed.
terminate called after throwing an instance of 'std::bad_alloc'
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
  what():  std::bad_alloc



 Comments   
Comment by Johan Wikman [ 2018-12-18 ]

Could you please try 2.2.18

There were some leaks in 2.2.17 that were addressed in 2.2.18.

Those fixes are not in 2.3.2, but will be in 2.3.3 that is likely to be released first thing after new year.

Comment by Daniel Snow [ 2018-12-20 ]

Hi Johan! Thank you for your advice, 2.2.18 works good for our workload with no memory leaking.

BTW it's strange codeflow to not to include old fixes into the new releases. Haven't ever seen

MCAAHNY!

Comment by Johan Wikman [ 2018-12-21 ]

That's good!
As for the code flow, 2.3.2 was released before 2.2.18, so the fixes were not available at that point.

Comment by markus makela [ 2018-12-22 ]

Fixed in 2.2.18 and will be a part of 2.3.3.

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