[mlir][arith] Fix folds crashing on dynamic-shaped tensors (#212072)
`Builder::getZeroAttr` asserts when asked to build a constant of a
ranked tensor with a dynamic shape (`DenseElementsAttr` requires a
static shape). Three self-identity folds/patterns reached it without a
guard and aborted on dynamic-shaped operands:
```mlir
arith.xori %x, %x : tensor<?xi32>
arith.subui_extended %x, %x : tensor<?xi32>, tensor<?xi1>
arith.subi (arith.subi %a, %b), %a : tensor<?xi32> (SubISubILHSRHSLHS)
```
Guard each with a static-shape check (as `arith.subi(x,x)` already does)
so they leave the op unfolded instead of crashing. The TableGen pattern
gets a new `IsScalarOrHasStaticShape` constraint.
Signed-off-by: Víctor Pérez Carrasco <victor.pc.upm at gmail.com>
[ELF,SPARC] Support ABS and RELATIVE dynamic relocations (#212155)
... and test some previously uncovered GOT relocation types.
Test convention follows ppc32-*, which I added in 2019.
The SPARC psABI only defines Elf64_Rela. Add EM_SPARCV9 to getIsRela so
that dynamic relocations use .rela.dyn/.rela.plt instead of the
unsupported SHT_REL form.
Co-authored-by: Kirill A. Korinsky <kirill at korins.ky>
Co-authored-by: Kirill A. Korinsky <kirill at korins.ky>
sysutils/goreman: New port: Foreman clone written in go language
Goreman is a Go-based clone of Foreman designed to manage and run
applications based on a Procfile. It reads process definitions,
spawns each command, aggregates standard output streams with prefixed
tags, and forwards signals (such as SIGINT, SIGTERM, and SIGHUP)
down to all managed child processes.
WWW: https://github.com/mattn/goreman
Update to py-steam 1.5.3, unbreaking the auth process that changed on
Steam in June. This led to steamctl stating "Invalid password" - now
resolved with this update.
Includes a fix for outdated protobuf API that is hit.
rust197: complete the transition to the "new fix" for the memchr crate.
Apply the vector.rs patch consistently also to the 2.7.4 memchr crate,
so that we do not get checksum conflicts for files in newer crates
which are un-changed from 2.7.4 with the older set of patches.
Should complete the fix of https://github.com/rust-lang/rust/issues/159919.
cam/cd: avoid integer divide fault in cdstart()
If something goes very badly (e.g. forcibly removing a medium while
the OS tries to start it), this could end up in params.blksize being 0
(and params.disksize 1). Avoid an integer divide fault, panicking the
kernel, by bailing out before.
MFC after: 3 days
Relocate migrated container origins out of legacy .ix-virt
## Problem
Incus containers are ZFS clones of an image snapshot. The incus->container auto-migration relocated each container from `<pool>/.ix-virt/containers/<name>` to `<pool>/.truenas_containers/containers/<name>` with a bare `zfs rename` and did nothing else. A `zfs rename` does not change a clone's `origin`, so a migrated container stayed a clone of a snapshot still living inside `.ix-virt`. `.ix-virt` was visible in the UI and not delete-guarded, so deleting it recursively destroyed those origin snapshots and cascaded into the dependent migrated clones — silently destroying migrated containers.
## Solution
Relocate each container's origin image dataset out of `.ix-virt` before renaming the container, so no migrated container depends on anything under `.ix-virt`. Once relocated the image stays put for good, exactly like a natively pulled one — reclaiming either is the job of the `container.image.*` management API landing separately in this release, not of this fix.
- **Shared relocation helper** — `container.relocate_container_origin` reads a container's live `origin`; if it points at an image under `.ix-virt/images` or `.ix-virt/deleted/images`, it sets `canmount=noauto` on that image dataset and then renames it into the native `.truenas_containers/images/` tree. The rename goes last so it is the single atomic commit point: the image is either wholly still in `.ix-virt` or wholly relocated, never half-way, and the helper's return value describes reality. All fan-out clones auto-repoint on the rename; an origin already outside `.ix-virt` is left alone; a relocation failure leaves the container wholly inside `.ix-virt` (best-effort, skip).
- **Migration path** — the incus->container migration calls the helper immediately before renaming each container, and skips any container whose base image cannot be relocated.
- **Repair migration** — new `0020_repair_incus_clone_origins` runs the same relocation over existing `container.container` rows for systems that already ran the old migration.
- **Delete guard** — `.truenas_containers` is added to `INTERNAL_PATHS` so it cannot be deleted out from under running containers; the plugin's own snapshot/clone/destroy calls that touch it now pass `bypass=True`.
- **Safer deletion** — `do_delete` destroys the dataset first (recursively, matching the apps stack, so a container that has snapshots is deletable) and removes the database and libvirt records only once the dataset is confirmed gone, so a failed destroy never orphans the dataset with no row pointing at it; an already-missing dataset is tolerated so a container whose data was lost to the old cascade can still be removed cleanly.
- **Active-instance guards** — deleting or renaming a container that is not stopped (running or suspended) is refused; delete additionally accepts `force=True`, which stops it first, mirroring the VM delete flow. The container status model now includes the `SUSPENDED` state it can actually report.
- **Delete locking** — delete becomes a job so it can stop the container and wait on the destroy, and its lock is keyed per container id: a constant lock string would hit `@job`'s default `lock_queue_size` of 5 and, past five queued deletes, silently fold a new request into a queued delete of a *different* container and hand that job back to the caller, who would then see SUCCESS for a container nobody deleted.
[libc][test][NFC] Fix compiler warnings in libc tests (#212100)
Resolved compiler warnings in several libc unit and integration tests:
- Fixed -Wmissing-designated-field-initializers in localtime_r_test.cpp
by using zero-initialisation instead of partial designated initialisers.
- Fixed -Wimplicit-int-conversion in sigaltstack_test.cpp by explicitly
casting the loop index to uint8_t.
- Fixed -Wunused-parameter in pthread_barrier_test.cpp by omitting
unused parameter names in function definitions.
Assisted-by: Automated tooling, human reviewed.