[MXS-2148] Crash in libpambackendauth Created: 2018-11-07  Updated: 2019-09-13  Resolved: 2019-09-04

Status: Closed
Project: MariaDB MaxScale
Component/s: Authenticator
Affects Version/s: 2.2.13
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Esa Korhonen
Resolution: Fixed Votes: 0
Labels: None

Sprint: MXS-SPRINT-70

 Description   

A user saw the following crash in 2.2.13:

Nov  6 17:32:31 maxscale1 maxscale: Fatal: MaxScale 2.2.13 received fatal signal 11. Attempting backtrace.
Nov  6 17:32:31 maxscale1 maxscale: Commit ID: ec178fd8da484dd29560379a53fcecd11fd4f1c5 System name: Linux Release string: Red Hat Enterprise Linux Server release 7.4 (Maipo)
Nov  6 17:32:31 maxscale1 maxscale: /usr/bin/maxscale[0x407ec1]
Nov  6 17:32:31 maxscale1 maxscale: /lib64/libpthread.so.0(+0xf680)[0x7f4bb8cb8680]
Nov  6 17:32:31 maxscale1 maxscale: /usr/lib64/maxscale/libpambackendauth.so(_ZN17PamBackendSession7extractEP3dcbP5gwbuf+0xf9)[0x7f4bb22b84d9]
Nov  6 17:32:31 maxscale1 maxscale: /usr/lib64/maxscale/libmariadbclient.so(+0x38c8)[0x7f4bb24bd8c8]
Nov  6 17:32:31 maxscale1 maxscale: /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(+0x5961a)[0x7f4bb919061a]
Nov  6 17:32:31 maxscale1 maxscale: /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(+0x597b8)[0x7f4bb91907b8]
Nov  6 17:32:31 maxscale1 maxscale: /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(_ZN8maxscale6Worker15poll_waiteventsEv+0x1c1)[0x7f4bb91cd121]
Nov  6 17:32:31 maxscale1 maxscale: /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(_ZN8maxscale6Worker3runEv+0x72)[0x7f4bb91cd392]
Nov  6 17:32:31 maxscale1 maxscale: /lib64/libpthread.so.0(+0x7dd5)[0x7f4bb8cb0dd5]
Nov  6 17:32:31 maxscale1 maxscale[97463]: Fatal: MaxScale 2.2.13 received fatal signal 11. Attempting backtrace.
Nov  6 17:32:31 maxscale1 maxscale: /lib64/libc.so.6(clone+0x6d)[0x7f4bb6c90b3d]
Nov  6 17:32:31 maxscale1 maxscale[97463]: Commit ID: ec178fd8da484dd29560379a53fcecd11fd4f1c5 System name: Linux Release string: Red Hat Enterprise Linux Server release 7.4 (Maipo)
Nov  6 17:32:31 maxscale1 maxscale[97463]:  /usr/bin/maxscale() [0x407ec1]: ??:0
Nov  6 17:32:31 maxscale1 maxscale[97463]:  /lib64/libpthread.so.0(+0xf680) [0x7f4bb8cb8680]: sigaction.c:?
Nov  6 17:32:31 maxscale1 maxscale[97463]:  /usr/lib64/maxscale/libpambackendauth.so(_ZN17PamBackendSession7extractEP3dcbP5gwbuf+0xf9) [0x7f4bb22b84d9]: /home/vagrant/MaxScale/server/modules/authenticator/PAM/PAMBackendAuth/pam_backend_session.cc:53
Nov  6 17:32:31 maxscale1 maxscale[97463]:  /usr/lib64/maxscale/libmariadbclient.so(+0x38c8) [0x7f4bb24bd8c8]: /home/vagrant/MaxScale/server/modules/protocol/MySQL/mariadbclient/mysql_client.cc:700
Nov  6 17:32:31 maxscale1 maxscale[97463]:  /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(+0x5961a) [0x7f4bb919061a]: /home/vagrant/MaxScale/server/core/dcb.cc:3084
Nov  6 17:32:31 maxscale1 maxscale[97463]:  /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(+0x597b8) [0x7f4bb91907b8]: /home/vagrant/MaxScale/server/core/dcb.cc:3176
Nov  6 17:32:31 maxscale1 maxscale[97463]:  /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(_ZN8maxscale6Worker15poll_waiteventsEv+0x1c1) [0x7f4bb91cd121]: /home/vagrant/MaxScale/server/core/worker.cc:1214
Nov  6 17:32:31 maxscale1 maxscale[97463]:  /usr/lib64/maxscale/libmaxscale-common.so.1.0.0(_ZN8maxscale6Worker3runEv+0x72) [0x7f4bb91cd392]: /home/vagrant/MaxScale/include/maxscale/log_manager.h:116
Nov  6 17:32:31 maxscale1 maxscale[97463]:  /lib64/libpthread.so.0(+0x7dd5) [0x7f4bb8cb0dd5]: pthread_create.c:?
Nov  6 17:32:31 maxscale1 maxscale[97463]:  /lib64/libc.so.6(clone+0x6d) [0x7f4bb6c90b3d]: ??:?



 Comments   
Comment by markus makela [ 2018-11-07 ]

Caused by using the wrong client side authenticator. Since it is a known limitation, it should be detected at startup.

Comment by Dipti Joshi (Inactive) [ 2018-11-08 ]

johan.wikmanCan we take care of this in 2.3.1 and 2.2.17?

Comment by Johan Wikman [ 2018-11-15 ]

A proper fix - that is, one that does not require the MaxScale core to be aware of what authenticators there exist - implies an API change.; MaxScale must be able to ask a client/backend authenticator whether it is compatible with the authenticator it is paired with.

That is not possible in the context of 2.2 and 2.3, but would require that we hard-code information about the authenticators into the MaxScale core. As incorrectly mixing different client and backend authenticators is not something that happens frequently and if done is easily detected and fixed, I suggest we fix this properly in 2.4.

Comment by Johan Wikman [ 2019-09-04 ]

Fixed by protocol/authenticator refactoring.

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