ZSH shells break Login screen

Bug #1849081 reported by Fernando Racca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-keyring (Ubuntu)
New
Undecided
Unassigned

Bug Description

There's a bug that affects gnome-keyring, and i'll describe the steps i've done to reproduce it twice, although i don't have
full details as to what exactly is causing it.

Issue can be summarized as follows:

On Ubuntu 19.10, but not at least 18.04 (another computer i have using the older release), there's an issue that prevents the user to login to a gnome session

The issue shows up when checking the session manager:

```
service gdm3 status
Process: ExecStartPre: /usr/share/gdm/generate-config (code=exited,status=0/SUCCESS)
Process: ExecStartPre: /usr/lib/gdm3/gdm-wait-for-drm (code=exited,status=0/SUCCESS)
...

gdm-password: gkr-pam: unable to local control file
```

Relevant components:

  * gdm3 3.34.1-1
  * gnome-shell 3.34.1-1
  * gnome-keyring 3.34.0-1
  * zsh 5.77.1-ubuntu2

This does not occur on a fresh installation of Ubuntu. It only happens once some of these tools are installed:

  * zsh (ubuntu package https://packages.ubuntu.com/eoan/zsh , manually change shell for user) - https://askubuntu.com/questions/131823/how-to-make-zsh-the-default-shell
 * oh-my-zsh (brings in lots of plugins, although only git was sourced) - https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH
 * powerlevel10k (shell theme ) - https://github.com/romkatv/powerlevel10k

The tools would appear to work fine, until you reboot the machine, and are asked to login, at which point gkr-pam complains that it can't locate control file.

Unfortunately i don't have better details because eventually i broke so much my login that i decided to reinstall the system from scratch.

Upon installation, i started from fresh, with no zsh, and everything worked. Once zsh was installed, it will no longer work.

A fix for this was to revert to bash shell.

The key change was to no include this line at the top of .bashrc

```
#exec zsh
```

So i can confirm the issue is there, but that's as far as i got after several hours of investigations.

I appreciate that this bug may not be a gnome-keyring specific bug, but seems that its the one been affected anyways.

https://gitlab.gnome.org/GNOME/gnome-keyring/issues/28
https://gitlab.gnome.org/GNOME/gnome-keyring/issues/26

https://github.com/GNOME/gnome-keyring/blob/master/pam/gkr-pam-module.c#L676
https://github.com/GNOME/gnome-keyring/blob/master/pam/gkr-pam-module.c#L847

https://github.com/GNOME/gnome-keyring/commit/443a821cba105e8f277828a67b3d019b67f1324a
https://github.com/GNOME/gnome-keyring/commit/b22d058a055ec3e0f31ae16417f16b42baadb42f

https://bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/1817128
https://bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/1818616

Tags: eoan
Revision history for this message
Fernando Racca (fracca) wrote :

I've cross-posted this issue in the related tools since it's unclear which one causes it, but it's severe enough to make it worth triaging it.

https://github.com/robbyrussell/oh-my-zsh/issues/8296
https://github.com/romkatv/powerlevel10k/issues/280

Revision history for this message
Fernando Racca (fracca) wrote :

More updates.
There was an issue with Powerlevel, at least as documented here.
 https://github.com/romkatv/powerlevel10k/issues/280

However, the issue seems to be lower level. An important issue seems to happen here:

include this line at the top of .bashrc when using zsh

```
exec zsh
```

It seems this somehow breaks the login shell. I was able to reproduce this on my other laptop with 18.04.

As long as that line is not there, the latest version of ZSH + oh_my_zsh + Powerlevel10k are working fine.

This bug may be closed at your discretion, but it seems that there is benefit in somehow find out how to avoid this breaking in such case .

Revision history for this message
Razvan Soare (razvan-soare) wrote :

Thank you so much for this post.. this wasted 2hours of my life..

Removing this fixed everything
```
exec zsh
```

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.