Almalinux pam_systemd.so in system_auth causing hang issues

Hi Team,

In the recent Almalinux version 9.4 we are facing hang issues when we do the command– ssh -vvv root@<IP_ADDRESS>.It will hang in the debug1 : pledge
filesystem full. Basically, it is a fresh appliance with 100 GB free space. Attached image.

Apart from this whenever a script is invoked with sudo pre-fixed, we face hanging issues. When we inspected it we found that If we comment out the below line from /etc/pam.d/system-auth, the slowness of the sudo command execution goes away.

# session optional pam_systemd.so

But again if we comment out this line it causes our interfacing applications connectivity failure to this VM where the Almalinux 9.4 OS is deployed.

So when we searched for workaround we found that whenever a hang is noticed, if we use the command - systemctl restart systemd-logind the hang goes away temporarily but not permanently. Whenever we execute something with sudo command it shows up again.

This issue is kind of release blocker to us. So, could you please help. There is a redditt link where the same issue is reported by other users as well. But no where a permanent fix is suggested.

https://www.reddit.com/r/AlmaLinux/comments/1cn3gp8/comment/l3699r0/

Hi Anyone there to help. Awaiting your valuable inputs

Interestingly, on my systems that line is

-session    optional                                     pam_systemd.so

and man pam.conf explains:

If the type value from the list above is prepended with a - character the PAM library will not log to the system log if it is not possible to load the module because it is missing in the system. This can be useful especially for modules which are not always installed on the system and are not required for correct authentication and authorization of the login session.

Considering what man pam_systemd says, failing to load that module does affect sessions too.

Hi jlehtone,

Are you aware of any workaround for the issue which we were facing. We are completely blocked and everything worked fine till Almalinux 9.3

Thank you

Sorry, I have not encountered the issue.