Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkosi-mainline tests failing #283

Closed
solardiz opened this issue Aug 2, 2023 · 2 comments
Closed

mkosi-mainline tests failing #283

solardiz opened this issue Aug 2, 2023 · 2 comments
Labels
testing A testing task or issue (e.g., with CI)

Comments

@solardiz
Copy link
Contributor

solardiz commented Aug 2, 2023

This has been happening for a while, @vt-alt:

Processing triggers for linux-image-unsigned-6.5.0-060500rc4daily20230731-generic (6.5.0-060500rc4daily20230731.202307302200) ...
/etc/kernel/postinst.d/dracut:
dracut: Generating /boot/initrd.img-6.5.0-060500rc4daily20230731-generic
/etc/kernel/postinst.d/zz-systemd-boot:
Installing kernel version 6.5.0-060500rc4daily20230731-generic in systemd-boot...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
update-initramfs: deferring update (trigger activated)
dpkg: error: dpkg frontend lock was locked by another process with pid 5
Note: removing the lock file is always wrong, can damage the locked area
and the entire system. See <https://wiki.debian.org/Teams/Dpkg/FAQ#db-lock>.
run-parts: /etc/kernel/postinst.d/zz-systemd-boot exited with return code 2
dpkg: error processing package linux-image-unsigned-6.5.0-060500rc4daily20230731-generic (--install):
 installed linux-image-unsigned-6.5.0-060500rc4daily20230731-generic package post-installation script subprocess returned error exit status 1
Processing triggers for dracut (059-4) ...
dracut: Generating /boot/initrd.img-6.3.0-7-generic
dracut: Generating /boot/initrd.img-6.5.0-060500rc4daily20230731-generic
Errors were encountered while processing:
 linux-image-unsigned-6.5.0-060500rc4daily20230731-generic
Error: Workspace command /root/prepare final returned non-zero exit code 1.
@solardiz solardiz added the testing A testing task or issue (e.g., with CI) label Aug 2, 2023
@vt-alt
Copy link
Contributor

vt-alt commented Aug 2, 2023

dpkg: error: dpkg frontend lock was locked by another process with pid 5

I tried to debug but without much success, this looks quite obscure (pid 5 is dpkg itself). Packages actually installed after faulty dpkg run but I fear we cannot just ignore exit status (1) of it because of other possible errors.

Idea 1: Maybe we can check if new kernel files are appeared then ignore dpkg -i errors.

ps. Also this error happens on second run of prepare script. But we need both runs, first for building LKRG, second for creating boot image.

pps. (I found to to debug this.) It seems that lock issue is triggered by mkosi's own dracut hook script 50-mkosi-dpkg-reconfigure-dracut.install calling dpkg-reconfigure dracut inside of dpdk -i. It's hard to tell why previously this not triggered lock since we can't trace in the past. Simply removing dpkg-reconfigure call does not help, causing python errors.

vt-alt added a commit to vt-alt/lkrg that referenced this issue Aug 3, 2023
Mkosi's own dracut hook, which is triggered from `dpkg -i`, calls
`dpkg-reconfigure` causing dpkg frontend lock conflict. But `initrd.img`
is generated correctly. Workaround by ignoring `dpkg-reconfigure` errors
in the hook.

  dpkg: error: dpkg frontend lock was locked by another process with pid 5
  Note: removing the lock file is always wrong, can damage the locked area
  and the entire system. See <https://wiki.debian.org/Teams/Dpkg/FAQ#db-lock>.
  run-parts: /etc/kernel/postinst.d/zz-systemd-boot exited with return code 2

Link: lkrg-org#283
Signed-off-by: Vitaly Chikunov <[email protected]>
solardiz pushed a commit that referenced this issue Aug 3, 2023
Mkosi's own dracut hook, which is triggered from `dpkg -i`, calls
`dpkg-reconfigure` causing dpkg frontend lock conflict. But `initrd.img`
is generated correctly. Workaround by ignoring `dpkg-reconfigure` errors
in the hook.

  dpkg: error: dpkg frontend lock was locked by another process with pid 5
  Note: removing the lock file is always wrong, can damage the locked area
  and the entire system. See <https://wiki.debian.org/Teams/Dpkg/FAQ#db-lock>.
  run-parts: /etc/kernel/postinst.d/zz-systemd-boot exited with return code 2

Link: #283
Signed-off-by: Vitaly Chikunov <[email protected]>
@solardiz
Copy link
Contributor Author

solardiz commented Aug 3, 2023

Fixed in #284.

@solardiz solardiz closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing A testing task or issue (e.g., with CI)
Projects
None yet
Development

No branches or pull requests

2 participants