Fix a dealock scenario when registering depricated MCA parameters. The internal loop uses the 'item' variable that is used by the outer loop as well. So when the outer loop checks the value of 'item' it will never equal the end of the list since it no longer references the same list.
Kinda found by MTT. MTT calls 'ompi_info --all --parsable' and it was livelocked and had to be killed by hand. I'm going to push this one to Jeff to push to v1.3 since he did the original implementation and should check this code. This commit was SVN r19014.
Этот коммит содержится в:
родитель
6c21851160
Коммит
ca43968418
@ -1881,7 +1881,7 @@ static bool lookup_file(mca_base_param_t *param,
|
||||
bool found = false;
|
||||
syn_info_t *si;
|
||||
char *deprecated_name = NULL;
|
||||
opal_list_item_t *item;
|
||||
opal_list_item_t *item, *in_item;
|
||||
mca_base_param_file_value_t *fv;
|
||||
bool print_deprecated_warning = false;
|
||||
|
||||
@ -1915,10 +1915,10 @@ static bool lookup_file(mca_base_param_t *param,
|
||||
!opal_list_is_empty(param->mbp_synonyms)) {
|
||||
/* Check all the synonyms on this parameter and see if the
|
||||
file value matches */
|
||||
for (item = opal_list_get_first(param->mbp_synonyms);
|
||||
opal_list_get_end(param->mbp_synonyms) != item;
|
||||
item = opal_list_get_next(item)) {
|
||||
si = (syn_info_t*) item;
|
||||
for (in_item = opal_list_get_first(param->mbp_synonyms);
|
||||
opal_list_get_end(param->mbp_synonyms) != in_item;
|
||||
in_item = opal_list_get_next(in_item)) {
|
||||
si = (syn_info_t*) in_item;
|
||||
if (0 == strcmp(fv->mbpfv_param, si->si_full_name)) {
|
||||
found = true;
|
||||
if ((si->si_deprecated &&
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user