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

Build fails to upload image on Fedora #1084

Closed
nyh opened this issue May 23, 2020 · 5 comments
Closed

Build fails to upload image on Fedora #1084

nyh opened this issue May 23, 2020 · 5 comments

Comments

@nyh
Copy link
Contributor

nyh commented May 23, 2020

Of my newly-upgrade Fedora 32, "scripts/build" fails in upload_manifest:

+ /home/nyh/osv.tmp2/osv/scripts/upload_manifest.py -o usr.img -m usr.manifest -D libgcc_s_dir=/usr/lib64
KVM: injection failed, MSI lost (Operation not permitted)
...

The last message repeats indefinitely, until I kill it.

@wkozaczuk
Copy link
Collaborator

wkozaczuk commented May 23, 2020 via email

@nyh
Copy link
Contributor Author

nyh commented May 23, 2020

gdb tells me we are stuck in address 0x000000000010100f. That's OSV_LZKERNEL_BASE + 0x1000 + 0xf.
I don't remember all the latest changes you did to the boot process, and what special significance this address has. I'll start investigating now, but may be have an idea?

@nyh
Copy link
Contributor Author

nyh commented May 23, 2020

According to arch/x64/lzloader.ld, OSV_LZKERNEL_BASE + 0x1000 is the beginning of the text segment of lzloader.elf.
objdump -d build/release.x64/lzloader.elf shows that 0x10100f is the middle of memset() which is how this elf starts. But this has not changed since Fedora 31, which also had memset() - with exactly the same assembly code - starting lzloader.elf, and uncompress_loader() only starts at 0x0010101c (and uncompress_loader() is marked as ENTRY in lzloader.ld).

@nyh
Copy link
Contributor Author

nyh commented May 23, 2020

I verified that the entry point in lzloader.elf (fastlz/lzloader.cc) is not a problem - the problem is the actual memset() function defined in lzloader.cc. I changed the order of the functions so that uncompress_loader() comes first and memset() comes second, and still gdb tells us we're hung in the memset() function.

@nyh
Copy link
Contributor Author

nyh commented May 23, 2020

Amazingly, a patch I wrote 3 years ago for #913 and didn't solve that issue, solves this one :-) I'll send a patch now.

@nyh nyh closed this as completed in f50218f May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants