[ORC] Shutdown the socket FD before closing it in FDSimpleRemoteEPCTransport (#196835)
It is totally possible that when
`FDSimpleRemoteEPCTransport::disconnect` is called,
`FDSimpleRemoteEPCTransport::listenLoop` is still reading on the socket
FD the former is closing. On Linux, closing a socket FD when it is being
read by another thread is an undefined behavior I believe. And on modern
kernels, the reading thread will not be waken up, so `listenLoop` will
be blocked forever and preventing the process from exiting.
This patch fixes this issue by calling `shutdown(2)` on the socket FDs
before closing them.
Update `memset.inline` third argument documentation (#199725)
Similar to `memcpy.inline`, `memset.inline`'s size argument doesn't need
to be a constant. Checked by the test
Transforms/PreISelIntrinsicLowering/X86/memset-inline-non-constant-len.ll.
[lld][MachO] Preserve __eh_frame ordering during BP section sorting (#191412)
The Balanced Partitioning section orderer collects all live
`ConcatInputSection`s as candidates for content-similarity reordering.
This includes `__eh_frame` CIE and FDE records, which have internal
ordering constraints: each FDE contains a backward-relative 32-bit
offset to its parent CIE, requiring CIEs to precede their FDEs.
When the BP orderer assigns priorities to `__eh_frame` subsections and
`Writer.cpp` sorts by those priorities, FDEs can end up before their
parent CIEs. The resulting CIE-pointer offsets resolve correctly with
32-bit wrapping arithmetic but underflow with 64-bit pointer arithmetic,
causing DWARF consumers (crash reporters, debuggers) to silently lose
unwind data.
## Fix
Have the BP orderer skip the Mach-O `__TEXT,__eh_frame` section
explicitly before collecting candidate subsections, preserving the
[72 lines not shown]
[VPlan] Thread scalar types through VPInstruction and VPPhi. (NFC) (#199378)
Update VPInstruction and VPPhi to populate VPSingleDefValue's scalar
type. For most opcodes, the scalar type is determine from the operands,
via computeScalarTypeForInstruction, which roughly matches to removed
inference code. For some opcodes, like FirstActiveLane, the type must be
provided explicitly.
PR: https://github.com/llvm/llvm-project/pull/199378
nlist.3: Replace a.out(5) Xref with elf(5)
ELF support was added to nlist() in 1997, and a.out support was removed
in 2020. The man page was not updated for either of these changes.
Fixes: 77909f597881 ("Initial elf nlist support, ...")
Fixes: 86cfa7e70b2b ("nlist: retire long-obsolete aout support")
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 876a17321c896427d70de94101df4d888a19189b)
struct nlist is documented in both a.out(5) and stab(5), so add an Xref
to the latter.
(cherry picked from commit 762e451b318c8cbfddbcaaa92a218e8b45306eb9)
nlist.3: Clarify which symbol table is used
nlist() requires section headers, and currently fetches symbol names
only from SHT_SYMTAB,
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57065
(cherry picked from commit cd6bf930eafe850dc631feeaf8332832601f4225)
nlist.3: Add discouraged use notice
It is a relic from a.out days and is poorly specified. Although ELF
support was added to nlist, there are better ways to access ELF data.
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57078
(cherry picked from commit 94b7a335683abcbcd76e8b67d37e21271d81590c)
[libc++] Use __in_out_result in the remaining appropriate algorithms (#198156)
We've already switched some algorithms to use `__in_out_result` instead
of `pair` as the return type. This updates the remaining appropriate
algorithms.
NAS-141173 / jbof: recover drive slots missing from fabric discovery
After hardwire_host succeeds, query the NVMe-oF discovery log from
each controller's configured fabric paths and compare to the BMC's
drive list. Any slot reported by the BMC as Enabled with an Endpoint,
but absent from at least one controller's discovery output, is
power-cycled via Drive.Reset (ForceOff then On) before attach_drives
runs.
HA-aware: the active controller queries discovery locally and via
failover.call_remote against the standby, unioning the missing-NQN
set so a slot only visible to the standby's view is still recovered.
Recovery actions run on the active only; Drive.Reset is global to the
slot so both controllers see the re-registered NQN on the next
attach_drives.
Adds four private methods:
- list_drive_slots_with_endpoints
- reset_drive_slot
[8 lines not shown]
NAS-141173 / jbof: retry hardwire_host with fabric-card reset on failure
When jbof.create or jbof.update cannot validate communication with the
expansion shelf on the first attempt, parallel-reset both IOMs' fabric
cards via the Oem NetworkAdapter.Reset Redfish action and retry
hardwire_host once.
Each reset returns when the BMC reports the restart complete (~28s
each, issued in parallel). A 30-second post-reset settle is added to
give the fabric data plane time to start answering ARP/NDP before the
retry validates again.
The retry path is gated on at least one initiator-side path having
failed to validate. On hosts that succeed on the first attempt, the
reset code is not reached and behavior is unchanged.
HA: the retry runs once on whichever controller invoked the create.
The fabric-card reset is global to the IOM, so a single reset benefits
both controllers' paths to that IOM.
[2 lines not shown]
Improve system dataset moves
* Use FD-based mount APIs for moving around system datasets
* Use zfs send/recv for shifting system datasets between pools
* Use mounting beneath + unmounting on top combined with
stopping / starting services to ensure that we're as close as
possible to being atomic with these moves.