# shared mutable state

Shared mutable state is mutable data accessed by multiple threads or coroutines, requiring synchronization to prevent race conditions.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Apache HTTP/2: Race to RCE - CVE-2026-119618

DevFeed: [Apache HTTP/2: Race to RCE - CVE-2026-119618](<https://devfeed.tech/articles/apache-http-2-race-to-rce-cve-2026-119618-130462.md>)

Original publisher: [Read original article](<https://thecyberthrone.in/2026/11/12/apache-http-2-race-to-rce-cve-2026-119618/>)

Author: PravinKarthik

Published: 2026-11-12T12:56:34Z

Content type: news

Language: en

Sources: [Cyber Newsroom](<https://devfeed.tech/sources/cyber-newsroom.md>)

Topics: [race-condition](<https://devfeed.tech/topics/race-condition.md>), [cve remediation](<https://devfeed.tech/topics/cve-remediation.md>), [shared mutable state](<https://devfeed.tech/topics/shared-mutable-state.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [apache](<https://devfeed.tech/tags/apache.md>), [apache-http](<https://devfeed.tech/tags/apache-http.md>), [apache-http-server](<https://devfeed.tech/tags/apache-http-server.md>), [corruption](<https://devfeed.tech/tags/corruption.md>), [cve](<https://devfeed.tech/tags/cve.md>), [cve-2026-119618](<https://devfeed.tech/tags/cve-2026-119618.md>), [exposed](<https://devfeed.tech/tags/exposed.md>), [http](<https://devfeed.tech/tags/http.md>), [http-2](<https://devfeed.tech/tags/http-2.md>), [http-server](<https://devfeed.tech/tags/http-server.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-corruption](<https://devfeed.tech/tags/memory-corruption.md>), [more](<https://devfeed.tech/tags/more.md>), [one](<https://devfeed.tech/tags/one.md>), [point](<https://devfeed.tech/tags/point.md>), [race](<https://devfeed.tech/tags/race.md>), [rce](<https://devfeed.tech/tags/rce.md>), [security](<https://devfeed.tech/tags/security.md>), [server](<https://devfeed.tech/tags/server.md>)

### AI overview

CVE-2026-119618 is a race condition in Apache HTTP Server's mod_http2 assign_headers() function that can corrupt heap memory and potentially enable unauthenticated remote code execution. The article identifies Apache HTTP Server 2.4.55-2.4.70 and separately distributed GitHub mod_h2 2.0.8-2.0.42 as affected. Red Hat reports a reliable exploit against a default-configured server with the vulnerable HTTP/2 module enabled; the article does not establish widespread exploitation in the wild. Apache HTTP Server 2.4.71, released November 11, 2026, fixes the issue. Recommended steps are to find vulnerable Apache instances, check whether mod_http2 is enabled, prioritize externally accessible systems, and upgrade or apply vendor patches. Disabling HTTP/2 is described as a temporary option when patching is not possible, subject to compatibility and vendor guidance. Native Microsoft IIS is not directly affected.

### Source excerpt

Apache HTTP/2: Race to RCE - CVE-2026-119618 One vulnerable HTTP/2 implementation. A memory corruption flaw. A potential entry point into exposed web servers.Apache HTTP Server remains one of the most widely deployed web servers across enterpris ... Read more Published Date: Nov 12, 2026 (2 hours, 23 minutes ago) Vulnerabilities has been mentioned in this article. CVE-2026-119618

## Building Verifiable Shared-State Infrastructure for Decentralized AI Agents

DevFeed: [Building Verifiable Shared-State Infrastructure for Decentralized AI Agents](<https://devfeed.tech/articles/building-verifiable-shared-state-infrastructure-for-decentralized-ai-agents-125748.md>)

Original publisher: [Read original article](<https://hackernoon.com/building-verifiable-sharedstate-infrastructure-for-decentralized-ai-agents?source=rss>)

Author: FromMOON

Published: 2026-11-10T09:44:38Z

Content type: article

Language: en

Sources: [HackerNoon](<https://devfeed.tech/sources/hackernoon.md>)

Topics: [Multi Agent Systems](<https://devfeed.tech/topics/multi-agent-systems.md>), [shared mutable state](<https://devfeed.tech/topics/shared-mutable-state.md>), [Production Engineering](<https://devfeed.tech/topics/production-engineering.md>), [synchronization](<https://devfeed.tech/topics/synchronization.md>)

Tags: [64-bit](<https://devfeed.tech/tags/64-bit.md>), [agent](<https://devfeed.tech/tags/agent.md>), [agent-infrastructure](<https://devfeed.tech/tags/agent-infrastructure.md>), [agent-workflows](<https://devfeed.tech/tags/agent-workflows.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [ai-systems](<https://devfeed.tech/tags/ai-systems.md>), [ao-computer](<https://devfeed.tech/tags/ao-computer.md>), [arweave](<https://devfeed.tech/tags/arweave.md>), [autonomous-ai-agents](<https://devfeed.tech/tags/autonomous-ai-agents.md>), [beam](<https://devfeed.tech/tags/beam.md>), [compute](<https://devfeed.tech/tags/compute.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [decentralize-ai](<https://devfeed.tech/tags/decentralize-ai.md>), [decentralize-ai-hackathon](<https://devfeed.tech/tags/decentralize-ai-hackathon.md>), [decentralized](<https://devfeed.tech/tags/decentralized.md>), [decentralized-ai](<https://devfeed.tech/tags/decentralized-ai.md>), [decentralized-database](<https://devfeed.tech/tags/decentralized-database.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [distributed-database](<https://devfeed.tech/tags/distributed-database.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [hyperstack](<https://devfeed.tech/tags/hyperstack.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [recovery](<https://devfeed.tech/tags/recovery.md>), [sharedstate-infrastructure](<https://devfeed.tech/tags/sharedstate-infrastructure.md>), [state](<https://devfeed.tech/tags/state.md>)

### AI overview

HyperStack is a general-purpose distributed database and compute stack on AO and HyperBEAM, with decentralized AI as one potential use case. It separates request sequencing, persistence, and verification: writes are coordinated across configured Storage Units, which use write-ahead logs; HYS distinguishes request acceptance from confirmation of durable storage, whose guarantee depends on quorum and acknowledgement path. Idempotency and recovery mechanisms address retries and failures. State checks use 64-bit Merkle-XOR and 256-bit SHA-256 commitments alongside an AO-based Genesis and Arbitrator architecture; these do not by themselves prove node honesty or application correctness. The project has been tested locally with real HyperBEAM nodes and an Arweave-compatible test environment, but has not established public-network deployment or production readiness. Further testing of durability, recovery, performance, security, and multi-agent workflows remains necessary.

### Source excerpt

Explore how HyDB builds distributed database infrastructure for reliable shared state, fault recovery, and decentralized AI agents.

## CVE-2026-61854 - VoiceSentinel: Race condition in report buffer cleanup can corrupt transcript data and cause unbounded disk growth

DevFeed: [CVE-2026-61854 - VoiceSentinel: Race condition in report buffer cleanup can corrupt transcript data and cause unbounded disk growth](<https://devfeed.tech/articles/cve-2026-61854-voicesentinel-race-condition-in-report-buffer-cleanup-can-corrupt-transcript-data-and-cause-unbounded-disk-growth-109183.md>)

Original publisher: [Read original article](<https://cvefeed.io/vuln/detail/CVE-2026-61854>)

Author: CVEFEED.io

Published: 2026-10-30T18:25:28Z

Content type: news

Language: en

Sources: [Latest High/Critical Vulnerabilitiy Feed](<https://devfeed.tech/sources/latest-high-critical-vulnerabilitiy-feed.md>)

Topics: [race-condition](<https://devfeed.tech/topics/race-condition.md>), [shared mutable state](<https://devfeed.tech/topics/shared-mutable-state.md>), [thread safe data sharing](<https://devfeed.tech/topics/thread-safe-data-sharing.md>), [locking](<https://devfeed.tech/topics/locking.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [async](<https://devfeed.tech/tags/async.md>), [asyncio](<https://devfeed.tech/tags/asyncio.md>), [atomic](<https://devfeed.tech/tags/atomic.md>), [buffer](<https://devfeed.tech/tags/buffer.md>), [can](<https://devfeed.tech/tags/can.md>), [cause](<https://devfeed.tech/tags/cause.md>), [cleanup](<https://devfeed.tech/tags/cleanup.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [condition](<https://devfeed.tech/tags/condition.md>), [crash](<https://devfeed.tech/tags/crash.md>), [cve](<https://devfeed.tech/tags/cve.md>), [cve-2026-61854](<https://devfeed.tech/tags/cve-2026-61854.md>), [cvss](<https://devfeed.tech/tags/cvss.md>), [data](<https://devfeed.tech/tags/data.md>), [feature](<https://devfeed.tech/tags/feature.md>), [growth](<https://devfeed.tech/tags/growth.md>), [race-condition](<https://devfeed.tech/tags/race-condition.md>), [report](<https://devfeed.tech/tags/report.md>), [transcript](<https://devfeed.tech/tags/transcript.md>)

### AI overview

In VoiceSentinel versions 2.2.1 through before 3.3.1, the optional report buffer can race when retention cleanup rewrites a tenant's transcripts.jsonl while unsynchronized writes append to it. Concurrent cleanup and writes may lose, duplicate, or corrupt transcripts and defeat retention pruning, allowing disk use to grow without bound and potentially crash the host or other services sharing its storage. The issue is reachable during normal operation; worker_count of at least two and shared server_key values increase collisions. The feature is disabled by default, and the description says the issue is fixed in 3.3.1.

### Source excerpt

CVE ID :CVE-2026-61854 Published : Oct. 30, 2026, 6:25 p.m. | 49 minutes ago Description :VoiceSentinel is a real-time voice moderation system for Minecraft servers. From 2.2.1 until 3.3.1, the optional report buffer feature has a race between retention cleanup and normal transcript writes. In `report_buffer.py`, `_maybe_cleanup()` uses an unlocked dictionary for once-per-hour cleanup throttling, allowing simultaneous `_cleanup_tenant()` operations for one tenant. Cleanup reads `transcripts.jsonl` and rewrites it in place without file locking or atomic replacement, while `report_buffer_append_async` uses `asyncio.to_thread` to append without synchronization. In `main.py`, concurrent `_processing_worker` tasks make this reachable in normal operation; `processing.worker_count` of two or more and public-pool servers sharing a `server_key` increase collisions. With `report_buffer.enabled` set to true, racing writes can lose, duplicate or corrupt transcript data and defeat `report_buffer.retention_seconds` pruning, allowing unbounded disk growth that can exhaust storage and crash the host or other services sharing it. The feature is opt-in and disabled by default. This issue is fixed in version 3.3.1. Severity: 8.2 | HIGH Visit the link for more details, such as CVSS details, affected products, timeline, and more...

## rush: Scalable Asynchronous Distributed Computing via Shared State in R

DevFeed: [rush: Scalable Asynchronous Distributed Computing via Shared State in R](<https://devfeed.tech/articles/rush-scalable-asynchronous-distributed-computing-via-shared-state-in-r-101581.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2606.21430>)

Author: Marc Becker, Bernd Bischl

Published: 2026-10-27T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Distributed Computing](<https://devfeed.tech/sources/arxiv-distributed-computing.md>)

Topics: [distributed algorithm](<https://devfeed.tech/topics/distributed-algorithm.md>), [Hyperparameter optimization](<https://devfeed.tech/topics/hyperparameter-optimization.md>), [shared mutable state](<https://devfeed.tech/topics/shared-mutable-state.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [api](<https://devfeed.tech/tags/api.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [caching](<https://devfeed.tech/tags/caching.md>), [cs-dc](<https://devfeed.tech/tags/cs-dc.md>), [distributed-computing](<https://devfeed.tech/tags/distributed-computing.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [hyperparameter-optimization](<https://devfeed.tech/tags/hyperparameter-optimization.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [parallel-computing](<https://devfeed.tech/tags/parallel-computing.md>), [r](<https://devfeed.tech/tags/r.md>), [redis](<https://devfeed.tech/tags/redis.md>), [state](<https://devfeed.tech/tags/state.md>)

### AI overview

rush provides R with shared-state coordination for asynchronous, decentralized iterative algorithms. Workers use a Redis key-value store to read and write task data while running independent loops, avoiding a central controller-worker pattern. Its API manages task lifecycles and is described as offering sub-millisecond per-task overhead, automatic detection of lost workers, error handling, and caching. Optional integration with mlr3 supports asynchronous optimization through bbotk and mlr3tuning. The authors demonstrate asynchronous decentralized Bayesian optimization for LightGBM hyperparameter tuning across four datasets with 448 workers; the supplied abstract does not report benchmark outcomes.

### Source excerpt

arXiv:2606.21430v4 Announce Type: replace Abstract: Many algorithms in statistics and machine learning can be parallelized in an asynchronous manner where workers need to communicate through shared state rather than execute independent tasks dispatched by a central controller. Especially in modern hyperparameter optimization and parallel black-box optimization with expensive objectives, this decentralized approach has become widespread, and several Python frameworks adopt it (e.g., Optuna, DeepHyper, and Hyperopt). However, all popular R packages for parallel computing follow a centralized controller-worker architecture that does not support this pattern. We present rush, an R package that provides a shared-state coordination layer for asynchronously parallelized iterative algorithms. rush uses a Redis database as a shared key-value store: workers read and write task data through the database and independently execute their own loops. The package provides a high-level API for managing tasks and their lifecycle, featuring sub-millisecond per-task overhead, robust error handling with automatic detection of lost workers, and efficient caching. rush optionally integrates with the mlr3 ecosystem, powering asynchronous optimization in the bbotk and mlr3tuning packages. We demonstrate the practical utility of rush by implementing asynchronous decentralized Bayesian optimization (ADBO) and benchmarking it on hyperparameter optimization of LightGBM across four datasets using 448 workers.

## An Intro to Threading in Python

DevFeed: [An Intro to Threading in Python](<https://devfeed.tech/articles/an-intro-to-threading-in-python-98857.md>)

Original publisher: [Read original article](<https://realpython.com/intro-to-python-threading/>)

Author: Jim Anderson

Published: 2026-10-24T14:00:00Z

Content type: tutorial

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [multithreading](<https://devfeed.tech/topics/multithreading.md>), [Python](<https://devfeed.tech/topics/python.md>), [race-condition](<https://devfeed.tech/topics/race-condition.md>), [shared mutable state](<https://devfeed.tech/topics/shared-mutable-state.md>), [thread safe data sharing](<https://devfeed.tech/topics/thread-safe-data-sharing.md>), [scheduling](<https://devfeed.tech/topics/scheduling.md>)

Tags: [concurrency](<https://devfeed.tech/tags/concurrency.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [concurrently](<https://devfeed.tech/tags/concurrently.md>), [deadlocks](<https://devfeed.tech/tags/deadlocks.md>), [locks](<https://devfeed.tech/tags/locks.md>), [python](<https://devfeed.tech/tags/python.md>), [python-threading](<https://devfeed.tech/tags/python-threading.md>), [queues](<https://devfeed.tech/tags/queues.md>), [race-conditions](<https://devfeed.tech/tags/race-conditions.md>), [threading](<https://devfeed.tech/tags/threading.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

Python threading can simplify concurrent program design and is most useful for tasks that spend time waiting on external events. In standard CPython builds, the GIL generally prevents Python threads from running CPU-bound code in parallel; the optional free-threaded build introduced in Python 3.13 is an exception. The tutorial shows how to start threads and wait with `join()`, and how `ThreadPoolExecutor` manages a group of workers. It demonstrates a lost update when threads share mutable data, then uses `Lock` to protect the read-modify-write section. A `Lock` used as a context manager is released when the block exits; `RLock` supports repeated acquisition by the same thread. For producer-consumer work, a single-slot lock-based pipeline cannot absorb bursts, while thread-safe `queue.Queue` can buffer messages and block at a configured maximum size; an `Event` signals shutdown, and the consumer drains queued messages before exiting. The article also surveys `Semaphore` for limiting access to finite resources, `Timer` for delayed calls, and `Barrier` for synchronizing a fixed number of threads.

### Source excerpt

Learn how to use Python threading to run tasks concurrently, synchronize threads with locks and queues, and avoid race conditions and deadlocks.

## Python's Mutable vs Immutable Types: What's the Difference?

DevFeed: [Python's Mutable vs Immutable Types: What's the Difference?](<https://devfeed.tech/articles/python-s-mutable-vs-immutable-types-what-s-the-difference-89665.md>)

Original publisher: [Read original article](<https://realpython.com/python-mutable-vs-immutable-types/>)

Author: Leodanis Pozo Ramos

Published: 2026-10-18T14:00:00Z

Content type: tutorial

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [data type](<https://devfeed.tech/topics/data-type.md>), [shared mutable state](<https://devfeed.tech/topics/shared-mutable-state.md>)

Tags: [immutability](<https://devfeed.tech/tags/immutability.md>)

### AI overview

This tutorial explains Python object identity, references, and the differences between mutable and immutable built-in types. Code examples demonstrate in-place changes, reassignment, hashability, and common pitfalls involving aliases, function arguments, and mutable default values.

### Source excerpt

Learn how Python mutable and immutable data types work internally and how you can use mutability or immutability to power your code.

## Stabilizing a Failing Java Web Application with Daily Production Outages

DevFeed: [Stabilizing a Failing Java Web Application with Daily Production Outages](<https://devfeed.tech/articles/the-slow-fix-41533.md>)

Original publisher: [Read original article](<https://dfa1.github.io/articles/the-slow-fix.html>)

Author: Davide Angelocola

Published: 2026-04-30T00:00:00Z

Content type: opinion

Language: en

Sources: [Davide Angelocola](<https://devfeed.tech/sources/davide-angelocola.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [shared mutable state](<https://devfeed.tech/topics/shared-mutable-state.md>), [Code](<https://devfeed.tech/topics/code.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [Spring MVC](<https://devfeed.tech/topics/spring-mvc.md>), [Hibernate](<https://devfeed.tech/topics/hibernate.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [business logic](<https://devfeed.tech/topics/business-logic.md>), [Deployment](<https://devfeed.tech/topics/deployment.md>), [ide](<https://devfeed.tech/topics/ide.md>)

Tags: [backend](<https://devfeed.tech/tags/backend.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [database](<https://devfeed.tech/tags/database.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [developers](<https://devfeed.tech/tags/developers.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [java](<https://devfeed.tech/tags/java.md>), [mvc](<https://devfeed.tech/tags/mvc.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [shared-mutable-state](<https://devfeed.tech/tags/shared-mutable-state.md>), [spring](<https://devfeed.tech/tags/spring.md>)

### AI overview

A consultant recounts efforts to stabilize a large Java web application that was suffering roughly daily production outages. The system had unsynchronized shared state, database connection leaks, unbounded memory growth, layered frameworks, mixed MySQL table engines, and hard-to-debug reflective business logic.

### Source excerpt

This is a success story from when I was working as a consultant in the mid 2010s. This is an extract from notes I took at that time. The inspiration is "The Phoenix Project" -- minus the novel format. The goal here is simpler: document what happened, in case it's useful to someone standing at the same starting point.

## Fearless Concurrency Ep.2: Managing Threaded Programs and Data Races in Rust

DevFeed: [Fearless Concurrency Ep.2: Managing Threaded Programs and Data Races in Rust](<https://devfeed.tech/articles/fearless-concurrency-ep-2-managing-threaded-programs-and-data-races-in-rust-22259.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2024/09/fearless-concurrency-ep2-managing-threaded-programs-and-data-races-in-rust.html>)

Published: 2024-09-26T00:00:00Z

Content type: article

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [thread safe data sharing](<https://devfeed.tech/topics/thread-safe-data-sharing.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [race-condition](<https://devfeed.tech/topics/race-condition.md>), [Distributed Systems & Parallel Computing](<https://devfeed.tech/topics/distributed-systems-parallel-computing.md>), [shared mutable state](<https://devfeed.tech/topics/shared-mutable-state.md>)

Tags: [atomics](<https://devfeed.tech/tags/atomics.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [concurrency-in-rust](<https://devfeed.tech/tags/concurrency-in-rust.md>), [creating-threads-in-rust](<https://devfeed.tech/tags/creating-threads-in-rust.md>), [managing-threads-in-rust](<https://devfeed.tech/tags/managing-threads-in-rust.md>), [operating-system](<https://devfeed.tech/tags/operating-system.md>), [ownership](<https://devfeed.tech/tags/ownership.md>), [preventing-race-conditions-in-rust](<https://devfeed.tech/tags/preventing-race-conditions-in-rust.md>), [race-conditions](<https://devfeed.tech/tags/race-conditions.md>), [rust](<https://devfeed.tech/tags/rust.md>), [rust-atomic-operations](<https://devfeed.tech/tags/rust-atomic-operations.md>), [rust-borrow-checker-for-threads](<https://devfeed.tech/tags/rust-borrow-checker-for-threads.md>), [rust-concurrency-tutorial](<https://devfeed.tech/tags/rust-concurrency-tutorial.md>), [rust-concurrent-programming](<https://devfeed.tech/tags/rust-concurrent-programming.md>), [rust-data-race-prevention](<https://devfeed.tech/tags/rust-data-race-prevention.md>), [rust-join-handles](<https://devfeed.tech/tags/rust-join-handles.md>), [rust-multithreading](<https://devfeed.tech/tags/rust-multithreading.md>), [rust-ownership-system](<https://devfeed.tech/tags/rust-ownership-system.md>), [rust-thread-safety](<https://devfeed.tech/tags/rust-thread-safety.md>), [rust-threading-basics](<https://devfeed.tech/tags/rust-threading-basics.md>), [safety](<https://devfeed.tech/tags/safety.md>), [std-thread-spawn-in-rust](<https://devfeed.tech/tags/std-thread-spawn-in-rust.md>), [thread-lifecycle-in-rust](<https://devfeed.tech/tags/thread-lifecycle-in-rust.md>), [threading](<https://devfeed.tech/tags/threading.md>)

### AI overview

The excerpt explains how Rust's std::thread::spawn starts operating-system threads and how joining their handles ensures they finish before the main program exits; handles can also return values. Rust's ownership and borrowing rules restrict shared access to multiple immutable references or one mutable reference, allowing the borrow checker to prevent unsafe data races. The episode also covers atomics for modifying shared state safely. The standard-library threading interface is presented as straightforward, but without platform-specific features such as thread priority or CPU affinity. The supplied text ends mid-sentence, so this overview reflects only the available excerpt.

### Source excerpt

Introduction: Welcome to Episode 2 of the Fearless Concurrency in Rust series! In this episode, Herbert Wolverson dives into the fundamentals of threading in Rust, demonstrating how to use Rust's threading capabilities effectively while maintaining safety. The focus is on using std::thread to spawn threads, preventing data races, and ensuring efficient, reliable multithreaded execution. Creating Threads in Rust: How to spawn and manage operating system threads using std::thread::spawn. Handling Data Races: Rust's borrow checker and ownership system preventing unsafe data access across threads.

## Concurrent Programming in Kotlin: Ensuring Thread Safety with Mutex

DevFeed: [Concurrent Programming in Kotlin: Ensuring Thread Safety with Mutex](<https://devfeed.tech/articles/concurrent-programming-in-kotlin-ensuring-thread-safety-with-mutex-23873.md>)

Original publisher: [Read original article](<https://engineering.premise.com/concurrent-programming-in-kotlin-ensuring-thread-safety-with-mutex-5d9c6b80644b?source=rss----c5fada0a103d---4>)

Author: Kwabena Bio Berko

Published: 2023-07-18T03:33:24Z

Content type: article

Language: en

Sources: [Engineering at Premise](<https://devfeed.tech/sources/engineering-at-premise-medium.md>)

Topics: [locking](<https://devfeed.tech/topics/locking.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [race-condition](<https://devfeed.tech/topics/race-condition.md>), [shared mutable state](<https://devfeed.tech/topics/shared-mutable-state.md>), [synchronization](<https://devfeed.tech/topics/synchronization.md>), [thread safe data sharing](<https://devfeed.tech/topics/thread-safe-data-sharing.md>), [multithreading](<https://devfeed.tech/topics/multithreading.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [suspend function](<https://devfeed.tech/topics/suspend-function.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-engineer](<https://devfeed.tech/tags/android-engineer.md>), [atomic](<https://devfeed.tech/tags/atomic.md>), [component](<https://devfeed.tech/tags/component.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [concurrent-programming](<https://devfeed.tech/tags/concurrent-programming.md>), [concurrently](<https://devfeed.tech/tags/concurrently.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [mutex](<https://devfeed.tech/tags/mutex.md>), [safety](<https://devfeed.tech/tags/safety.md>), [software](<https://devfeed.tech/tags/software.md>), [thread](<https://devfeed.tech/tags/thread.md>), [thread-safety](<https://devfeed.tech/tags/thread-safety.md>)

### AI overview

The article describes using Kotlin's Mutex to prevent concurrent refresh calls from duplicating a remote fetch and database write. It presents two behaviors: a call can check whether the Mutex is locked and skip refresh while it is in use, or use the suspending `withLock` lambda to wait until the lock is released. Restricting access to critical sections helps prevent race conditions and keep shared data consistent, but locking too much code can serialize work, reduce parallelism, and slow the application. The article recommends limiting Mutex use to sections that require exclusive access.

### Source excerpt

By Kwabena Bio Berko, Android Engineer Photo by Chris Ried on Unsplash I have recently been experimenting with mutual exclusion(Mutex), a concept in software engineering to solve race conditions when accessing shared resources. Let's assume we have a component with a refresh function that can be accessed from multiple threads or coroutines: https://medium.com/media/e19aa2a9d57bc105b841d28061a199b8/href In the implementation of this component, the function retrieves data from a remote resource and inserts it into the local database. However, these operations need to be atomic. Now, imagine if 10 threads call this function simultaneously, or even a few milliseconds apart. What happens? If you guessed that we make 10 network calls and 10 database IO operations to save the items, then you would be right, as confirmed by the below test: https://medium.com/media/9b279658dbf87021068ee21a913dc80e/hrefhttps://medium.com/media/81cdc164ad807fd45df77389c00bd4cc/href But that's not what we want. It's definitely not resource-friendly. To address this issue, we can use a Mutex. As the name suggests, a Mutex provides mutual exclusion for a specific portion of your code, imposing restrictions on the access to that portion in situations where multiple threads or coroutines may attempt to access it concurrently. In essence, Mutex allows only one thread or coroutine to work within the confines of that portion of the code at any given time. By introducing a Mutex in our refresh function, we can ensure that only one thread is executing the critical sections of the code, preventing race conditions and ensuring atomicity of the operations. https://medium.com/media/9d88a802b4c73f14ceb4d5527158af5d/href In the example above, whenever the refresh function is called, we check to see if the Mutex is already locked or been used. If not, we lock it and then perform our network call and save the results in our local database. This means that whenever another thread or coroutine calls this refresh

## How we found and fixed a rare race condition in our session handling

DevFeed: [How we found and fixed a rare race condition in our session handling](<https://devfeed.tech/articles/how-we-found-and-fixed-a-rare-race-condition-in-our-session-handling-68608.md>)

Original publisher: [Read original article](<https://github.blog/security/vulnerability-research/how-we-found-and-fixed-a-rare-race-condition-in-our-session-handling/>)

Author: Dirkjan Bussink

Published: 2021-03-18T19:59:27Z

Content type: article

Language: en

Sources: [GitHub Blog](<https://devfeed.tech/sources/github-engineering.md>)

Topics: [race-condition](<https://devfeed.tech/topics/race-condition.md>), [sessions](<https://devfeed.tech/topics/sessions.md>), [shared mutable state](<https://devfeed.tech/topics/shared-mutable-state.md>), [engineering-culture](<https://devfeed.tech/topics/engineering-culture.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>)

Tags: [authentication](<https://devfeed.tech/tags/authentication.md>), [bug](<https://devfeed.tech/tags/bug.md>), [collaboration](<https://devfeed.tech/tags/collaboration.md>), [complex-systems](<https://devfeed.tech/tags/complex-systems.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [github](<https://devfeed.tech/tags/github.md>), [race-condition](<https://devfeed.tech/tags/race-condition.md>), [security](<https://devfeed.tech/tags/security.md>), [vulnerability](<https://devfeed.tech/tags/vulnerability.md>), [vulnerability-research](<https://devfeed.tech/tags/vulnerability-research.md>)

### AI overview

GitHub describes how a rare race condition in its Ruby on Rails application caused one user's session cookie to be returned in another user's response. A background thread, shared exception context, deferred callbacks, and reuse of a Rack environment object combined to expose the issue. GitHub removed the background thread, patched Unicorn to isolate request environments, revoked active sessions, and outlined further work to improve thread safety and incident response.

### Source excerpt

On March 8, we shared that, out of an abundance of caution, we logged all users out of GitHub.com due to a rare security vulnerability. We believe that transparency is...