[MXS-2176] Crash in MaskingFilterSession::mask_values Created: 2018-11-20  Updated: 2020-08-27  Resolved: 2020-08-27

Status: Closed
Project: MariaDB MaxScale
Component/s: masking
Affects Version/s: 2.2.15
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: wangle Assignee: Johan Wikman
Resolution: Cannot Reproduce Votes: 0
Labels: None
Environment:

CentOS 6.5


Attachments: Text File `jz_work_flow_adv` .txt     File masking_rules.json     File maxscale.cnf    
Sprint: MXS-SPRINT-71, MXS-SPRINT-72, MXS-SPRINT-73, MXS-SPRINT-74

 Description   

2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.user_mobile" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.mobile" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.mobile2" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.email2" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.weixin" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.weixin2" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.user_mobile" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.mobile" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.mobile2" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.email2" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.weixin" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.weixin2" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.user_mobile" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.mobile" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.mobile2" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.email2" matches a column that is not of string type.
2018-11-20 15:26:24   warning: (379195) [masking] The rule targeting "*.*.weixin" matches a column that is not of string type. (subsequent similar messages suppressed for 10000 milliseconds)
2018-11-20 15:26:24   alert  : (379195) Fatal: MaxScale 2.2.15 received fatal signal 11. Attempting backtrace.
2018-11-20 15:26:24   alert  : (379195) Commit ID: 62ce6c15dcd45be035ff6a005ca5539ca3d2adc8 System name: Linux Release string: CentOS release 6.5 (Final)
2018-11-20 15:26:24   alert  : (379195)   /usr/bin/maxscale() [0x406f29]: ??:0
2018-11-20 15:26:24   alert  : (379195)   /lib64/libpthread.so.0(+0xf790) [0x7f029f9f9790]: sigaction.c:0
2018-11-20 15:26:24   alert  : (379195)   /usr/lib64/maxscale/libmasking.so(_ZN20MaskingFilterSession11mask_valuesER9ComPacket+0x26b) [0x7f029ac5673b]: /home/vagrant/MaxScale/server/modules/filter/masking/mysql.hh:247
2018-11-20 15:26:24   alert  : (379195)   /usr/lib64/maxscale/libmasking.so(_ZN20MaskingFilterSession10handle_rowEP5gwbuf+0x58) [0x7f029ac569d8]: /home/vagrant/MaxScale/server/modules/filter/masking/maskingfiltersession.cc:269
2018-11-20 15:26:24   alert  : (379195)   /usr/lib64/maxscale/libmasking.so(_ZN20MaskingFilterSession11clientReplyEP5gwbuf+0x105) [0x7f029ac570e5]: /home/vagrant/MaxScale/server/modules/filter/masking/maskingfiltersession.cc:99
2018-11-20 15:26:24   alert  : (379195)   /usr/lib64/maxscale/libmasking.so(_ZN8maxscale6FilterI13MaskingFilter20MaskingFilterSessionE11clientReplyEP10mxs_filterP18mxs_filter_sessionP5gwbuf+0xf) [0x7f029ac556cf]: /home/vagrant/MaxScale/include/maxscale/filter.hh:288
2018-11-20 15:26:24   alert  : (379195)   /usr/lib64/maxscale/libmariadbbackend.so(+0x45ae) [0x7f029aa4a5ae]: /home/vagrant/MaxScale/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.c:1018
2018-11-20 15:26:24   alert  : (379195)   /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(+0x5928c) [0x7f029fecc28c]: /home/vagrant/MaxScale/server/core/dcb.cc:3084
2018-11-20 15:26:24   alert  : (379195)   /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(+0x59458) [0x7f029fecc458]: /home/vagrant/MaxScale/server/core/dcb.cc:3176
2018-11-20 15:26:24   alert  : (379195)   /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(_ZN8maxscale6Worker15poll_waiteventsEv+0x21b) [0x7f029ff04ebb]: /home/vagrant/MaxScale/server/core/worker.cc:1214
2018-11-20 15:26:24   alert  : (379195)   /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(_ZN8maxscale6Worker3runEv+0x121) [0x7f029ff05191]: /home/vagrant/MaxScale/include/maxscale/log_manager.h:116
2018-11-20 15:26:24   alert  : (379195)   /usr/bin/maxscale(main+0x1d8d) [0x40901d]: /home/vagrant/MaxScale/server/core/gateway.cc:2278
2018-11-20 15:26:24   alert  : (379195)   /lib64/libc.so.6(__libc_start_main+0xfd) [0x7f029daf1d5d]: ??:0
2018-11-20 15:26:24   alert  : (379195)   /usr/bin/maxscale() [0x404659]: ??:0



 Comments   
Comment by Johan Wikman [ 2018-11-20 ]

Thanks for the report.
Could you please provide

  • the configuration files; both the one for MaxScale (please remove any passwords) and the JSON-file for the masking filter,
  • the table definition, and
  • the query you are attempting.
Comment by wangle [ 2018-11-21 ]

SQL:
select mobile from jianzhi_crm.jz_work_flow_adv;

Comment by Johan Wikman [ 2018-12-04 ]

Hi wl21787

There seems to be a discrepancy between the provided log and the table you have provided; the log refers to the columns user_mobile, mobile, mobile2, email2, weixin and weixin2, of which only mobile is a column in the provided jz_work_flow_adv table.

The complaints in the log indicate that you have masking rules for columns that are not of textual type; e.g. jz_work_flow_adv.mobile is bigint, which cannot be masked.

I have created a table identical to jz_work_flow_table and used a config and masking rules file similar to the ones provided, but MaxScale does not crash for me

How many rows do you have in your table?
Do you get any results before MaxScale crashes, or does MaxScale crash immediately?

If possible, please provide a minimal

  • table definition,
  • config file, and
  • masking rules file
    using which MaxScale crashes.
Comment by wangle [ 2018-12-11 ]

the table name is jz_customer

  1. ---------------------------------------------------------------+
    Field Type Null Key Default Extra

    ---------------------------------------------------------------+

    id int(11) NO PRI NULL auto_increment
    post_id int(11) NO   0  
    title varchar(512) NO MUL    
    contact_name varchar(64) NO      
    contact_name2 varchar(64) NO      
    mobile varchar(32) NO MUL    
    mobile2 varchar(32) NO MUL    
    email varchar(128) NO      
    email2 varchar(128) NO      
    weixin varchar(128) NO      
    weixin2 varchar(128) NO      
    department varchar(128) NO      
    title_department varchar(512) NO MUL    
    duty varchar(128) NO      
    duty2 varchar(128) NO      
    sale_phase int(11) NO   0  
    cooperate_intention int(11) NO   0  
    corporation_id int(11) NO   0  
    corporation_name varchar(512) NO      
    address varchar(1024) NO      
    remark varchar(5120) NO      
    bd_id int(11) NO MUL 0  
    bd_name varchar(64) NO      
    source_way int(11) NO   0  
    source int(11) NO   0  
    industry_code int(10) NO   0  
    industry_name varchar(64) NO      
    status int(11) NO   0  
    create_userid int(11) NO   0  
    create_name varchar(64) NO      
    create_at int(11) NO MUL 0  
    modify_at int(11) NO MUL 0  
    province_name varchar(64) NO      
    city_name varchar(64) NO      
    district_name varchar(64) NO      
    street_name varchar(64) NO      
    province_id int(10) NO   0  
    city_id int(10) NO MUL 0  
    district_id int(10) NO   0  
    street_id int(10) NO   0  
    customer_type int(11) NO MUL 0  
    owner_id int(11) NO   0  
    as_status int(3) NO   0  
    skip_at int(11) NO   0  
    cancel_type int(10) NO   0  
    cancel_remark varchar(300) NO      
    create_type int(10) NO   0  
    focus int(10) NO   0  
    lock_title int(10) NO   0  
    urgency int(10) YES   0  
    transfer_remain_days int(11) NO   0  
    transfer_reason varchar(100) NO      
    trans_cycle_start int(11) NO   0  
    import_type int(11) NO   9  
    keep int(10) NO   0  
    has_odd_job int(11) NO   0  
    has_ka int(11) NO   0  
    release_type int(11) NO   0  
    release_reason varchar(255) NO      
    visit_at int(11) NO MUL 0  
    next_visit_at int(11) NO MUL 0  
    customer_status tinyint(1) NO   0  
    peferee_bd_id int(11) NO   0  
    peferee_reason varchar(255) NO      
    customer_attr tinyint(4) YES   NULL  
    lock_map varchar(500) NO      
    is_important tinyint(1) NO   0  
    transfer_time int(11) NO   0  
    mobile_verify tinyint(2) NO   0  
    company_verify tinyint(2) NO   0  
    business_info text YES   NULL  
    release_time int(11) NO   0  
    release_nums int(11) NO   0  
    customer_tags int(11) NO   0  

    ---------------------------------------------------------------+

Comment by wangle [ 2018-12-11 ]

the error again:

  1. 2018-12-10 21:25:53 warning: (1640515) [masking] The rule targeting "jianzhi_crm.jz_customer.mobile" matches a column that is not of string type.
    2018-12-10 21:27:42 warning: (1640515) [masking] The rule targeting "jianzhi_crm.jz_customer.mobile" matches a column that is not of string type.
    2018-12-10 21:32:10 warning: (1640515) [masking] The rule targeting "jianzhi_crm.jz_customer.mobile" matches a column that is not of string type.
    2018-12-11 15:03:56 error : Failed to execute query on server 'server-real-jzcrm' ([10.16.81.3]:3950): Lost connection to MySQL server during query
    2018-12-11 15:04:08 error : Failed to execute query on server 'server-real-grab' ([10.16.81.3]:3937): Lost connection to MySQL server during query
    2018-12-11 17:24:15 warning: [MySQLAuth] MyService-real-jz: login attempt for user 'yanjing'@[::ffff:10.216.90.51]:55985, authentication failed. Unknown database: jianzhi_crm
    2018-12-11 17:53:17 warning: (2326592) [masking] The rule targeting "jianzhi_crm.jz_customer.mobile" matches a column that is not of string type.
    2018-12-11 17:53:17 warning: (2326592) [masking] The rule targeting "jianzhi_crm.jz_customer.mobile2" matches a column that is not of string type.
    2018-12-11 17:53:17 warning: (2326592) [masking] The rule targeting "jianzhi_crm.jz_customer.email2" matches a column that is not of string type.
    2018-12-11 17:53:17 warning: (2326592) [masking] The rule targeting "jianzhi_crm.jz_customer.weixin" matches a column that is not of string type.
    2018-12-11 17:53:17 warning: (2326592) [masking] The rule targeting "jianzhi_crm.jz_customer.weixin2" matches a column that is not of string type.
    2018-12-11 17:53:17 alert : (2326592) Fatal: MaxScale 2.2.15 received fatal signal 11. Attempting backtrace.
    2018-12-11 17:53:17 alert : (2326592) Commit ID: 62ce6c15dcd45be035ff6a005ca5539ca3d2adc8 System name: Linux Release string: CentOS release 6.5 (Final)
    2018-12-11 17:53:17 alert : (2326592) /usr/bin/maxscale() [0x406f29]: ??:0
    2018-12-11 17:53:17 alert : (2326592) /lib64/libpthread.so.0(+0xf790) [0x7fc40af5e790]: sigaction.c:0
    2018-12-11 17:53:17 alert : (2326592) /usr/lib64/maxscale/libmasking.so(_ZN20MaskingFilterSession11mask_valuesER9ComPacket+0x26b) [0x7fc4061bb73b]: /home/vagrant/MaxScale/server/modules/filter/masking/mysql.hh:247
    2018-12-11 17:53:17 alert : (2326592) /usr/lib64/maxscale/libmasking.so(_ZN20MaskingFilterSession10handle_rowEP5gwbuf+0x58) [0x7fc4061bb9d8]: /home/vagrant/MaxScale/server/modules/filter/masking/maskingfiltersession.cc:269
    2018-12-11 17:53:17 alert : (2326592) /usr/lib64/maxscale/libmasking.so(_ZN20MaskingFilterSession11clientReplyEP5gwbuf+0x105) [0x7fc4061bc0e5]: /home/vagrant/MaxScale/server/modules/filter/masking/maskingfiltersession.cc:99
    2018-12-11 17:53:17 alert : (2326592) /usr/lib64/maxscale/libmasking.so(_ZN8maxscale6FilterI13MaskingFilter20MaskingFilterSessionE11clientReplyEP10mxs_filterP18mxs_filter_sessionP5gwbuf+0xf) [0x7fc4061ba6cf]: /home/vagrant/MaxScale/include/maxscale/filter.hh:288
    2018-12-11 17:53:17 alert : (2326592) /usr/lib64/maxscale/libmariadbbackend.so(+0x45ae) [0x7fc405faf5ae]: /home/vagrant/MaxScale/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.c:1018
    2018-12-11 17:53:17 alert : (2326592) /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(+0x5928c) [0x7fc40b43128c]: /home/vagrant/MaxScale/server/core/dcb.cc:3084
    2018-12-11 17:53:17 alert : (2326592) /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(+0x59458) [0x7fc40b431458]: /home/vagrant/MaxScale/server/core/dcb.cc:3176
    2018-12-11 17:53:17 alert : (2326592) /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(_ZN8maxscale6Worker15poll_waiteventsEv+0x21b) [0x7fc40b469ebb]: /home/vagrant/MaxScale/server/core/worker.cc:1214
    2018-12-11 17:53:17 alert : (2326592) /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(_ZN8maxscale6Worker3runEv+0x121) [0x7fc40b46a191]: /home/vagrant/MaxScale/include/maxscale/log_manager.h:116
    2018-12-11 17:53:17 alert : (2326592) /lib64/libpthread.so.0(+0x7a51) [0x7fc40af56a51]: pthread_create.c:0
    2018-12-11 17:53:17 alert : (2326592) /lib64/libc.so.6(clone+0x6d) [0x7fc40912093d]: ??:0
Comment by wangle [ 2018-12-11 ]

the sql audit log :

  • 20181211 17:53:00,g1-db-real-01,liangshuyi,10.16.81.16,5517,122180010,QUERY,jianzhi_crm,'select * from jz_customer where title=\'武汉市红星行房产营销策划有限公司\'',0
    20181211 17:53:00,g1-db-real-01,liangshuyi,10.16.81.16,5470,122180021,QUERY,jianzhi_crm,'select * from jz_customer where title=\'武汉鑫瑞宏人力资源有限公司\'',0
    20181211 17:53:01,g1-db-real-01,liangshuyi,10.16.81.16,5490,122180038,QUERY,jianzhi_crm,'select * from jz_customer where title=\'湖北东方朔文化传播有限公司\'',0
    20181211 17:53:01,g1-db-real-01,liangshuyi,10.16.81.16,5465,122180043,QUERY,jianzhi_crm,'select * from jz_customer where title=\'良之隆新食材\'',0
    20181211 17:53:02,g1-db-real-01,liangshuyi,10.16.81.16,5503,122180096,QUERY,jianzhi_crm,'select * from jz_customer where title=\'武汉星家园物业管理有限公司\'',0
    20181211 17:53:03,g1-db-real-01,liangshuyi,10.16.81.16,5512,122180170,QUERY,jianzhi_crm,'select * from jz_customer where title=\'嘉兴优元文化传媒有限公司\'',0
    20181211 17:53:03,g1-db-real-01,liangshuyi,10.16.81.16,5461,122180196,QUERY,jianzhi_crm,'select * from jz_customer where title=\'北京才秀人人科技有限公司\'',0
    20181211 17:53:04,g1-db-real-01,liangshuyi,10.16.81.16,5476,122180225,QUERY,jianzhi_crm,'select * from jz_customer where title=\'吕梁三晋新观察文化传媒有限公司\'',0
    20181211 17:53:04,g1-db-real-01,liangshuyi,10.16.81.16,5496,122180245,QUERY,jianzhi_crm,'select * from jz_customer where title=\'长沙普柏特商务咨询有限公司\'',0
    20181211 17:53:04,g1-db-real-01,liangshuyi,10.16.81.16,5471,122180262,QUERY,jianzhi_crm,'select * from jz_customer where title=\'武汉德行天下人力资源开发有限公司\'',0
    20181211 17:53:05,g1-db-real-01,liangshuyi,10.16.81.16,5510,122180432,QUERY,jianzhi_crm,'select * from jz_customer where title=\'武汉驰宝路汽车贸易有限公司\'',0
    20181211 17:53:05,g1-db-real-01,liangshuyi,10.16.81.16,5518,122180593,QUERY,jianzhi_crm,'select * from jz_customer where title=\'武汉星空缘网络科技有限公司\'',0
    20181211 17:53:06,g1-db-real-01,liangshuyi,10.16.81.16,5468,122180868,QUERY,jianzhi_crm,'select * from jz_customer where title=\'武汉鼎盛茶易商贸有限公司\'',0
    20181211 17:53:07,g1-db-real-01,liangshuyi,10.16.81.16,5482,122181062,QUERY,jianzhi_crm,'select * from jz_customer where title=\'长沙普柏特商务咨询有限公司\'',0
    20181211 17:53:07,g1-db-real-01,liangshuyi,10.16.81.16,5502,122181184,QUERY,jianzhi_crm,'select * from jz_customer where title=\'长沙普柏特商务咨询有限公司\'',0
    20181211 17:53:07,g1-db-real-01,liangshuyi,10.16.81.16,5477,122181264,QUERY,jianzhi_crm,'select * from jz_customer where title=\'长沙普柏特商务咨询有限公司\'',0
    20181211 17:53:10,g1-db-real-01,liangshuyi,10.16.81.16,5516,122181560,QUERY,jianzhi_crm,'select * from jz_customer where title=\'武汉广惠通科技有限公司\'',0
    20181211 17:53:17,g1-db-real-01,wangzigeng,10.16.81.16,13071,122181944,QUERY,jianzhi_crm,'select * from `jz_customer` where `customer_type` = \'6\' and `create_at` < \'1543917197\'',1160
Comment by Johan Wikman [ 2019-01-23 ]

Created an identical table, but I still fail to reproduce it.

  • How many rows does your table contain?
  • Does the crash happen always?
  • Does the crash appear irrespective of whether the MaxRows filter is present or not?
Comment by markus makela [ 2020-08-27 ]

Closing as Cannot Reproduce. If this still happens with the latest releases, please let us know and we'll reopen the issue.

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