From f49fb2c091fa23bcdfc51e0cb55463a1c2ab04e9 Mon Sep 17 00:00:00 2001
From: Asterisk Development Team
Date: Thu, 13 Nov 2025 17:15:42 +0000
Subject: [PATCH] Update for 23.1.0-rc2
---
.version | 2 +-
CHANGES.html | 2 +-
CHANGES.md | 2 +-
ChangeLogs/ChangeLog-23.1.0-rc2.html | 61 +++++++++++++++++++++++
ChangeLogs/ChangeLog-23.1.0-rc2.md | 72 ++++++++++++++++++++++++++++
README.html | 4 +-
README.md | 2 +-
7 files changed, 139 insertions(+), 6 deletions(-)
create mode 100644 ChangeLogs/ChangeLog-23.1.0-rc2.html
create mode 100644 ChangeLogs/ChangeLog-23.1.0-rc2.md
diff --git a/.version b/.version
index 2a879dfaa3..14061e9015 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-23.1.0-rc1
+23.1.0-rc2
diff --git a/CHANGES.html b/CHANGES.html
index db25439cc0..132db9f46a 120000
--- a/CHANGES.html
+++ b/CHANGES.html
@@ -1 +1 @@
-ChangeLogs/ChangeLog-23.1.0-rc1.html
\ No newline at end of file
+ChangeLogs/ChangeLog-23.1.0-rc2.html
\ No newline at end of file
diff --git a/CHANGES.md b/CHANGES.md
index 70cd444361..38222e3db8 120000
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1 +1 @@
-ChangeLogs/ChangeLog-23.1.0-rc1.md
\ No newline at end of file
+ChangeLogs/ChangeLog-23.1.0-rc2.md
\ No newline at end of file
diff --git a/ChangeLogs/ChangeLog-23.1.0-rc2.html b/ChangeLogs/ChangeLog-23.1.0-rc2.html
new file mode 100644
index 0000000000..952f7d2c98
--- /dev/null
+++ b/ChangeLogs/ChangeLog-23.1.0-rc2.html
@@ -0,0 +1,61 @@
+ChangeLog for asterisk-23.1.0-rc2
+Change Log for Release asterisk-23.1.0-rc2
+Links:
+
+Summary:
+
+- Commits: 1
+- Commit Authors: 1
+- Issues Resolved: 1
+- Security Advisories Resolved: 0
+
+User Notes:
+Upgrade Notes:
+Developer Notes:
+Commit Authors:
+
+Issue and Commit Detail:
+Closed Issues:
+
+- 1578: [bug]: Deadlock with externalMedia custom channel id and cpp map channel backend
+
+Commits By Author:
+
+-
+
George Joseph (1):
+
+
+Commit List:
+
+- channelstorage: Allow storage driver read locking to be skipped.
+
+Commit Details:
+channelstorage: Allow storage driver read locking to be skipped.
+Author: George Joseph
+ Date: 2025-11-06
+After PR #1498 added read locking to channelstorage_cpp_map_name_id, if ARI
+ channels/externalMedia was called with a custom channel id AND the
+ cpp_map_name_id channel storage backend is in use, a deadlock can occur when
+ hanging up the channel. It's actually triggered in
+ channel.c:__ast_channel_alloc_ap() when it gets a write lock on the
+ channelstorage driver then subsequently does a lookup for channel uniqueid
+ which now does a read lock. This is an invalid operation and causes the lock
+ state to get "bad". When the channels try to hang up, a write lock is
+ attempted again which hangs and causes the deadlock.
+Now instead of the cpp_map_name_id channelstorage driver "get" APIs
+ automatically performing a read lock, they take a "lock" parameter which
+ allows a caller who already has a write lock to indicate that the "get" API
+ must not attempt its own lock. This prevents the state from getting mesed up.
+The ao2_legacy driver uses the ao2 container's recursive mutex so doesn't
+ have this issue but since it also implements the common channelstorage API,
+ it needed its "get" implementations updated to take the lock parameter. They
+ just don't use it.
+Resolves: #1578
+
diff --git a/ChangeLogs/ChangeLog-23.1.0-rc2.md b/ChangeLogs/ChangeLog-23.1.0-rc2.md
new file mode 100644
index 0000000000..6e65a6a1fb
--- /dev/null
+++ b/ChangeLogs/ChangeLog-23.1.0-rc2.md
@@ -0,0 +1,72 @@
+
+## Change Log for Release asterisk-23.1.0-rc2
+
+### Links:
+
+ - [Full ChangeLog](https://downloads.asterisk.org/pub/telephony/asterisk/releases/ChangeLog-23.1.0-rc2.html)
+ - [GitHub Diff](https://github.com/asterisk/asterisk/compare/23.1.0-rc1...23.1.0-rc2)
+ - [Tarball](https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-23.1.0-rc2.tar.gz)
+ - [Downloads](https://downloads.asterisk.org/pub/telephony/asterisk)
+
+### Summary:
+
+- Commits: 1
+- Commit Authors: 1
+- Issues Resolved: 1
+- Security Advisories Resolved: 0
+
+### User Notes:
+
+
+### Upgrade Notes:
+
+
+### Developer Notes:
+
+
+### Commit Authors:
+
+- George Joseph: (1)
+
+## Issue and Commit Detail:
+
+### Closed Issues:
+
+ - 1578: [bug]: Deadlock with externalMedia custom channel id and cpp map channel backend
+
+### Commits By Author:
+
+- #### George Joseph (1):
+
+### Commit List:
+
+- channelstorage: Allow storage driver read locking to be skipped.
+
+### Commit Details:
+
+#### channelstorage: Allow storage driver read locking to be skipped.
+ Author: George Joseph
+ Date: 2025-11-06
+
+ After PR #1498 added read locking to channelstorage_cpp_map_name_id, if ARI
+ channels/externalMedia was called with a custom channel id AND the
+ cpp_map_name_id channel storage backend is in use, a deadlock can occur when
+ hanging up the channel. It's actually triggered in
+ channel.c:__ast_channel_alloc_ap() when it gets a write lock on the
+ channelstorage driver then subsequently does a lookup for channel uniqueid
+ which now does a read lock. This is an invalid operation and causes the lock
+ state to get "bad". When the channels try to hang up, a write lock is
+ attempted again which hangs and causes the deadlock.
+
+ Now instead of the cpp_map_name_id channelstorage driver "get" APIs
+ automatically performing a read lock, they take a "lock" parameter which
+ allows a caller who already has a write lock to indicate that the "get" API
+ must not attempt its own lock. This prevents the state from getting mesed up.
+
+ The ao2_legacy driver uses the ao2 container's recursive mutex so doesn't
+ have this issue but since it also implements the common channelstorage API,
+ it needed its "get" implementations updated to take the lock parameter. They
+ just don't use it.
+
+ Resolves: #1578
+
diff --git a/README.html b/README.html
index ece2ea7c03..6cfae2c9a8 100644
--- a/README.html
+++ b/README.html
@@ -1,4 +1,4 @@
-Readme for asterisk-23.1.0-rc1
+Readme for asterisk-23.1.0-rc2
The Asterisk(R) Open Source PBX
By Mark Spencer <markster@digium.com> and the Asterisk.org developer community.
Copyright (C) 2001-2025 Sangoma Technologies Corporation and other copyright holders.
@@ -37,7 +37,7 @@ hardware.
If you are updating from a previous version of Asterisk, make sure you
read the Change Logs.
-Change Logs
+Change Logs
NEW INSTALLATIONS
diff --git a/README.md b/README.md
index 83af166333..51ea904790 100644
--- a/README.md
+++ b/README.md
@@ -55,7 +55,7 @@ If you are updating from a previous version of Asterisk, make sure you
read the Change Logs.
-[Change Logs](ChangeLogs/ChangeLog-23.1.0-rc1.html)
+[Change Logs](ChangeLogs/ChangeLog-23.1.0-rc2.html)
### NEW INSTALLATIONS