Bug 253375 - emulators/qemu-user-static: causes build failure in games/dobutsu while running xz(1)
Summary: emulators/qemu-user-static: causes build failure in games/dobutsu while runni...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kyle Evans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-09 15:04 UTC by Robert Clausecker
Modified: 2021-02-26 04:56 UTC (History)
3 users (show)

See Also:


Attachments
build log (17.40 KB, text/plain)
2021-02-09 15:04 UTC, Robert Clausecker
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker freebsd_committer freebsd_triage 2021-02-09 15:04:31 UTC
Created attachment 222293 [details]
build log

It appears that games/dobutsu fails to build due to a spurious emulation problem when xz(1) is running.  The same problem does not occur when building the port natively (on an RPi 2B running FreeBSD 12.2).  Kyle Evans suggests this might be an emulation problem.  A build log is attached, more can be found here:

https://portsfallout.com/fallout?port=games%2Fdobutsu%24
Comment 1 commit-hook freebsd_committer freebsd_triage 2021-02-26 04:53:32 UTC
A commit references this bug:

Author: kevans
Date: Fri Feb 26 04:53:22 UTC 2021
New revision: 566578
URL: https://svnweb.freebsd.org/changeset/ports/566578

Log:
  emulators/qemu-user-static: update to f7fd10d7677c

  This features a number of fixes; highlights:
  - Handle aarch64 YIELD instructions
  - Bump ARG_MAX to match the FreeBSD default on LP64 platforms
  - Implement __specialfd(2) and copy_file_range(2)
  - Style fixes
  - Fix an issue with binary execution[0]
  - Fix page fault handling for self-modifying binaries[1]
  - Suppress noise from CIOGSESSION usage and restore CRIOGET handling
  - Patch _umtx_op(2) through to the kernel where possible[2]

  [0] Attempting to execute a binary by name was broken when there was an
  unrelated entry by the same name in PWD.  The report below observed it in the
  cluster while building games/dobutsu, which tried to execute `xz` in a directory
  that had an `xz` directory inside of it.

  [1] From the fixing commit, qemu mprotect()s pages contained translated code
  to PROT_READ | PROT_EXEC and upgrades protections as needed upon page fault.
  This was broken in a previous commit that misidentified by the trap # that
  should have been observed.  The observed issue a broken JIT compiler in
  libpcre.

  [2] _umtx_op can now be handled by the kernel in cases where the target long
  size is not longer than the host, and the target and host are the same
  endianness.  This is much more reliable than our previous emulation of these
  operations, and should reduce hangs sometimes observed in threaded applications.
  Note that this requires a recent stable/12 or 13.x/-CURRENT.

  PR:		253375 [0]
  PR:		253335 [1]
  MFH:		2021Q1

Changes:
  head/emulators/qemu-user-static/Makefile
  head/emulators/qemu-user-static/distinfo
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-02-26 04:54:33 UTC
A commit references this bug:

Author: kevans
Date: Fri Feb 26 04:54:03 UTC 2021
New revision: 566579
URL: https://svnweb.freebsd.org/changeset/ports/566579

Log:
  MFH: r566578

  emulators/qemu-user-static: update to f7fd10d7677c

  This features a number of fixes; highlights:
  - Handle aarch64 YIELD instructions
  - Bump ARG_MAX to match the FreeBSD default on LP64 platforms
  - Implement __specialfd(2) and copy_file_range(2)
  - Style fixes
  - Fix an issue with binary execution[0]
  - Fix page fault handling for self-modifying binaries[1]
  - Suppress noise from CIOGSESSION usage and restore CRIOGET handling
  - Patch _umtx_op(2) through to the kernel where possible[2]

  [0] Attempting to execute a binary by name was broken when there was an
  unrelated entry by the same name in PWD.  The report below observed it in the
  cluster while building games/dobutsu, which tried to execute `xz` in a directory
  that had an `xz` directory inside of it.

  [1] From the fixing commit, qemu mprotect()s pages contained translated code
  to PROT_READ | PROT_EXEC and upgrades protections as needed upon page fault.
  This was broken in a previous commit that misidentified by the trap # that
  should have been observed.  The observed issue a broken JIT compiler in
  libpcre.

  [2] _umtx_op can now be handled by the kernel in cases where the target long
  size is not longer than the host, and the target and host are the same
  endianness.  This is much more reliable than our previous emulation of these
  operations, and should reduce hangs sometimes observed in threaded applications.
  Note that this requires a recent stable/12 or 13.x/-CURRENT.

  PR:		253375 [0]
  PR:		253335 [1]

Changes:
_U  branches/2021Q1/
  branches/2021Q1/emulators/qemu-user-static/Makefile
  branches/2021Q1/emulators/qemu-user-static/distinfo
Comment 3 Kyle Evans freebsd_committer freebsd_triage 2021-02-26 04:56:00 UTC
Thanks for the report!