[Bug 188] New: Syslog-ng 3.3.5.90-20120810 problems: undefined symbol and ld.so library path
https://bugzilla.balabit.com/show_bug.cgi?id=188 Summary: Syslog-ng 3.3.5.90-20120810 problems: undefined symbol and ld.so library path Product: syslog-ng Version: 3.3.x Platform: PC OS/Version: Mac OS Status: NEW Severity: normal Priority: unspecified Component: syslog-ng AssignedTo: bazsi@balabit.hu ReportedBy: jpo@di.uminho.pt Type of the Report: --- Estimated Hours: 0.0 Linux distro: Fedora 17 x86_64 Syslog-ng source tarball: syslog-ng-3.3.5.90-20120810-v3.3.5-43-g19f6c.tar.gz we have encountered a couple of problems when running syslog-ng-3.3.5.90-20120810 under Fedora 17 x86_64: 1) ld.so library path 2) undefined symbol: tls_context_setup_session Steps to reproduce the problem: 1) just run "/usr/sbin/syslog-ng --version" ---------- # /usr/sbin/syslog-ng --version syslog-ng 3.3.5.90 Installer-Version: 3.3.5.90 Revision: Compile-Date: Aug 17 2012 22:09:52 Default-Modules: affile,afprog,afsocket,afuser,basicfuncs,csvparser,dbparser,syslogformat,afsql Error opening plugin module; module='afsocket', error='libsyslog-ng-crypto.so: cannot open shared object file: No such file or directory' Error opening plugin module; module='afsocket-notls', error='//usr/lib64/syslog-ng/libafsocket-notls.so: undefined symbol: tls_context_setup_session' Error opening plugin module; module='afsocket-tls', error='libsyslog-ng-crypto.so: cannot open shared object file: No such file or directory' Available-Modules: dummy,afsql,tfjson,dbparser,csvparser,convertfuncs,afuser,basicfuncs,afmongodb,confgen,syslogformat,affile,afprog Enable-Debug: off Enable-GProf: off Enable-Memtrace: off Enable-IPv6: on Enable-Spoof-Source: on Enable-TCP-Wrapper: on Enable-Linux-Caps: on Enable-Pcre: on ---------- The library path problem can be solved by creating the file "/etc/ld.so.conf.d/syslog-ng.conf" containing the syslog-ng module directory ( /usr/lib64/syslog-ng in this particular case ). Running syslog-ng under strace without touching the ld.so library paths produces: ---------- # # strace -e trace=file /usr/sbin/syslog-ng --version ... access("//usr/lib64/syslog-ng/libafsocket.so", F_OK) = 0 stat("//usr/lib64/syslog-ng/libafsocket.so", {st_mode=S_IFREG|0755, st_size=103560, ...}) = 0 open("//usr/lib64/syslog-ng/libafsocket.so", O_RDONLY|O_CLOEXEC) = 4 open("/lib64/tls/libsyslog-ng-crypto.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/lib64/libsyslog-ng-crypto.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/usr/lib64/tls/x86_64/libsyslog-ng-crypto.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib64/tls/x86_64", 0x7fff0f81fcb0) = -1 ENOENT (No such file or directory) open("/usr/lib64/tls/libsyslog-ng-crypto.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib64/tls", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0 open("/usr/lib64/x86_64/libsyslog-ng-crypto.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib64/x86_64", 0x7fff0f81fcb0) = -1 ENOENT (No such file or directory) open("/usr/lib64/libsyslog-ng-crypto.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/lib64", {st_mode=S_IFDIR|0555, st_size=49152, ...}) = 0 Error opening plugin module; module='afsocket', error='libsyslog-ng-crypto.so: cannot open shared object file: No such file or directory' ... ----------- Note that all syslog-ng modules with the exception of libsyslog-ng-crypto.so are loaded from the syslog-ng modules directory. Output of "syslog-ng --version" after creating the file "/etc/ld.so.conf.d/syslog-ng.conf" ---------- # /usr/sbin/syslog-ng --version syslog-ng 3.3.5.90 Installer-Version: 3.3.5.90 Revision: Compile-Date: Aug 17 2012 22:09:52 Default-Modules: affile,afprog,afsocket,afuser,basicfuncs,csvparser,dbparser,syslogformat,afsql Error opening plugin module; module='afsocket-notls', error='//usr/lib64/syslog-ng/libafsocket-notls.so: undefined symbol: tls_context_setup_session' Available-Modules: dummy,afsocket,afsql,tfjson,dbparser,csvparser,convertfuncs,afuser,basicfuncs,afmongodb,afsocket-tls,confgen,syslogformat,affile,afprog Enable-Debug: off Enable-GProf: off Enable-Memtrace: off Enable-IPv6: on Enable-Spoof-Source: on Enable-TCP-Wrapper: on Enable-Linux-Caps: on Enable-Pcre: on ---------- /jpo -- 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=188 --- Comment #1 from Jose Oliveira <jpo@di.uminho.pt> 2012-08-18 00:27:53 --- Problem also being tracked in the Red Hat's bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=700766 (see comments >= 29) -- 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=188 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |algernon@balabit.hu AssignedTo|bazsi@balabit.hu |algernon@balabit.hu --- Comment #2 from Gergely Nagy <algernon@balabit.hu> 2012-08-18 13:12:13 --- (In reply to comment #0)
we have encountered a couple of problems when running syslog-ng-3.3.5.90-20120810 under Fedora 17 x86_64:
1) ld.so library path 2) undefined symbol: tls_context_setup_session
The second is due to afsocket-notls being compiled with ENABLE_SSL set by mistake. I saw that before, but forgot about it unfortunately. If you're shipping both afsocket and afsocket-notls in the same package, the easy fix is to not ship the latter, only one of these will be used anyway (even if I fix the compiling bug). As for the library path, that's a tougher one: libsyslog-ng-crypto is not really a module, but a private shared library. The libafsocket-tls.so should have an RPATH set to /usr/lib64/syslog-ng, that way the ld.so.conf.d/ workaround wouldn't be needed. I'm not sure whether Fedora allows RPATH, on Debian, the plugins that link to libsyslog-ng-crypto have an RPATH set, and work fine without modifying the ld.so path. In any case, I'd rather postpone fixing these after 3.3.6, as both problem can be worked around in a reasonable way. I'll definitely fix the undefined symbol problem in 3.3.7, but the ld.so path is a tougher beast: to fix that properly, libsyslog-ng-crypto.so must either be installed into /usr/lib64, merged into libsyslog-ng.so, or RPATH must be set on the modules (this is already done, but perhaps Fedora strips it?). The best would be an option at configure time that links the contents of libsyslog-ng-crypto into libsyslog-ng - for most distributions, this would be great. But that's a change to be made in 3.4 first, and I'm not sure I want to backport it to 3.3. -- 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=188 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=188 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.3.7 -- 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=188 --- Comment #3 from Jose Oliveira <jpo@di.uminho.pt> 2012-08-19 16:47:45 --- (In reply to comment #2)
(In reply to comment #0)
we have encountered a couple of problems when running syslog-ng-3.3.5.90-20120810 under Fedora 17 x86_64:
1) ld.so library path 2) undefined symbol: tls_context_setup_session
The second is due to afsocket-notls being compiled with ENABLE_SSL set by mistake. I saw that before, but forgot about it unfortunately. If you're shipping both afsocket and afsocket-notls in the same package, the easy fix is to not ship the latter, only one of these will be used anyway (even if I fix the compiling bug).
As for the library path, that's a tougher one: libsyslog-ng-crypto is not really a module, but a private shared library. The libafsocket-tls.so should have an RPATH set to /usr/lib64/syslog-ng, that way the ld.so.conf.d/ workaround wouldn't be needed. I'm not sure whether Fedora allows RPATH, on Debian, the plugins that link to libsyslog-ng-crypto have an RPATH set, and work fine without modifying the ld.so path.
In any case, I'd rather postpone fixing these after 3.3.6, as both problem can be worked around in a reasonable way. I'll definitely fix the undefined symbol problem in 3.3.7, but the ld.so path is a tougher beast: to fix that properly, libsyslog-ng-crypto.so must either be installed into /usr/lib64, merged into libsyslog-ng.so, or RPATH must be set on the modules (this is already done, but perhaps Fedora strips it?). The best would be an option at configure time that links the contents of libsyslog-ng-crypto into libsyslog-ng - for most distributions, this would be great. But that's a change to be made in 3.4 first, and I'm not sure I want to backport it to 3.3.
Thanks for the feedback. Regarding RPATH, the Fedora packaging policy allows its use for internal libraries that are not installed in the system path (the current case). Further information can be found here: https://fedoraproject.org/wiki/Packaging:Guidelines#Beware_of_Rpath /jpo -- 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=188 --- Comment #4 from Jose Oliveira <jpo@di.uminho.pt> 2012-08-20 07:31:28 --- Another problem: using the command line options --version and --debug simultaneously causes a segmentation fault. ---------- # /usr/sbin/syslog-ng --version --debug syslog-ng 3.3.5.90 Installer-Version: 3.3.5.90 Revision: Compile-Date: Aug 20 2012 05:49:44 Default-Modules: affile,afprog,afsocket,afuser,basicfuncs,csvparser,dbparser,syslogformat,afsql Segmentation fault (core dumped) ---------- # gdb /usr/sbin/syslog-ng core.1065 GNU gdb (GDB) Fedora (7.4.50.20120120-49.fc17) Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/sbin/syslog-ng...Reading symbols from /usr/lib/debug/usr/sbin/syslog-ng.debug...done. done. [New LWP 1065] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/usr/sbin/syslog-ng --version --debug'. Program terminated with signal 11, Segmentation fault. #0 nv_registry_get_handle_name (length=0x7ffff9f5a1c8, handle=4, self=<optimized out>) at nvtable.h:86 86 stored = &g_array_index(self->names, NVHandleDesc, handle - 1); (gdb) backtrace #0 nv_registry_get_handle_name (length=0x7ffff9f5a1c8, handle=4, self=<optimized out>) at nvtable.h:86 #1 log_msg_get_value_name (handle=handle@entry=4, name_len=name_len@entry=0x7ffff9f5a1c8) at logmsg.c:305 #2 0x00007f52258d8bea in log_msg_set_value (self=self@entry=0xe7da00, handle=handle@entry=4, value=value@entry=0x7f522590069b "syslog-ng", value_len=value_len@entry=9) at logmsg.c:458 #3 0x00007f52258da937 in log_msg_new_internal (prio=47, msg=0xe7cfa0 "Trying to open module; module='dummy', filename='//usr/lib64/syslog-ng/libdummy.so'") at logmsg.c:1128 #4 0x00007f52258e7703 in msg_send_internal_message (prio=<optimized out>, msg=<optimized out>) at messages.c:141 #5 0x00007f52258e78d0 in msg_event_send (e=0xe7cf30) at messages.c:179 #6 0x00007f52258eb825 in plugin_dlopen_module (module_name=module_name@entry=0xe72560 "dummy", module_path=0x7f522590068f "//usr/lib64/syslog-ng") at plugin.c:188 #7 0x00007f52258ebf73 in plugin_list_modules (out=0x7f52240d3260, verbose=verbose@entry=0) at plugin.c:293 #8 0x00000000004018a4 in version () at main.c:134 #9 0x000000000040163c in main (argc=1, argv=0x7ffff9f5a488) at main.c:217 (gdb) ---------- -- 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=188 --- Comment #5 from Gergely Nagy <algernon@balabit.hu> 2012-08-20 10:34:44 --- (In reply to comment #4)
Another problem: using the command line options --version and --debug simultaneously causes a segmentation fault.
Hrm, interesting. I thought I fixed this in 3.3.5.90, looks like it's still broken in a different way. Can you open a separate ticket about this? Thanks! -- 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=188 Balazs Scheidler <bazsi@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bazsi@balabit.hu --- Comment #6 from Balazs Scheidler <bazsi@balabit.hu> 2012-08-20 10:56:25 --- afair this was already fixed in 3.4 -- 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=188 --- Comment #7 from Jose Oliveira <jpo@di.uminho.pt> 2012-08-20 16:41:53 --- (In reply to comment #5)
(In reply to comment #4)
Another problem: using the command line options --version and --debug simultaneously causes a segmentation fault.
Hrm, interesting. I thought I fixed this in 3.3.5.90, looks like it's still broken in a different way. Can you open a separate ticket about this?
New ticket for the segmentation fault problem: Bug 189 - https://bugzilla.balabit.com/show_bug.cgi?id=189 /jpo -- 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=188 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution| |FIXED Status|ASSIGNED |RESOLVED --- Comment #8 from Gergely Nagy <algernon@balabit.hu> 2012-09-01 13:17:04 --- (In reply to comment #6)
afair this was already fixed in 3.4
Indeed, it was. I just cherry-picked the fix to 3.3. Thanks! -- 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=188 --- Comment #9 from Jose Oliveira <jpo@di.uminho.pt> 2012-09-01 17:45:57 --- (In reply to comment #8)
(In reply to comment #6)
afair this was already fixed in 3.4
Indeed, it was. I just cherry-picked the fix to 3.3. Thanks!
Th commit * https://github.com/balabit/syslog-ng-3.3/commit/9ba1d1b3e1bd8fedd59660654b75... only solves the problem with the undefined symbol. The ld path problem still remains [1]: ---------- Error opening plugin module; module='afsocket', error='libsyslog-ng-crypto.so: cannot open shared object file: No such file or directory' ---------- /jpo [1] - Fedora packaging workaround: creating and installing a ld.so conf file (/etc/ld.so.conf.d/syslog-ng-{i386,x86_64}.conf) -- 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=188 --- Comment #10 from Gergely Nagy <algernon@balabit.hu> 2012-09-01 20:12:32 --- (In reply to comment #9)
Th commit * https://github.com/balabit/syslog-ng-3.3/commit/9ba1d1b3e1bd8fedd59660654b75... only solves the problem with the undefined symbol. The ld path problem still remains [1]:
---------- Error opening plugin module; module='afsocket', error='libsyslog-ng-crypto.so: cannot open shared object file: No such file or directory' ----------
Hrm. That should be fixed with an RPATH, which should be added by libtool. I'll see if I can figure out why it doesn't do that. (For me, on Debian, something does add the RPATH) -- 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=188 --- Comment #11 from Gergely Nagy <algernon@balabit.hu> 2012-09-06 13:14:17 --- (In reply to comment #10)
(In reply to comment #9)
Th commit * https://github.com/balabit/syslog-ng-3.3/commit/9ba1d1b3e1bd8fedd59660654b75... only solves the problem with the undefined symbol. The ld path problem still remains [1]:
---------- Error opening plugin module; module='afsocket', error='libsyslog-ng-crypto.so: cannot open shared object file: No such file or directory' ----------
Hrm. That should be fixed with an RPATH, which should be added by libtool. I'll see if I can figure out why it doesn't do that. (For me, on Debian, something does add the RPATH)
I'll open a separate bug about the library path issue, so this can remain closed: the two problems are unrelated anyway. -- 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