Skip to content

Conversation

@jchapma
Copy link
Contributor

@jchapma jchapma commented Mar 6, 2024

Bug Description: A corner cases exists, where the slapd_daemon has begun its shutdown process but the accept_thread is still running and capable of handling new connections. When this scenario occurs, the connection subsystem has been partially deallocated and is in an unstable state. A segfault is generated when attempting to get a new connection from the connection table.

Fix Description: The connection table is only deallocated when the number of active threads is 0. Modify the accept_thread to adjust the the active thread count during creation/destruction, meaning the connection table can only be freed when the accept_thread has completed

Relates: #6119

Reviewed by:

Bug Description: A corner cases exists, where the slapd_daemon has
begun its shutdown process but the accept_thread is still running
and capable of handling new connections. When this scenario occurs,
the connection subsystem has been partially deallocated and is in
an unstable state. A segfault is generated when attempting to get a
new connection from the connection table.

Fix Description: The connection table is only deallocated when the
number of active threads is 0. Modify the accept_thread to adjust the
the active thread count during creation/destruction, meaning the connection
table can only be freed when the accept_thread has completed

Relates: 389ds#6119

Reviewed by:
@jchapma jchapma added the work in progress Work in Progress - can be reviewed, but not ready for merge. label Mar 6, 2024
Copy link
Contributor

@tbordaz tbordaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

errorCode, slapd_pr_strerror(errorCode));
g_set_shutdown(SLAPI_SHUTDOWN_EXIT);
} else{
g_incr_active_threadcnt();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation :-)

@jchapma jchapma merged commit 1d73b8a into 389ds:main Mar 8, 2024
@jchapma
Copy link
Contributor Author

jchapma commented Mar 8, 2024

I will cherry pick back to relevant branches on Monday

jchapma added a commit that referenced this pull request Apr 10, 2024
Bug Description: A corner cases exists, where the slapd_daemon has
begun its shutdown process but the accept_thread is still running
and capable of handling new connections. When this scenario occurs,
the connection subsystem has been partially deallocated and is in
an unstable state. A segfault is generated when attempting to get a
new connection from the connection table.

Fix Description: The connection table is only deallocated when the
number of active threads is 0. Modify the accept_thread to adjust the
the active thread count during creation/destruction, meaning the connection
table can only be freed when the accept_thread has completed

Relates: #6119

Reviewed by: @tbordaz, @Firstyear , @mreynolds389  (Thank you)
jchapma added a commit that referenced this pull request Jun 26, 2025
Bug Description: A corner cases exists, where the slapd_daemon has
begun its shutdown process but the accept_thread is still running
and capable of handling new connections. When this scenario occurs,
the connection subsystem has been partially deallocated and is in
an unstable state. A segfault is generated when attempting to get a
new connection from the connection table.

Fix Description: The connection table is only deallocated when the
number of active threads is 0. Modify the accept_thread to adjust the
the active thread count during creation/destruction, meaning the connection
table can only be freed when the accept_thread has completed

Relates: #6119

Reviewed by: @tbordaz, @Firstyear , @mreynolds389  (Thank you)
jchapma added a commit that referenced this pull request Jun 26, 2025
Bug Description: A corner cases exists, where the slapd_daemon has
begun its shutdown process but the accept_thread is still running
and capable of handling new connections. When this scenario occurs,
the connection subsystem has been partially deallocated and is in
an unstable state. A segfault is generated when attempting to get a
new connection from the connection table.

Fix Description: The connection table is only deallocated when the
number of active threads is 0. Modify the accept_thread to adjust the
the active thread count during creation/destruction, meaning the connection
table can only be freed when the accept_thread has completed

Relates: #6119

Reviewed by: @tbordaz, @Firstyear , @mreynolds389  (Thank you)
jchapma added a commit that referenced this pull request Jun 26, 2025
Bug Description: A corner cases exists, where the slapd_daemon has
begun its shutdown process but the accept_thread is still running
and capable of handling new connections. When this scenario occurs,
the connection subsystem has been partially deallocated and is in
an unstable state. A segfault is generated when attempting to get a
new connection from the connection table.

Fix Description: The connection table is only deallocated when the
number of active threads is 0. Modify the accept_thread to adjust the
the active thread count during creation/destruction, meaning the connection
table can only be freed when the accept_thread has completed

Relates: #6119

Reviewed by: @tbordaz, @Firstyear , @mreynolds389  (Thank you)
jchapma added a commit that referenced this pull request Jun 26, 2025
Bug Description: A corner cases exists, where the slapd_daemon has
begun its shutdown process but the accept_thread is still running
and capable of handling new connections. When this scenario occurs,
the connection subsystem has been partially deallocated and is in
an unstable state. A segfault is generated when attempting to get a
new connection from the connection table.

Fix Description: The connection table is only deallocated when the
number of active threads is 0. Modify the accept_thread to adjust the
the active thread count during creation/destruction, meaning the connection
table can only be freed when the accept_thread has completed

Relates: #6119

Reviewed by: @tbordaz, @Firstyear , @mreynolds389  (Thank you)
jchapma added a commit that referenced this pull request Jun 26, 2025
Bug Description: A corner cases exists, where the slapd_daemon has
begun its shutdown process but the accept_thread is still running
and capable of handling new connections. When this scenario occurs,
the connection subsystem has been partially deallocated and is in
an unstable state. A segfault is generated when attempting to get a
new connection from the connection table.

Fix Description: The connection table is only deallocated when the
number of active threads is 0. Modify the accept_thread to adjust the
the active thread count during creation/destruction, meaning the connection
table can only be freed when the accept_thread has completed

Relates: #6119

Reviewed by: @tbordaz, @Firstyear , @mreynolds389  (Thank you)
jchapma added a commit that referenced this pull request Jun 26, 2025
Bug Description: A corner cases exists, where the slapd_daemon has
begun its shutdown process but the accept_thread is still running
and capable of handling new connections. When this scenario occurs,
the connection subsystem has been partially deallocated and is in
an unstable state. A segfault is generated when attempting to get a
new connection from the connection table.

Fix Description: The connection table is only deallocated when the
number of active threads is 0. Modify the accept_thread to adjust the
the active thread count during creation/destruction, meaning the connection
table can only be freed when the accept_thread has completed

Relates: #6119

Reviewed by: @tbordaz, @Firstyear , @mreynolds389  (Thank you)
jchapma added a commit that referenced this pull request Jun 26, 2025
Bug Description: A corner cases exists, where the slapd_daemon has
begun its shutdown process but the accept_thread is still running
and capable of handling new connections. When this scenario occurs,
the connection subsystem has been partially deallocated and is in
an unstable state. A segfault is generated when attempting to get a
new connection from the connection table.

Fix Description: The connection table is only deallocated when the
number of active threads is 0. Modify the accept_thread to adjust the
the active thread count during creation/destruction, meaning the connection
table can only be freed when the accept_thread has completed

Relates: #6119

Reviewed by: @tbordaz, @Firstyear , @mreynolds389  (Thank you)
vashirov pushed a commit that referenced this pull request Jun 30, 2025
Bug Description: A corner cases exists, where the slapd_daemon has
begun its shutdown process but the accept_thread is still running
and capable of handling new connections. When this scenario occurs,
the connection subsystem has been partially deallocated and is in
an unstable state. A segfault is generated when attempting to get a
new connection from the connection table.

Fix Description: The connection table is only deallocated when the
number of active threads is 0. Modify the accept_thread to adjust the
the active thread count during creation/destruction, meaning the connection
table can only be freed when the accept_thread has completed

Relates: #6119

Reviewed by: @tbordaz, @Firstyear , @mreynolds389  (Thank you)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

work in progress Work in Progress - can be reviewed, but not ready for merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants