pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/p5-IPC-Shareable
Module Name: pkgsrc
Committed By: wen
Date: Mon Oct 5 02:19:49 UTC 2026
Modified Files:
pkgsrc/devel/p5-IPC-Shareable: Makefile distinfo
Log Message:
Update to 1.19
Upstream changes:
1.19 2026-07-06
- Fix mass CPAN tester FAILs on OpenBSD (29 of 32 reports for 1.18): the
smoker host's 10 SysV semaphore-set slots (kern.seminfo.semmni=10) were
pre-exhausted by stale sets leaked from previously crashed runs, so
nearly every tie died with semget ENOSPC ("Could not create semaphore
set: No space left on device"), and each failing run leaked further
resources
- _tie(): an IPC_PRIVATE segment is now removed when semaphore-set
creation (or the initial lock) fails. shmget(IPC_PRIVATE) always
creates a fresh segment regardless of the 'create' attribute, and a
private segment is unreachable by key after the croak, so it leaked
invisibly (~4 segments per failed suite run on the wedged smoker)
- clean_up_testing(): added a second pass that reclaims orphaned
testing-tagged semaphore sets whose segment is already gone; these pin
a SEMMNI slot forever and were invisible to the ipcs -m based scan.
New regression test t/82-stale-ipc-reclaim.t
- t/00-base.t: reclaim a stale async_tests pair by name (pre-1.18
leftovers have 4-slot, unmarked semaphore sets that clean_up_testing()
cannot prove ownership of), and make the end-of-file segment count
adaptive for the attach case, fixing the off-by-one failure when a
stale async_tests segment existed
- t/IPCShareableTest.pm: added free_sem_sets() and
require_free_sem_sets($n) (default 8); the 26 tie-heavy test files
that FAILed on the wedged smoker now skip_all cleanly when the host
lacks free semaphore sets, instead of croaking mid-run and leaking
- t/24-lock_fork_blocking.t: replace the fixed 0.28s lock-wait floor
with one computed from when the parent actually issued the lock call;
on loaded smokers the parent could be descheduled past the child's
0.3s hold window, failing with waits of 0.000s (seen on Linux testers)
- t/19-lock_recursive.t: hold locks until the probing process signals
its LOCK_NB probes are done (second pipe), instead of for a fixed
0.3s/0.5s window; the FreeBSD 15 tester FAILs for 1.18 ("3-level:
level-2 grandchild LOCK_EX|LOCK_NB blocked") were this race
- t/20-lock_operation.t: replace the create-3-probe-sets resource check
with require_free_sem_sets(); the old probe's skip path still exited
255 on resource-starved smokers, and consumed scarce sets to probe
- sysv_info(): recognize MidnightBSD and NetBSD (kern.ipc sysctls, both
':' and '=' output separators); NetBSD's semmni also defaults to 10,
so the test suite's free-set guard now activates there too
1.18 2026-06-08
- Fix intermittent CPAN failures under parallel smokers, which assumed
exclusive use of System V IPC. Added t/IPCShareableTest.pm (unique_glue,
assert_clean, assert_clean_process, live_seg_count) and moved the fork
tests (t/18, 19, 24, 26, 28, 32, 44) to per-run keys with run-scoped
cleanup checks
- t/26-ipcav.t and t/38-lsync.t: replace the racy SIGALRM/sleep handshake
(lost-wakeup; could hang under smokers or emulation) with a two-pipe
handshake
- t/47-seg_size.t: skip the "size > max RAM must croak" check on 32-bit
size_t, where the size wraps to an allocatable value and the tie succeeds
- Replace global seg_count()/sem_count() cleanup checks with a
process-scoped assert_clean_process(); the suite now passes under
`prove -j4`. t/00-base and t/99-end keep a global count check, serial-only
- Re-key ~30 more tests with per-run keys so concurrent runs can't collide.
t/06-key stays serial-only (it pins the key-generation algorithm)
- clean_up_testing() now removes only segments the caller created or whose
creator has exited, leaving another live process's segments alone -- safe
under `prove -j` and concurrent smokers
- Tied SCALARs holding a plain (non-reference) value now store it verbatim
rather than JSON/Storable-wrapping it; references still share their
structure as before. (Numbers read back in string form, but still compare
equal numerically)
- Fix a shared-memory segment leak when a tie created its segment but failed
to set up its semaphore (eg. ENOSPC) or acquire its initial lock: the
segment (and any semaphore set we created) is now removed before croaking,
which still reports the underlying cause
- Make the suite resilient on hosts with a small semaphore budget (eg.
OpenBSD, semmni=10): t/94 and t/95 release their IPC between steps there.
Adds sem_set_limit/low_sem_resources/relieve_ipc_pressure helpers, plus
t/96 and t/97
- Tolerate a semaphore set removed by another process (EINVAL on the next
operation), the cause of intermittent CPAN-tester failures on heavily
parallel smokers. _write_permitted() now skips its advisory lock check
when getval() returns undef (it had been emitting "uninitialized value
in numeric gt" warnings), and unlock() warns once and continues rather
than croaking "Could not release semaphore lock". Adds
t/81-sem-removed-under-lock.t
- Finish migrating the forked tests off the lost-wakeup SIGALRM/sleep
handshake (which could hang a smoker or desync the processes): t/03, 18,
28, 30, 36, 66 and 85 now use a shared pipe-barrier helper
(barrier_new/barrier_wait/barrier_release in t/IPCShareableTest.pm)
1.17 2026-05-31
- POD enhancements regarding testing_set() and clean_up_testing()
- Test VM enhancements (now allows Async::Event::Interval to piggy back
them)
- sysv_info() now reports semaphore limits (semmni, semmns, semmsl, semopm)
alongside the shm* keys on FreeBSD, Linux, macOS, and OpenBSD; lets
tests size themselves to the platform's kern.ipc.semmni budget
- FreeBSD CI: pre-test IPC cleanup widened to non-system users and root;
optional IPC_DEBUG_DELTAS=1 enables per-file leak detection
- Fix CPAN test failures on Mock::Sub 1.08 (t/20, t/60, t/68; t/85 had the
same latent issue): those tests mocked subs with 'return_value => undef',
but Mock::Sub 1.08 returns the sub's call args (not undef) in that case,
so the croak/warn-on-undef paths under test never fired. Replaced those
mocks with block-scoped local typeglob overrides that return undef
directly, and raised the Mock::Sub build prereq to 1.09
1.16 2026-05-27
- POD: Promoted the signal handling note into its own section under
DESTRUCTION
- Fully implement Dragonfly BSD unit test VM infrastructure
- Fix shmid_ds unpack for Dragonfly BSD
- Prevent macOS extended attributes from leaking into dist tarballs
1.15 2026-05-26
- Refactor how we initialize $VERSION. It's no longer in a BEGIN block. That
broke Dist::Mgr
- Fixes #60: Fix FETCH deadlock when inner child re-decode acquires SH lock
against LOCK_EX cascade held by _lock_children
- Fix OpenBSD 64-bit shmid_ds binary layout (verified via offsetof on 7.4):
segsz is int (4B not 8B), nattch is short (2B), and struct has nanosecond
fields between time_t values. Updated t/80-SharedMem.t synthetic test and
shm_segments() segsz extraction to match.
- Added OpenBSD test VM infrastructure
- t/20-lock_operation.t: probe for adequate semaphore resources before
running, skip gracefully on low-limit platforms (OpenBSD semmni=10).
Added periodic _end() cleanup calls so peak semaphore usage stays within
the default limit on OpenBSD.
- Added 'testing' flag; allows bulk cleanup of leaked segs/sems from a
previous test run. This was implemented in this distribution's unit test
suite
- Fix t/80-SharedMem.t: skip 64-bit tests on 32-bit Perl where the 'q' pack
template is unavailable (Raspian OS specifically)
1.14 2026-05-22
- Modify remove() to properly catch a non "0 but true" case when trying
to destroy segments and semaphores so warnings are displayed properly
- remove() now leaves the global and process registers intact if the destroy
operation fails
- Rename _mg_tie() to _magic_tie()
- Rename _is_kid() to _is_child()
- In IPC::SharedMem, removed leading underscore from object attributes
- Parameter list in IPC::SharedMem::new() is now in the form of a hash
- Code refactoring in IPC::SharedMem
- Add POD for IPC::SharedMem
- SharedMem::remove() now returns 1 on '0 but true' and 0 otherwise
that was preventing matches from happening, and broke JSON
- ipcs() now ignores lines that don't include an actual key
- Add data() method to SharedMem. This strips off the NULL pad bytes from
shmread()
- Added key_hex() to SharedMem. Will allow for easier troubleshooting when
using ipcs (closes #32)
- Added SharedMem::stat(); returns a new object that contains the related
info about the actual shared memory segment
- Fixes #49; Logic error from old implementation of JSON
- Fixes #47; Clean up broken code in old _decode_json()
- Fixes #41; JSON serializer not handling nested data structures properly
- Closes #52; Add tests and POD for SharedMem::stat struct methods
- Added SharedMem::stats(), return an href of all segment stats
- Closes #48; All tests now run unconditionally; there is no more
CI_TESTING flag required
- Greatly simplify the FIRSTKEY and NEXTKEY shared hash ops; removed the
_iterating flag complexity and replaced it with an _hkey_list instead
- Fixes #38; Fixed issue where the global_register was not being populated
if a data access hadn't happened yet, causing leaked segments upon
cleanup. This fix eliminated the weird 'Dumper' hack
- Add new scripts/flush_ipc.sh script that cleans out all segments and
semaphores from the system for the current user
- Closes #28; Add link to Script::Singleton in singleton() POD
- Closes #24; lock() now allows a cref parameter. If a LOCK_EX lock can be
acquired, we will set the lock, execute the subroutine, then release the
lock
- 'tidy' attribute now defaults to true
- All unit tests do a check for leaked segments and semaphores at their
conclusion. Also, when running 'make test' it compares the numbers before
and after and doubly makes sure there are no leaks
- Closes #51; Better document that the 'size' attribute is for each segment,
and not the overall size of all the data. Also emphasize that each nested
data structure requires an additional segment, they aren't all stashed
into a single one
- Added uuid(), sets an internal UUID for each tied object (primarily used
for troubleshooting)
- Fixes #50; Added enforced locking, with optional warning
- Correct five areas in clean/delete routines where segments may have been
able to leak
- Removed redundant _global_register checks in STORE, FETCH, PUSH; _tie()
already registers unconditionally
- Add ref() check before _is_child(); skips the function call reftype()
entirely for plain scalar values in FETCH, CLEAR, and DELETE
- Add ref() check before _need_tie(); same pattern in all three STORE
branches
- _type_int numeric dispatch; string eq comparisons on every operation
replaced with == against integer constants in STORE, FETCH, and CLEAR
- Major POD enhancements/cleanup
- Renamed ipcs() to seg_count() as it's far more explanatory
- Add new method sysv_info() which if the system provides it, retrieves all
information related to the SYSV infrastructure (limits etc)
- Closes #45; We now accept a hex-based value as the key
- Added shm_segments(); fetches raw data about all segments that had been
created by this distribution
- Added unknown_segments(); returns an aref of all segment keys (in hex
string format) for segments we've created but are no longer registered to
any known process
- Closes #39; remove() now accepts a key, and can remove the segment and
semaphores related to that key, even if it isn't related to this
distribution
- Updated CI so we get a test run on an i386 Ubuntu container to test
32-bit platforms
- Fix issue when using JSON serializer where it wasn't properly handling
scalar references properly (eg. creating a tie with a hashref)
- Enhanced much of the test suite to test both Storable and JSON serializers
- Much work in order to add provisions so that shm counting and tracking
works on FreeBSD
- Add FreeBSD VM config and unit test runner in ci/ dir
- Removed the archaic _debug() and _trace functions
- Enhanced 'protected' segments; we now use a semaphore to mark a segment as
protected (SEM_PROTECTED), and all processes that load this segment will
inherit the protected status
- Add sem_map(); outputs a text representation of the segment/semaphore
mappings
- Added consistent naming for all four semaphores: SEM_EXISTS, SEM_READERS,
SEM_WRITERS, and SEM_PROTECTED
- Default serializer now JSON; Added check for backwards compatibility that
if JSON _decode() fails, we then attempt a Storable _thaw()
- Added sem_count(); behaves like seg_count() but for semaphores. Also
updated tests to ensure no straggling semaphores are left behind
- All LOCK_EX and LOCK_SH locks are now applied to all child segments when
the lock is first instantiated on the tied object. Both of them are rolled
out in reverse order from the lowest-level child upwards when the lock is
released
- New attributes for updated locking mechanisms: enforced_write_locking,
enforced_read_locking, violated_write_lock_warn and
violated_read_lock_warn. All enabled by default
- Fixes #11; On non-English locales on perl 5.20 and below, checking $! for
strings in certain cases was failing and sending code down the wrong path.
The fix was to replace the comparisons with $!{ERRNO_CONST} variables
instead (eg. $!{EEXIST}, $!{ENOMEM}, $!{ENOSPC}) which are
locale-independent
- Add Solaris (including OmniOS/illumos) support for shm_segments(),
seg_map(), and SharedMem stat()/stats() methods by providing
Solaris-specific shmid_ds unpack templates
- Add explicit use Errno so that $!{ENOMEM} and $!{EEXIST} checks work
reliably on all platforms (Solaris Perl builds did not populate these
keys in the %! tied hash without the module loaded)
- Complete VM unit testing framework with scripts and README for FreeBSD,
Linux i386 and Solaris (32 and 64 bit)
- Replace regex-based null-byte stripping in SharedMem::data() with more
efficient index+substr
- SharedMem::stats() now calls stat() once and reuses it, avoiding 11
redundant shmctl(IPC_STAT) syscalls
- _encode_json_prepare() now short-circuits for structures with no
IPC::Shareable child refs, avoiding a full hash/array copy on every encode
- _decode_json_restore() hoists ref($prev) checks outside hot loop
- Added XS implementation of _is_child() for faster child-knot detection;
falls back to pure Perl _is_child_pp() if the compiled XS can't be loaded.
The XS function _is_child_xs inspects SV magic directly in C, avoiding
Scalar::Util::reftype, tied(), and ref() calls
- Added t/75-is_child_xs.t to test both XS and pure-Perl _is_child paths
- Added IPC_SHAREABLE_NO_XS env var to force pure-Perl mode for verifying
operation on systems without a C compiler
- Eliminated redundant second ipcs -m shell-out in seg_map(); get id mapping
from shm_segments() result instead
- Replaced all backtick shell-outs with open('-|', @cmd) pipe-open to bypass
/bin/sh and halve the fork count
- Rewrote _lock_children() from recursive to iterative (manual stack) to
eliminate Perl call-stack overhead on deeply nested structures; simplified
interface returns an arrayref instead of passing accumulator/seen refs
- Fix STORE child-segment leak: old child references were silently
discarded without removing shm segments/semaphores. STORE now calls
_remove_child() before overwriting. Extracted the common pattern into
_remove_child() to deduplicate across DELETE, CLEAR, and STORE.
- Remove the 'tidy' attribute and _reset_segment() internals. The STORE fix
made _reset_segment() a no-op that only produced double-removal warnings.
- Fix t/25-fetch_read_warn.t pipe synchronization so the parent blocks until
the child confirms LOCK_EX, instead of a blind sleep
- shm_segments() now probes the 14-byte 'IPC::Shareable' tag before pulling
the full segment into Perl, avoiding gigabyte allocations for foreign segs
- Drop unconditional use-time srand(); _shm_key_rand collisions are already
caught by the IPC_EXCL re-check loop, so reseeding callers' RNG is needless
- Remove redundant Data::Dumper imports from Shareable.pm and SharedMem.pm
- Fix _shm_key() off-by-one: overflow-correction now triggers on
crc32 == MAX_KEY_INT_SIZE, making the post-subtraction key==0 croak
actually reachable
- Test coverage additions: unknown_segments() via fork+exit, sysv_info() on
Solaris, JSON->Storable carp format, both write-lock flags disabled,
_shm_key() key==0 croak (Mock::Sub on crc32), IPC_PRIVATE + JSON nested
tie, STORE scalar-ref over previous \$undef
- Fix t/73-internal.t cross-version: qr// reftype differs between 5.10 and
5.12+, so use a CODE ref to exercise the _encode_json_prepare fallthrough
- Bump prereq of Test::More to 0.98 due to 5.10.1 using 0.94 by default
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 pkgsrc/devel/p5-IPC-Shareable/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/devel/p5-IPC-Shareable/distinfo
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/p5-IPC-Shareable/Makefile
diff -u pkgsrc/devel/p5-IPC-Shareable/Makefile:1.39 pkgsrc/devel/p5-IPC-Shareable/Makefile:1.40
--- pkgsrc/devel/p5-IPC-Shareable/Makefile:1.39 Thu Jul 16 19:02:40 2026
+++ pkgsrc/devel/p5-IPC-Shareable/Makefile Mon Oct 5 02:19:49 2026
@@ -1,16 +1,17 @@
-# $NetBSD: Makefile,v 1.39 2026/07/16 19:02:40 wiz Exp $
+# $NetBSD: Makefile,v 1.40 2026/10/05 02:19:49 wen Exp $
-DISTNAME= IPC-Shareable-1.13
+DISTNAME= IPC-Shareable-1.19
PKGNAME= p5-${DISTNAME}
-PKGREVISION= 3
CATEGORIES= devel perl5
-MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=IPC/}
+MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=../../authors/id/S/ST/STEVEB/}
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= https://metacpan.org/release/IPC-Shareable
COMMENT= Tie a variable to shared memory
LICENSE= gnu-gpl-v2
+EXTRACT_USING= gtar
+
DEPENDS+= p5-String-CRC32>=0:../../textproc/p5-String-CRC32
PERL5_PACKLIST= auto/IPC/Shareable/.packlist
@@ -18,11 +19,9 @@ PERL5_PACKLIST= auto/IPC/Shareable/.pac
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "NetBSD"
-# The tests hang on NetBSD 9.2, both as unprivileged user and as root.
-# The last words are:
+# The tests failed on NetBSD, because:
+# 'sysv_info() returns undef on unsupported platform (netbsd)'
#
-# t/25ipc.......Could not create semaphore set: No space left on device
-# at t/25ipc.t line 37
TEST_TARGET= # disabled
.endif
Index: pkgsrc/devel/p5-IPC-Shareable/distinfo
diff -u pkgsrc/devel/p5-IPC-Shareable/distinfo:1.9 pkgsrc/devel/p5-IPC-Shareable/distinfo:1.10
--- pkgsrc/devel/p5-IPC-Shareable/distinfo:1.9 Sun Dec 17 03:41:36 2023
+++ pkgsrc/devel/p5-IPC-Shareable/distinfo Mon Oct 5 02:19:49 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.9 2023/12/17 03:41:36 mef Exp $
+$NetBSD: distinfo,v 1.10 2026/10/05 02:19:49 wen Exp $
-BLAKE2s (IPC-Shareable-1.13.tar.gz) = 9b1759e1da92bc0b77970eaee45a852c7f8f493b2e2e6bc8f826cb257045351d
-SHA512 (IPC-Shareable-1.13.tar.gz) = c7559f41131b27da31bf0acba0ac0b2bb4424c516325b2e65892dff89d9b8362367e5e74edc93ac2df370a2ab74c8397e83eb73c4144ab25baf1997c4d76651b
-Size (IPC-Shareable-1.13.tar.gz) = 51682 bytes
+BLAKE2s (IPC-Shareable-1.19.tar.gz) = f145d75f92f57c407828b2bfd4e9da2e3fd27db880eefced75f559dd1aa78b0a
+SHA512 (IPC-Shareable-1.19.tar.gz) = e3065c694bf08e78b80f2886ab2346ee64299eff8751845df1fbbf3c72021f3cf7979510ae2c2ce535b973f55f0a77fa56b4bffb3643f05551f0322490e37f1c
+Size (IPC-Shareable-1.19.tar.gz) = 137700 bytes
Home |
Main Index |
Thread Index |
Old Index