[Bug 176] New: iv_event_raw module doesn't work on mips64el n32, missing include
https://bugzilla.balabit.com/show_bug.cgi?id=176 Summary: iv_event_raw module doesn't work on mips64el n32, missing include Product: syslog-ng Version: 3.3.x Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: unspecified Component: syslog-ng AssignedTo: bazsi@balabit.hu ReportedBy: mads@ab3.no Type of the Report: bug Estimated Hours: 0.0 Created an attachment (id=57) --> (https://bugzilla.balabit.com/attachment.cgi?id=57) iv_event_raw.c patch, missing include I have a Lemote Fuloong 2F mips64el (n32) machine running Gentoo, the uname looks like this: Linux Lemote 3.3.0 #5 PREEMPT Wed Apr 18 13:25:19 CEST 2012 mips64 ICT Loongson-2 V0.3 FPU V0.1 lemote-fuloong-2f-box GNU/Linux This machine doesn't get updated that often, so I didn't discover that syslog-ng didn't work before I updated syslog-ng to version 3.3.4 and then later 3.3.5 recently. Tested with glibc 2.14 and 2.15. Running syslog-ng -d: eventfd2: Invalid argument Trying to open module; module='affile', filename='/usr/lib32/syslog-ng/libaffile.so' Trying to open module; module='afprog', filename='/usr/lib32/syslog-ng/libafprog.so' Trying to open module; module='afsocket', filename='/usr/lib32/syslog-ng/libafsocket.so' Trying to open module; module='afuser', filename='/usr/lib32/syslog-ng/libafuser.so' Trying to open module; module='basicfuncs', filename='/usr/lib32/syslog-ng/libbasicfuncs.so' Trying to open module; module='csvparser', filename='/usr/lib32/syslog-ng/libcsvparser.so' Trying to open module; module='dbparser', filename='/usr/lib32/syslog-ng/libdbparser.so' Trying to open module; module='syslogformat', filename='/usr/lib32/syslog-ng/libsyslogformat.so' Running application hooks; hook='1' Running application hooks; hook='3' syslog-ng starting up; version='3.3.5' eventfd2: Invalid argument eventfd2: Invalid argument eventfd2: Invalid argument eventfd2: Invalid argument eventfd2: Invalid argument Segmentation fault I checked the file lib/ivykis/modules/iv_event_raw.c as it was the only file calling the eventfd2 syscall, and I noticed that it defines EFD_NONBLOCK and EFD_CLOEXEC if it's not already defined by the includes. I then noticed the values existed in <sys/eventfd.h>, and that the values in that file were other values that the ones defined in iv_event_raw.c. So I just included <sys/eventfd.h>, and that fixed the problem. Attaching a patch fixing the problem for me. -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=176 --- Comment #1 from Lennert Buytenhek <buytenh@wantstofly.org> 2012-04-30 17:48:08 --- Created an attachment (id=58) --> (https://bugzilla.balabit.com/attachment.cgi?id=58) Suggested fix The idea is good, but this particular way of fixing it would break non-Linux configurations. This macro spaghetti is from before the days when ivykis was built with autoconf. I think we should fix it in autoconf instead, and something like the attached patch should do the trick. Can you test if it works on your MIPS machine? (It's against upstream ivykis, might not apply entirely cleanly against the copy in syslog-ng.) -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=176 Mads <mads@ab3.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mads@ab3.no --- Comment #2 from Mads <mads@ab3.no> 2012-04-30 20:02:03 --- Your patch unfortunately does not apply cleanly to syslog-ng's ivykis (the files differ greatly), but I see you applied the patch to your github repo. I just tried removed the bundled ivykis dir and replacing it with the one from your repo, but this makes the compilation fail at mainloop.h. mainloop.h:39:20: error: field 'list' has incomplete type mainloop.h: In function 'main_loop_io_worker_finish_callback_init': mainloop.h:47:3: warning: implicit declaration of function 'INIT_LIST_HEAD' [-Wimplicit-function-declaration] mainloop.h: At top level: mainloop.h:59:20: error: field 'finish_callbacks' has incomplete type afinter.c: In function 'afinter_source_new': afinter.c:307:3: warning: passing argument 1 of 'log_source_set_options' from incompatible pointer type [enabled by default] logsource.h:90:6: note: expected 'struct LogSource *' but argument is of type 'struct LogPipe *' -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=176 --- Comment #3 from Mads <mads@ab3.no> 2012-04-30 20:47:29 --- Created an attachment (id=59) --> (https://bugzilla.balabit.com/attachment.cgi?id=59) Suggested fix #2, applies to syslog-ng 3.3.5 I thought I should at least try to make the suggested fixes, so I fixed configure.ac manually. And it seems to be working :) -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=176 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |algernon@balabit.hu AssignedTo|bazsi@balabit.hu |algernon@balabit.hu -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=176 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=176 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.3.6 -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=176 Jose Oliveira <jpo@di.uminho.pt> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jpo@di.uminho.pt -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=176 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution| |FIXED Status|ASSIGNED |RESOLVED --- Comment #4 from Gergely Nagy <algernon@balabit.hu> 2012-06-05 13:12:39 --- (In reply to comment #3)
Created an attachment (id=59) --> (https://bugzilla.balabit.com/attachment.cgi?id=59) [details] Suggested fix #2, applies to syslog-ng 3.3.5
I thought I should at least try to make the suggested fixes, so I fixed configure.ac manually. And it seems to be working :)
I applied this patch to github.com/algernon/ivykis (on the balabit branch). syslog-ng 3.3.6 will include it. Thanks! -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
bugzilla@bugzilla.balabit.com