diff --git a/.cargo/config.toml b/.cargo/config.toml index 019321653..10f638a32 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -11,3 +11,18 @@ linker = "aarch64-linux-gnu-gcc" [target.x86_64-pc-windows-msvc] rustflags = ["-C", "target-feature=+crt-static"] + +# Force lmdb-sys (lmdb-mintlayer fork) to use POSIX mutexes instead of System V +# semaphores on macOS. Darwin's default SysV backend fails with EINVAL once a +# process holds locks on more than `kern.sysv.semume` (=10) semaphore sets +# concurrently, which breaks any workload opening multiple DB environments in +# one process (e.g. the storage-lmdb test suite). +# +# MDB_USE_ROBUST must be 0 because Darwin does not implement robust mutexes +# (no PTHREAD_MUTEX_ROBUST); the cost is that a process crash while holding an +# env lock can leave other processes deadlocked on that environment. +# These flags are only applied when compiling FOR apple targets, so Linux/CI +# builds keep upstream defaults (robust glibc pthread mutexes). +[env] +CFLAGS_aarch64-apple-darwin = "-DMDB_USE_POSIX_MUTEX=1 -DMDB_USE_ROBUST=0" +CFLAGS_x86_64-apple-darwin = "-DMDB_USE_POSIX_MUTEX=1 -DMDB_USE_ROBUST=0" diff --git a/Cargo.lock b/Cargo.lock index 5594180f0..c0073927b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2870,7 +2870,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -3306,8 +3306,8 @@ dependencies = [ "libc", "log", "rustversion", - "windows-link 0.1.3", - "windows-result 0.3.4", + "windows-link 0.2.1", + "windows-result 0.4.1", ] [[package]] @@ -3925,7 +3925,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.5.10", + "socket2 0.6.2", "system-configuration", "tokio", "tower-service", @@ -4362,7 +4362,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -4766,9 +4766,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8935b44e7c13394a179a438e0cebba0fe08fe01b54f152e29a93b5cf993fd4" +checksum = "fbb8270bb4060bd76c6e96f20c52d80620f1d82a3470885694e41e0f81ef6fe7" dependencies = [ "cc", "pkg-config", @@ -5591,7 +5591,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -7562,9 +7562,9 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c6d5e5acb6f6129fe3f7ba0a7fc77bca1942cb568535e18e7bc40262baf3110" +checksum = "37e34486da88d8e051c7c0e23c3f15fd806ea8546260aa2fec247e97242ec143" dependencies = [ "bitflags 2.10.0", "fallible-iterator 0.3.0", @@ -7650,7 +7650,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -8843,7 +8843,7 @@ dependencies = [ "getrandom 0.4.1", "once_cell", "rustix 1.1.3", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -10645,7 +10645,7 @@ dependencies = [ "js-sys", "log", "naga", - "parking_lot 0.11.2", + "parking_lot 0.12.5", "profiling", "raw-window-handle", "smallvec", @@ -10673,7 +10673,7 @@ dependencies = [ "log", "naga", "once_cell", - "parking_lot 0.11.2", + "parking_lot 0.12.5", "profiling", "raw-window-handle", "rustc-hash 1.1.0", @@ -10715,7 +10715,7 @@ dependencies = [ "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", - "parking_lot 0.11.2", + "parking_lot 0.12.5", "profiling", "range-alloc", "raw-window-handle", @@ -10779,7 +10779,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 441d12818..8dd68902a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -235,7 +235,7 @@ ripemd = "0.1" rlimit = "0.10" rstest = "0.24" rstest_reuse = "0.7" -rusqlite = "0.33" +rusqlite = "0.34" schnorrkel = "0.11" secp256k1 = { version = "0.29", default-features = false } semver = "1.0" diff --git a/supply-chain/imports.lock b/supply-chain/imports.lock index 1f8a7853b..c39d030f8 100644 --- a/supply-chain/imports.lock +++ b/supply-chain/imports.lock @@ -954,8 +954,8 @@ user-id = 55123 user-login = "rust-lang-owner" [[publisher.libsqlite3-sys]] -version = "0.31.0" -when = "2025-01-19" +version = "0.32.0" +when = "2025-03-05" user-id = 5062 user-login = "gwenn" user-name = "gwenn" @@ -1380,8 +1380,8 @@ user-login = "yoshuawuyts" user-name = "Yosh" [[publisher.rusqlite]] -version = "0.33.0" -when = "2025-01-19" +version = "0.34.0" +when = "2025-03-05" user-id = 5062 user-login = "gwenn" user-name = "gwenn"