From b24f6a818ec5006ad5347b1fd4069028d0a76e41 Mon Sep 17 00:00:00 2001 From: Igor Abdrakhimov Date: Fri, 24 Oct 2025 14:09:25 -0700 Subject: [PATCH 1/6] Reveal the issue --- source/channel.c | 2 +- source/channel_bootstrap.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/channel.c b/source/channel.c index eb4e6f0ef..d4f71cefa 100644 --- a/source/channel.c +++ b/source/channel.c @@ -1005,7 +1005,7 @@ int aws_channel_slot_on_handler_shutdown_complete( } size_t aws_channel_slot_downstream_read_window(struct aws_channel_slot *slot) { - AWS_ASSERT(slot->adj_right); + AWS_FATAL_ASSERT(slot->adj_right); return slot->channel->read_back_pressure_enabled ? slot->adj_right->window_size : SIZE_MAX; } diff --git a/source/channel_bootstrap.c b/source/channel_bootstrap.c index 63cc3484e..e60105040 100644 --- a/source/channel_bootstrap.c +++ b/source/channel_bootstrap.c @@ -1583,6 +1583,8 @@ static void s_on_server_channel_on_setup_completed(struct aws_channel *channel, * when a TLS connection has been successfully established. At that point, we signal a successful TLS * handshake, which also makes the server name and protocol available (if provided). */ + // FIXME A code path used in the tls_server_hangup_during_negotiation test needs a slot + // set by s_setup_server_tls. s_tls_server_on_negotiation_result(socket_channel_handler, socket_slot, err_code, channel_data); return; } From 2562293a632a52eb2a95958db62c5214e7ccc36d Mon Sep 17 00:00:00 2001 From: Igor Abdrakhimov Date: Mon, 27 Oct 2025 09:57:26 -0700 Subject: [PATCH 2/6] Check AWS_ASSERT --- source/channel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/channel.c b/source/channel.c index d4f71cefa..35004853e 100644 --- a/source/channel.c +++ b/source/channel.c @@ -208,6 +208,8 @@ struct aws_channel *aws_channel_new(struct aws_allocator *alloc, const struct aw AWS_PRECONDITION(creation_args->event_loop); AWS_PRECONDITION(creation_args->on_setup_completed); + AWS_ASSERT(false); + struct aws_channel *channel = aws_mem_calloc(alloc, 1, sizeof(struct aws_channel)); if (!channel) { return NULL; From 7df84c5e3b576c7fa199c89e54eb0129ff49c879 Mon Sep 17 00:00:00 2001 From: Igor Abdrakhimov Date: Mon, 27 Oct 2025 10:09:09 -0700 Subject: [PATCH 3/6] Try fatal --- source/channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/channel.c b/source/channel.c index 35004853e..3cbecff3e 100644 --- a/source/channel.c +++ b/source/channel.c @@ -208,7 +208,7 @@ struct aws_channel *aws_channel_new(struct aws_allocator *alloc, const struct aw AWS_PRECONDITION(creation_args->event_loop); AWS_PRECONDITION(creation_args->on_setup_completed); - AWS_ASSERT(false); + AWS_FATAL_ASSERT(false); struct aws_channel *channel = aws_mem_calloc(alloc, 1, sizeof(struct aws_channel)); if (!channel) { From 43becc1e27e7f40574aeadd1379c005a4939fdcc Mon Sep 17 00:00:00 2001 From: Igor Abdrakhimov Date: Mon, 27 Oct 2025 13:52:33 -0700 Subject: [PATCH 4/6] Define DEBUG_BUILD --- source/channel.c | 4 +--- tests/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/channel.c b/source/channel.c index 3cbecff3e..eb4e6f0ef 100644 --- a/source/channel.c +++ b/source/channel.c @@ -208,8 +208,6 @@ struct aws_channel *aws_channel_new(struct aws_allocator *alloc, const struct aw AWS_PRECONDITION(creation_args->event_loop); AWS_PRECONDITION(creation_args->on_setup_completed); - AWS_FATAL_ASSERT(false); - struct aws_channel *channel = aws_mem_calloc(alloc, 1, sizeof(struct aws_channel)); if (!channel) { return NULL; @@ -1007,7 +1005,7 @@ int aws_channel_slot_on_handler_shutdown_complete( } size_t aws_channel_slot_downstream_read_window(struct aws_channel_slot *slot) { - AWS_FATAL_ASSERT(slot->adj_right); + AWS_ASSERT(slot->adj_right); return slot->channel->read_back_pressure_enabled ? slot->adj_right->window_size : SIZE_MAX; } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 571b5d42a..15bebbcc6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -423,6 +423,7 @@ generate_test_driver(${TEST_BINARY_NAME}) if(USE_S2N) target_compile_definitions(${PROJECT_NAME}-tests PRIVATE "-DUSE_S2N") endif() +target_compile_definitions(${PROJECT_NAME}-tests PRIVATE "-DDEBUG_BUILD") # SSL certificates to use for testing. add_custom_command(TARGET ${TEST_BINARY_NAME} PRE_BUILD From f3995b2239aab886a75258706b539eca6d87f1c8 Mon Sep 17 00:00:00 2001 From: Igor Abdrakhimov Date: Mon, 27 Oct 2025 14:00:14 -0700 Subject: [PATCH 5/6] Add more DEBUG_BUILD --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 191d1b6ed..0ecd4b65e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,6 +174,8 @@ aws_check_headers(${PROJECT_NAME} ${AWS_IO_HEADERS}) aws_add_sanitizers(${PROJECT_NAME}) +target_compile_definitions(${PROJECT_NAME} PRIVATE "-DDEBUG_BUILD") + # We are not ABI stable yet set_target_properties(${PROJECT_NAME} PROPERTIES VERSION 1.0.0) From 237d1abcefef448c10a149acf07b2c856f9c6e36 Mon Sep 17 00:00:00 2001 From: Igor Abdrakhimov Date: Wed, 29 Oct 2025 13:50:50 -0700 Subject: [PATCH 6/6] wip --- source/channel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/channel.c b/source/channel.c index eb4e6f0ef..622bf42dc 100644 --- a/source/channel.c +++ b/source/channel.c @@ -1005,6 +1005,7 @@ int aws_channel_slot_on_handler_shutdown_complete( } size_t aws_channel_slot_downstream_read_window(struct aws_channel_slot *slot) { + AWS_FATAL_ASSERT(false); AWS_ASSERT(slot->adj_right); return slot->channel->read_back_pressure_enabled ? slot->adj_right->window_size : SIZE_MAX; }