PAM authentication plugin crashs with segmentation fault

Hello :slight_smile:

we’re using the pam_auth plugin for authentication of developers on database systems.
After upgrade von 5.7 to 8.0 the plugin is not working anymore and crashes with segfault.

Here are some lines from syslog:

Jan 29 15:20:50 mw-bm-dev kernel: [232421.158041] audit: type=1400 audit(1706538050.815:102): apparmor="ALLOWED" operation="open" profile="/usr/sbin/mysqld" name="/etc/pam.d/mysqld" pid=2784 comm="connection" requested_mask="r" denied_mask="r" fsuid=110 ouid=0
Jan 29 15:20:50 mw-bm-dev kernel: [232421.161105] audit: type=1400 audit(1706538050.819:103): apparmor="ALLOWED" operation="open" profile="/usr/sbin/mysqld" name="/etc/pam.d/other" pid=2784 comm="connection" requested_mask="r" denied_mask="r" fsuid=110 ouid=0
Jan 29 15:20:50 mw-bm-dev kernel: [232421.161110] audit: type=1400 audit(1706538050.819:104): apparmor="ALLOWED" operation="open" profile="/usr/sbin/mysqld" name="/etc/pam.d/common-auth" pid=2784 comm="connection" requested_mask="r" denied_mask="r" fsuid=110 ouid=0
Jan 29 15:20:50 mw-bm-dev kernel: [232421.161345] audit: type=1400 audit(1706538050.819:105): apparmor="ALLOWED" operation="open" profile="/usr/sbin/mysqld" name="/etc/pam.d/common-account" pid=2784 comm="connection" requested_mask="r" denied_mask="r" fsuid=110 ouid=0
Jan 29 15:20:50 mw-bm-dev kernel: [232421.161350] audit: type=1400 audit(1706538050.819:106): apparmor="ALLOWED" operation="open" profile="/usr/sbin/mysqld" name="/etc/pam.d/common-password" pid=2784 comm="connection" requested_mask="r" denied_mask="r" fsuid=110 ouid=0
Jan 29 15:20:50 mw-bm-dev kernel: [232421.161373] audit: type=1400 audit(1706538050.819:107): apparmor="ALLOWED" operation="open" profile="/usr/sbin/mysqld" name="/etc/pam.d/common-session" pid=2784 comm="connection" requested_mask="r" denied_mask="r" fsuid=110 ouid=0
Jan 29 15:20:50 mw-bm-dev kernel: [232421.161786] audit: type=1400 audit(1706538050.819:108): apparmor="ALLOWED" operation="open" profile="/usr/sbin/mysqld" name="/etc/login.defs" pid=2784 comm="connection" requested_mask="r" denied_mask="r" fsuid=110 ouid=0
Jan 29 15:20:53 mw-bm-dev kernel: [232423.718328] mysql[452223]: segfault at 128 ip 00007f940426455a sp 00007fffab1bae70 error 4 in dialog.so[7f9404264000+1000]
Jan 29 15:20:53 mw-bm-dev kernel: [232423.718359] Code: 4f 00 00 00 4c 89 c7 48 89 c6 e8 01 fb ff ff c6 45 ff 00 ba 08 00 00 00 31 ff 49 89 c0 48 8b 05 8c 2a 00 00 4c 89 c6 48 8b 00 <ff> 50 28 c9 c3 00 48 83 ec 08 48 83 c4 08 c3 00 00 00 00 00 00 00

Does anymore has an idea?

Thanks, Denny

Hello dreeh,
Thank you for raising this question.
In your case, i would try to disable Apparmor temporary to see if it’s causing issue, and if issue still persist, I would spin fresh instance and rather than upgrade from 5.7 to 8.0, do fresh install of MySQL 8 server and try to use the same configuration as you have on your dev database.

Regards,
Denis Subbota.
Managed Services, Percona.

Hi Denis, I’m running into the same ‘segmentation fault’ issue. I have not upgraded. It’s a fresh install of v8.0. Hence your response does not help me. Has anybody looked into this issue on the Percona side? Would appreciate your help on this.

Apr 25 21:01:15 ip-10-0-0-108 kernel: mysql[1719]: segfault at 128 ip 00007feea146c5dd sp 00007ffe9fb54950 error 4 in dialog.so[7feea146c000+1000] likely on CPU 0 (core 0, socket 0)
Apr 25 21:01:15 ip-10-0-0-108 kernel: Code: 4f 00 00 00 48 89 cf 48 89 c6 e8 2e fb ff ff ba 08 00 00 00 31 ff c6 45 ef 00 48 89 c1 48 8b 05 f9 29 00 00 48 89 ce 48 8b 00 50 28 48 8b 55 f8 64 48 2b 14 25 28 00 00 00 75 02 c9 c3 e8 2a
Apr 25 21:01:15 ip-10-0-0-108 systemd[1]: Started Process Core Dump (PID 1720/UID 0).
Apr 25 21:01:15 ip-10-0-0-108 systemd-coredump[1721]: Resource limits disable core dumping for process 1719 (mysql).
Apr 25 21:01:15 ip-10-0-0-108 systemd-coredump[1721]: Process 1719 (mysql) of user 1000 dumped core.
Apr 25 21:01:15 ip-10-0-0-108 systemd[1]: systemd-coredump@3-1720-0.service: Deactivated successfully.