Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slurm_spank_init: return early if lua_script_list is empty #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kcgthb
Copy link

@kcgthb kcgthb commented Jan 16, 2018

In the Lua SPANK plugin, if no Lua script exist in the script list, the plugin will generate a segfault when trying to create the spank table:

(gdb) bt
#0  0x00007ffff6d99c30 in pthread_mutex_lock () from /usr/lib64/libpthread.so.0
#1  0x00007ffff7481d71 in list_iterator_create (l=0x0) at list.c:607
#2  0x00007ffff4e4075e in spank_lua_options_table_register () from /usr/lib64/slurm/lua.so
#3  0x00007ffff4e40e2b in slurm_spank_init () from /usr/lib64/slurm/lua.so
#4  0x00007ffff753c953 in _do_call_stack (stack=<optimized out>, type=type@entry=SPANK_INIT, job=job@entry=0x0, taskid=taskid@entry=-1) at plugstack.c:747
#5  0x00007ffff753ddfe in _spank_init (context=context@entry=S_TYPE_SLURMD, job=job@entry=0x0) at plugstack.c:780
#6  0x00007ffff753de32 in spank_slurmd_init () at plugstack.c:841
#7  0x000000000040e8e7 in _slurmd_init () at slurmd.c:1463
#8  main (argc=2, argv=0x7fffffffe418) at slurmd.c:258

A solution is to return early in slurm_spank_init() if the list is empty.

grondo added a commit that referenced this pull request Jun 6, 2018
update NEWS and META for v0.38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant