Bug 225077 - [VIMAGE] lld-linked i386 VIMAGE kernel hangs on boot
Summary: [VIMAGE] lld-linked i386 VIMAGE kernel hangs on boot
Status: Closed Unable to Reproduce
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: i386 Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords: vimage
Depends on:
Blocks:
 
Reported: 2018-01-11 18:53 UTC by Ed Maste
Modified: 2018-05-28 19:42 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 2018-01-11 18:53:42 UTC
Details to be added after investigation; submitting this as a placeholder to track the issue.
Comment 1 Shawn Webb 2018-01-11 19:03:48 UTC
On what architecture? HardenedBSD has been using lld as the default linker on amd64 since March of 2017 (commit f38b51668efcd53b8146789010611a4632cafade). I've been using VIMAGE for multiple years. I haven't had a single issue.
Comment 2 commit-hook freebsd_committer 2018-01-11 19:09:03 UTC
A commit references this bug:

Author: emaste
Date: Thu Jan 11 19:08:43 UTC 2018
New revision: 327840
URL: https://svnweb.freebsd.org/changeset/base/327840

Log:
  Temporarily disable VIMAGE on i386

  An lld-linked i386 kernel hangs on boot, after em(4) starts.  This seems
  similar to the issue that prompted us to disable VIMAGE on arm64 in
  r326179.  Disable VIMAGE on i386 for now while we investigate.

  PR:		225077
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/sys/i386/conf/GENERIC
Comment 3 commit-hook freebsd_committer 2018-01-14 16:05:18 UTC
A commit references this bug:

Author: emaste
Date: Sun Jan 14 16:04:52 UTC 2018
New revision: 327969
URL: https://svnweb.freebsd.org/changeset/base/327969

Log:
  Enable VIMAGE in i386 GENERIC (revert r327840)

  We've switched back to ld.bfd on i386 for now.

  PR:		225077
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/sys/i386/conf/GENERIC
Comment 4 Ed Maste freebsd_committer 2018-04-15 01:12:31 UTC
(In reply to Shawn Webb from comment #1)
On i386, as in the summary line above.
Comment 5 Mark Johnston freebsd_committer 2018-05-22 15:57:40 UTC
I'm not able to reproduce this using bhyve with e1000 emulation. This is on HEAD as of about two days ago. I built the world using WITH_LLD_IS_LD= and WITH_LLD_BOOTSTRAP=. Is anyone else able to confirm that the bug is still present?
Comment 6 Bjoern A. Zeeb freebsd_committer 2018-05-22 16:22:14 UTC
(In reply to Mark Johnston from comment #5)

have you tried with epair built as module and loaded as module?
Comment 7 Mark Johnston freebsd_committer 2018-05-22 16:24:29 UTC
(In reply to Bjoern A. Zeeb from comment #6)
Loaded from loader.conf? I tried that, still no hang.
Comment 8 Mark Johnston freebsd_committer 2018-05-28 17:41:05 UTC
Still no luck with this one. I tested on a laptop as well with a variety of kernel configs. Is it possible that this has been fixed in one of the LLVM updates since the PR was submitted? Are there any special steps needed to reproduce the issue?
Comment 9 Ed Maste freebsd_committer 2018-05-28 18:39:23 UTC
It looks like the change to enable lld as the bootstrap linker on i386, and the revert thereof, happened before clang/llvm/lld 6.0 came to head. I am trying to reproduce locally now.
Comment 10 Ed Maste freebsd_committer 2018-05-28 19:42:01 UTC
I cannot reproduce this problem now.