I wanted to test the YAML output option, but the commands dump core: # sinfo --yaml sinfo: error: load_plugins: unable to find plugin: serializer/yaml Segmentation fault (core dumped) I'm probably missing some required library in my Slurm RPM build. The OS is CentOS 7.9 containing this libyaml RPM: # rpm -q libyaml libyaml-0.1.4-11.el7_0.x86_64 Ole
Created attachment 32226 [details] The RPM configure log file ~/rpmbuild/BUILD/slurm-23.02.4/config.log
In the YAML Parser installation instructions at https://slurm.schedmd.com/download.html#yaml the libyaml version 0.2.5 gets installed. However, in CentOS 7 and RHEL/Rocky/Alma 8 only some older versions 0.1.4 and 0.1.7 are available for installation. The EL9 contains 0.2.5. Can Slurm somehow use the older libyaml versions, or at least detect that an old version is installed? Otherwise we might have to find a way to build libyaml RPM packages for version 0.2.5. Ole
(In reply to Ole.H.Nielsen@fysik.dtu.dk from comment #2) > Can Slurm somehow use the older libyaml versions, or at least detect that an > old version is installed? Otherwise we might have to find a way to build > libyaml RPM packages for version 0.2.5. It could select any one of them depending on which one is found first during configure.
(In reply to Nate Rini from comment #3) > (In reply to Ole.H.Nielsen@fysik.dtu.dk from comment #2) > > Can Slurm somehow use the older libyaml versions, or at least detect that an > > old version is installed? Otherwise we might have to find a way to build > > libyaml RPM packages for version 0.2.5. > > It could select any one of them depending on which one is found first during > configure. The system only has 1 libyaml version, namely the older 0.1.4/0.1.7 from the installed RPM. I meant to ask whether Slurm's YAML plugin can be made to function correctly with libyaml 0.1.X? If this is not possible, the minimum working version of libyaml ought to be documented. Thanks, Ole
(In reply to Ole.H.Nielsen@fysik.dtu.dk from comment #4) > I meant to ask whether Slurm's YAML plugin can be made to function correctly > with libyaml 0.1.X? > If this is not possible, the minimum working version of libyaml ought to be > documented. From the logs, it looks like configure handled everything correctly: > configure:21130: checking for libyaml installation > configure:21172: result: > configure:21177: WARNING: unable to locate libyaml parser library I will add a note about the minimum libyaml required.
(In reply to Nate Rini from comment #5) > (In reply to Ole.H.Nielsen@fysik.dtu.dk from comment #4) > > I meant to ask whether Slurm's YAML plugin can be made to function correctly > > with libyaml 0.1.X? > > If this is not possible, the minimum working version of libyaml ought to be > > documented. > > From the logs, it looks like configure handled everything correctly: > > configure:21130: checking for libyaml installation > > configure:21172: result: > > configure:21177: WARNING: unable to locate libyaml parser library Yes, I saw this too, despite libyaml version 0.1.4 (CentOS 7 RPM) being installed and available in the expected location: $ ls -l /usr/lib64/libyaml* lrwxrwxrwx. 1 root root 18 Dec 15 2016 /usr/lib64/libyaml-0.so.2 -> libyaml-0.so.2.0.4 -rwxr-xr-x. 1 root root 131096 Jan 30 2015 /usr/lib64/libyaml-0.so.2.0.4 > I will add a note about the minimum libyaml required. Thanks. Following that documentation we will have to make workarounds to build and install the libyaml RPM packages, since these are not provided by EL7 and EL8 Linux. Ole
I looked at the Slurm configure script and found that it determines whether libyaml is installed or not by searching for the yaml.h file, not the library itself. On CentOS and RHEL (and clones) the yaml.h file is only installed with the libyaml-devel RPM package: $ rpm -qf /usr/include/yaml.h libyaml-devel-0.1.4-11.el7_0.x86_64 Likewise, I suppose that the libjwt-devel RPM package must also be installed. I've rebuilt Slurm RPM packages with these prerequisites, and "sinfo --yaml" now works correctly. The core dump reported in comment 0 should nevertheless be fixed. It occurs when the libyaml-devel RPM package wasn't installed when building Slurm RPMs. I would like to ask that the download page https://slurm.schedmd.com/download.html#json should be updated with an extra paragraph at the end: For RPM based installations the development libraries should be installed by: $ yum install http-parser-devel json-c-devel libjwt-devel libyaml-devel Thanks, Ole
It would also be good to add this documentation to https://slurm.schedmd.com/faq.html#json_serializer For RPM based installations the development libraries should be installed by: $ yum install http-parser-devel json-c-devel libjwt-devel libyaml-devel
Ole I created bug#17731 to handle the RPM specific issues to avoid confusing that and the segfault originally reported in comment#0.
(In reply to Nate Rini from comment #12) > I created bug#17731 to handle the RPM specific issues to avoid confusing > that and the segfault originally reported in comment#0. Thanks, sounds good! Ole
Ole The segfault has now been fixed and minimum versions have been noted for libyaml/libjson-c for the upcoming Slurm-23.02.6 release: > 42a08d9caf interfaces/data_parser - Avoid passing NULL to printf() > 3df118258b plugrack - Always allocate functions array > a0f9e6275d Docs - Note min version for libyaml and libjson-c Closing out the ticket as rpm-related issues are to be handled in bug#17731. Please respond if there are any more issues or related questions. --Nate
Hi Nate (In reply to Nate Rini from comment #21) > The segfault has now been fixed and minimum versions have been noted for > libyaml/libjson-c for the upcoming Slurm-23.02.6 release: > > 42a08d9caf interfaces/data_parser - Avoid passing NULL to printf() > > 3df118258b plugrack - Always allocate functions array > > a0f9e6275d Docs - Note min version for libyaml and libjson-c Sounds good! Thanks a lot for the patches! > Closing out the ticket as rpm-related issues are to be handled in bug#17731. OK, I look forward to resolution of those issues as well. Ole