autofs: Assertion 'set_remove(iterator->links, link) == link' failed at src/shared/userdb.c:314, function userdb_on_query_reply(). Aborting.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
autofs (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Invalid
|
Undecided
|
Unassigned | ||
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Invalid
|
Undecided
|
Unassigned |
Bug Description
autofs has a periodic error on mounting shares in Ubuntu 20.04 (it happens about 1 time out of 5):
"Assertion 'set_remove(
Aborted (core dumped)"
`autofs.service` restart (or `automount` app restart) fixes this issue. However if some of home dirs (like `Desktop` or `Documents`) are mounted by `autofs`, user can't login into Ubuntu Desktop Environment (PC freezes on login with black screen). Since this error can prevent user log in, it might be considered as critical bug.
It happens both in `autofs` systemd service and by direct execution of `automount` app (`automount -f -d` command).
May be it's an underlying error in `systemd` library (I found the line, mentioned in error, in its source codes).
This issue has place in Ubuntu 20.04 (it works correctly in Ubuntu 18.04):
> lsb_release -rd
Description: Ubuntu 20.04 LTS
Release: 20.04
Packages versions:
> apt-cache policy autofs systemd
autofs:
Installed: 5.1.6-2
Candidate: 5.1.6-2
Version table:
*** 5.1.6-2 500
500 http://
100 /var/lib/
systemd:
Installed: 245.4-4ubuntu3
Candidate: 245.4-4ubuntu3
Version table:
*** 245.4-4ubuntu3 500
500 http://
100 /var/lib/
Steps to reproduce:
1. Ubuntu 20.04 clean install
2. `apt install realmd sssd sssd-tools libnss-sss libpam-sss adcli samba-common-bin`
3. `realm join DOMAIN.NAME`
4. Enable makehomedir by command: `pam-auth-update`
5. `apt install cifs-utils`
6. `apt install autofs`
7. Add next line inside [domain/DOMAIN.EXT] section into /etc/sssd/
8. Reboot
9. Login as domain user and try to open directory, mounted by `autofs` (in my configuration shares are provided by AD).
10. `autofs.service` stops with the error above about 1 time out of 5 (not always).
Found workaround:
Add `Restart=always` into `[Service]` section in `/lib/systemd/
Attachments:
1. Full log of `automount -f -d` command.
tags: | added: regression-release |
Changed in autofs (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
tags: | added: rls-ff-incoming |
Changed in autofs (Ubuntu): | |
assignee: | nobody → Rafael David Tinoco (rafaeldtinoco) |
tags: | added: id-5ef4c2690a8fc93823bfb457 |
Changed in autofs (Ubuntu Focal): | |
assignee: | nobody → Rafael David Tinoco (rafaeldtinoco) |
tags: | removed: rls-ff-incoming |
Changed in autofs (Ubuntu Focal): | |
importance: | Undecided → Medium |
tags: | added: fr-331 |
Changed in autofs (Ubuntu): | |
status: | Incomplete → Invalid |
Changed in autofs (Ubuntu Focal): | |
status: | Incomplete → Invalid |
Changed in systemd (Ubuntu): | |
status: | Incomplete → Invalid |
Changed in systemd (Ubuntu Focal): | |
status: | Incomplete → Invalid |
Instead of using autofs, have you tried to simply use systemd .automount units which should be able to achieve similar behaviour?
Furthermore, .automount units might be better, as they also could be use not only as _system_ amountmount units but as _user_ systemd .automount users.
See http:// manpages. ubuntu. com/manpages/ focal/en/ man5/systemd. automount. 5.html