Bug 246924 - emulators/qemu-devel: miscompilation with llvm
Summary: emulators/qemu-devel: miscompilation with llvm
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-01 21:44 UTC by Edward Tomasz Napierala
Modified: 2020-07-10 15:39 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (bofh)


Attachments
patch for ports/qemu-devel (970 bytes, patch)
2020-06-02 15:33 UTC, Edward Tomasz Napierala
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Edward Tomasz Napierala freebsd_committer 2020-06-01 21:44:18 UTC
It looks like compiling qemu with LLVM (tested with 13-CURRENT, installed from package) results in a slight miscompilation.  It manifests in FreeBSD/powerpc64 failing to complete the kyua test suite on http://ci.FreeBSD.org due to an unkillable process, see eg https://ci.freebsd.org/job/FreeBSD-head-powerpc64-test/3/console.  Building emulators/qemu-devel with gcc9 instead of LLVM results in a binary that can successfully complete those tests, with the same root filesystem image.

My suggestion would be to build with GCC for the time being.
Comment 1 Edward Tomasz Napierala freebsd_committer 2020-06-02 15:28:03 UTC
This also fixes what could be described as a "general flakiness" with riscv64 kyua runs, and seems to fix three failing cases on aarch64.
Comment 2 Edward Tomasz Napierala freebsd_committer 2020-06-02 15:33:17 UTC
Created attachment 215170 [details]
patch for ports/qemu-devel
Comment 3 Muhammad Moinur Rahman freebsd_committer 2020-06-02 22:15:16 UTC
Hi,
Can you just let me know like how trivial is this patch at this moment? Right now I was actually working on putting qemu-devel into 5.X branch. But it looks like there are some roadblocks due to bug #245677. But if it is trivial and urgent for our infrastructure I will test and commit ASAP.
Comment 4 Edward Tomasz Napierala freebsd_committer 2020-06-02 22:22:15 UTC
We're still waiting for the new machine to be commissioned to run those tests, and for my own purposes I just keep my own patched port - so while it's useful, it can probably wait a week or so?

As to being trivial - I hadn't ran this patch through poudriere, but other than that, yes, it's a pretty trivial change.

I wonder... do you a working (even if unfinished) port for the new qemu I could try?

Thanks!
Comment 5 Muhammad Moinur Rahman freebsd_committer 2020-06-02 22:40:08 UTC
(In reply to Edward Tomasz Napierala from comment #4)
Hi,
In that case I will try to wait a bit.

If you want to play around you can get the qemu50 patch from here:
http://pdr.bofh.network/dists/qemu50.patch

This has some error related to the bug mentioned other wise it builds fine.

I am just unsure about whether if they are going to push 4.2.X into stable or not. That's another reason for awaiting. If they push it then the case will be qemu will be moved to qemu41 and upgraded to 4.2.X branch while qemu-devel will be simply upgraded to 5.0.X branch. But do let me know if the patch starts getting trivial and requires urgent commit.
Comment 6 Edward Tomasz Napierala freebsd_committer 2020-06-03 12:03:44 UTC
Please hold off with this patch.  There's something fishy going on; I'll follow up shortly.
Comment 7 Edward Tomasz Napierala freebsd_committer 2020-06-03 12:04:59 UTC
(I mean, please hold off with _my_ patch, the one that switches to gcc.)
Comment 8 Muhammad Moinur Rahman freebsd_committer 2020-06-03 17:02:07 UTC
(In reply to Edward Tomasz Napierala from comment #7)
Noted.
Comment 9 Muhammad Moinur Rahman freebsd_committer 2020-06-23 23:53:40 UTC
Any updates on this or did you try qemu50? I am planning for a repo of qemu-devel to qemu42 and updating qemu-devel to 5.X branch.
Comment 10 Edward Tomasz Napierala freebsd_committer 2020-06-24 12:11:30 UTC
I can't reproduce the original fix.  Either I got incredibly lucky, or there is something else that I'm missing.

Please go ahead with qemu50.  In any case it's better to work with more up to date version.