Created attachment 13226 [details] Fix for src/api build
Created attachment 13227 [details] patch for src/plugins/switch/cray_aries build
Created attachment 13228 [details] patch to src/sru/libsrun for freebsd build
The author for these patches is: Jason Bacon <bacon4000@gmail.com> His message is as follows: I got a report from another developer that the Makefile.in patch fixes an undefined symbol issue with clang 10. I have not looked that closely at it, but just confirmed that it doesn't break anything for clang 8.
Created attachment 13608 [details] patch for src/plugins/cli_filter/user_defaults/cli_filter_user_defaults.c
Created attachment 13609 [details] patch for src/plugins/mpi/cray_shasta/mpi_cray_shasta.c
Created attachment 13610 [details] patch for src/plugins/proctrack/pgid/proctrack_pgid.c Relieves unconditional dependence on linux procfs mount. Linux procfs is still required for jobacct_gather/linux to function on FreeBSD.
Created attachment 13611 [details] patch for src/slurmctld/prep_slurmctld.c
*** Ticket 5792 has been marked as a duplicate of this ticket. ***
Updated to include a full set of patches for 20.02.1. Also eliminated unconditional dependence on Linux procfs by adding code utilizing FreeBSD's libprocstat. Linux procfs will still be necessary for users who want to use jobacct_gather/linux.
Thanks Jason. I'm starting to work through getting these in ahead of 20.02.2, and a few of them have been pushed already (I'll mark the corresponding attachments as obsolete in a second). commit f854ebfa31b27a4ca6beb64d2319b42bcd1fdd42 Author: Jason Bacon <bacon4000@gmail.com> AuthorDate: Thu Apr 9 13:18:20 2020 -0600 Add missing signal.h include. Needed on FreeBSD. Bug 8602. commit ac69a9f0af867212435a57287abe00efb811e599 Author: Jason Bacon <bacon4000@gmail.com> AuthorDate: Thu Apr 9 13:05:47 2020 -0600 Add missing limits.h include. Needed on FreeBSD. Bug 8602.
Comment on attachment 13227 [details] patch for src/plugins/switch/cray_aries build The switch/cray_aries plugin no longer builds by default, and thus this patch should not be necessary.
Comment on attachment 13228 [details] patch to src/sru/libsrun for freebsd build This was addressed before 19.05 was released with the following commit: commit 83b4d70a00b7d6dc05bd1c38b14f17d87dae0a4d Author: Tim Wickberg <tim@schedmd.com> AuthorDate: Thu Jan 3 22:22:57 2019 -0700 Replace __environ with environ. Declare as extern; the linker will find this in libc somewhere. Bug 5561.
Created attachment 13698 [details] FreeBSD version of proctrack_p_get_pids() Jason - Do you mind testing this? It's your FreeBSD version of the proctrack_p_get_pids() after tweaking the style to match the current conventions, and should be functionally identical to what you'd submitted. thanks, - Tim
Comment on attachment 13226 [details] Fix for src/api build commit 6eeae2bc7b94c897513f10ed6cac32e762f2f170 Author: Jason Bacon <bacon4000@gmail.com> AuthorDate: Thu Apr 9 16:01:28 2020 -0600 Simplify version map for libslurmfull. Everything is already exported under global, so a wildcard for local does nothing. (Except break the build for FreeBSD with LLVM 10.0.) Bug 8602.
Thanks Jason. These are all in ahead of 20.02.2 with the exception of the proctrack/pgid patch as mentioned in comment 13. If you can verify I did not break that on review I'll get that pushed, and get this ticket closed out. thanks again, - Tim
Hi Tim, Thanks for your work on this. It seems your changes did break something. With your new patch, jobs are hanging at completion. Reverting to my old patch made the issue go away. I'll have a closer look ASAP to see if I can spot any key differences. Best, JB
(In reply to Tim Wickberg from comment #13) > Created attachment 13698 [details] > FreeBSD version of proctrack_p_get_pids() > > Jason - > > Do you mind testing this? It's your FreeBSD version of the > proctrack_p_get_pids() after tweaking the style to match the current > conventions, and should be functionally identical to what you'd submitted. > > thanks, > - Tim You have to initialize pid_count: -+ unsigned int pid_count; ++ unsigned int pid_count = 0; procstat_getprocs() does not set the pid_count pointer when no matching processes are found. This is another aspect of the function treating this case as an error. I'll suggest in the FreeBSD PR that this might be considered a bug, though there may be a reason for the behavior that I'm not aware of. Best, JB
Comment on attachment 13698 [details] FreeBSD version of proctrack_p_get_pids() commit 9383bf02bce104a0c9753bb444cd33beeec52d5b Author: Jason Bacon <bacon4000@gmail.com> AuthorDate: Thu Apr 9 13:13:36 2020 -0600 Add FreeBSD implementation of proctrack_p_get_pids(). Bug 8602.
Thanks for all these Jason. These are all in ahead of the 20.02.2 maintenance release, and I'm marking this issue resolved. Please reopen (or file a separate issues) if you have anything else. - Tim
Oops, sorry, one grievous oversight... I forgot to revert the error stream to stderr after the redirect is no longer needed, which is just a matter of err_set_file(NULL). Here's a patch: + proc_list = procstat_getprocs(proc_info, KERN_PROC_PGRP, cont_id, + (unsigned int *) &pid_count); + if (procstat_err) ++ { ++ err_set_file(NULL); + fclose(procstat_err); ++ } + + if (pid_count > 0) { + xrecalloc(pid_array, sizeof(pid_t), pid_count);