From b4c452ab72122c3bc049cdcbc88f2dfb372ae764 Mon Sep 17 00:00:00 2001 From: Marcella Mancinetti Date: Jul 28 2021 09:48:28 +0000 Subject: Fix collectd crash introduced in 2.0.31 --- diff --git a/SOURCES/0001-unix_thread-Remove-the-fd-handler-sets-before-it-s-s.patch b/SOURCES/0001-unix_thread-Remove-the-fd-handler-sets-before-it-s-s.patch new file mode 100644 index 0000000..dde4012 --- /dev/null +++ b/SOURCES/0001-unix_thread-Remove-the-fd-handler-sets-before-it-s-s.patch @@ -0,0 +1,30 @@ +From d613d279dbce2d5e4594f6fed39653d83af0d99b Mon Sep 17 00:00:00 2001 +From: Corey Minyard +Date: Mon, 5 Jul 2021 09:59:29 -0500 +Subject: [PATCH] unix_thread: Remove the fd handler sets before it's set up + +There were a couple of fd handler set before the fd was actually +configured. With recent changes in the selector code that would result +in an assert. The calls were unnecessary, so remove them. + +Signed-off-by: Corey Minyard +--- + unix/posix_thread_os_hnd.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/unix/posix_thread_os_hnd.c b/unix/posix_thread_os_hnd.c +index 28c66898..cb315c5e 100644 +--- a/unix/posix_thread_os_hnd.c ++++ b/unix/posix_thread_os_hnd.c +@@ -140,8 +140,6 @@ add_fd(os_handler_t *handler, + fd_data->data_ready = data_ready; + fd_data->handler = handler; + fd_data->freed = freed; +- sel_set_fd_write_handler(posix_sel, fd, SEL_FD_HANDLER_DISABLED); +- sel_set_fd_except_handler(posix_sel, fd, SEL_FD_HANDLER_DISABLED); + rv = sel_set_fd_handlers(posix_sel, fd, fd_data, fd_handler, NULL, NULL, + free_fd_data); + if (rv) { +-- +2.31.1 + diff --git a/SPECS/OpenIPMI.spec b/SPECS/OpenIPMI.spec index 0dc9dc0..bf7ee73 100644 --- a/SPECS/OpenIPMI.spec +++ b/SPECS/OpenIPMI.spec @@ -12,6 +12,8 @@ Source1: openipmi.sysconf Source2: openipmi-helper Source3: ipmi.service Patch1: 0001-man.patch +# https://sourceforge.net/p/openipmi/bugs/93/ +Patch2: 0001-unix_thread-Remove-the-fd-handler-sets-before-it-s-s.patch BuildRequires: gdbm-devel swig glib2-devel net-snmp-devel ncurses-devel BuildRequires: openssl-devel python3-devel perl-devel perl-generators