Skip to content

Commit

Permalink
modules/content: drop incorrect assertion
Browse files Browse the repository at this point in the history
Problem: sometimes brokers hit an assertion when the
content module is unloaded during shutdown.

The assertion is that there are no pending load/store operations
waiting on a cache entry when it is destroyed.  This is certainly
possible, depending on the behavior of users of the load/store
RPCs.  In the case of unload in rc3, dependent modules would have
already been unloaded, so it seems safe to simply destroy any
pending RPCs without responding to them.

Destroy them, if present.

Fixes #5706
  • Loading branch information
garlick committed Mar 8, 2024
1 parent 0a8e91a commit b53f8ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/content/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ static void cache_entry_destroy (struct cache_entry *e)
{
if (e) {
int saved_errno = errno;
assert (e->load_requests == NULL);
assert (e->store_requests == NULL);
msgstack_destroy (&e->load_requests);
msgstack_destroy (&e->store_requests);
if (e->mmapped)
content_mmap_region_decref (e->data_container);
else
Expand Down

0 comments on commit b53f8ee

Please sign in to comment.