I tried to do a clean install in a VM with the current daily install
media and managed to reproduce the problem.

The Firefox preinst script was stuck in its loop calling "snap info
firefox", so I opened a shell with "sudo chroot /proc/$pid/root" and ran
the same command. That led to a panic that I've attached below.

The panic occurs when it is trying to get the caller's home directory,
picking the sudo user in preference:

https://github.com/snapcore/snapd/blob/6541efe9d6daad221447a2220c6de544b1741f46/client/login.go#L97-L100

The called function checks the SUDO_USER environment variable:

https://github.com/snapcore/snapd/blob/6541efe9d6daad221447a2220c6de544b1741f46/osutil/user.go#L309-L347

The /proc/$pid/environ file shows that the preinst script is being run
with SUDO_USER=ubuntu, which is essentially the same environment I
happened to create with "sudo chroot". The user lookup fails because
there is no user by that name in the file system being set up for the
install.

** Attachment added: "Output of "snap info firefox""
   
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1965805/+attachment/5572359/+files/snap.log

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1965805

Title:
  Ubiquity failure - Error while installing packages Ubuntu Jammy

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1965805/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to