#48005 ns-slapd crash in shutdown phase
Closed: Fixed None Opened 5 years ago by nhosoi.

Tasks referred in a long running task thread could have been already destroyed by destroy_task called from the main thread which is in shutdown.

Shutdown should wait for the end of such a long running task or the long running task should be notified when it is being destroyed.


Are the schema_reload, tombstone_fixup, syntax validate, sysconfig reload, usnTombstone cleanup, cleanallruv, db2ldif, ldif2db, db2index, db2bak, bak2db, windows sync memberuid fixup, automember_(rebuild, map, export) tasks susceptible to this as well?

Replying to [comment:5 mreynolds]:

Are the schema_reload, tombstone_fixup, syntax validate, sysconfig reload, usnTombstone cleanup, cleanallruv, db2ldif, ldif2db, db2index, db2bak, bak2db, windows sync memberuid fixup, automember_(rebuild, map, export) tasks susceptible to this as well?

Yeah, the code requires a destructor. E.g., schemareload_destructor and syntax_validate_task_destructor are good candidates to add. USN tombstone does not have it. Should we add one? How about cleanruv? Continue investigating it... Thanks!

git patch file (master) -- revised to cover all the long running tasks
0001-Ticket-48005-ns-slapd-crash-in-shutdown-phase.2.patch

Looks good, and my lib389 testing (for cleanallruv) also looks good with your patch.

Minor issue: there is an indentation issue in usn_cleanup.c starting on line 340

Thanks to Mark for reviewing the proposals. Fixed the indentations in usn_cleanup.c.
{{{
Pushed to master:
e0219e8..1557df5 master -> master
commit 0cfda18
Ticket #48005 - ns-slapd crash in shutdown phase
commit 1557df5
Ticket 48005 - CI test: added test cases for ticket 48005

Pushed to 389-ds-base-1.3.3:
c81c032..6a315fe 389-ds-base-1.3.3 -> 389-ds-base-1.3.3
commit 3a53dd0
Ticket #48005 - ns-slapd crash in shutdown phase
commit 6a315fe
Ticket 48005 - CI test: added test cases for ticket 48005
}}}

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.3.3.9

3 years ago

Login to comment on this ticket.

Metadata