Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-354

syslog appender SEGV.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Appender
    • Labels:
      None
    • Environment:
      Debian, Linux

      Description

      Hi!

      The syslog-appender segfaults immediatly.

      Testcase:

      #if defined HAVE_LIBLOG4CXX
      #include <log4cxx/logger.h>
      #include <log4cxx/basicconfigurator.h>
      #include <log4cxx/propertyconfigurator.h>
      #include <log4cxx/xml/domconfigurator.h>
      // for testing
      #include <log4cxx/net/syslogappender.h>
      using namespace log4cxx::net;
      #endif

      using namespace std;
      using namespace log4cxx;

      int main(int argc, char* argv[])
      {
      LoggerPtr l = Logger::getRootLogger();
      SyslogAppenderPtr slap = new SyslogAppender();
      l->addAppender(slap);

      // l->removeAllAppenders();

      LOG4CXX_INFO(l,"Logging set up.");

      return 0;
      }

      tobi@moria:~/workspace/solarpowerlog$ gdb src/solarpowerlog
      GNU gdb (GDB) 7.0-debian
      Copyright (C) 2009 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 "i486-linux-gnu".
      For bug reporting instructions, please see:
      <http://www.gnu.org/software/gdb/bugs/>...
      Reading symbols from /home/tobi/workspace/solarpowerlog/src/solarpowerlog...done.
      (gdb) r
      Starting program: /home/tobi/workspace/solarpowerlog/src/solarpowerlog
      [Thread debugging using libthread_db enabled]

      Program received signal SIGSEGV, Segmentation fault.
      0xb7f3daad in log4cxx::net::SyslogAppender::append(log4cxx::helpers::ObjectPtrT<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) () from /usr/lib/liblog4cxx.so.10
      (gdb) bt
      #0 0xb7f3daad in log4cxx::net::SyslogAppender::append(log4cxx::helpers::ObjectPtrT<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) () from /usr/lib/liblog4cxx.so.10
      #1 0xb7eaaec0 in log4cxx::AppenderSkeleton::doAppend(log4cxx::helpers::ObjectPtrT<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) () from /usr/lib/liblog4cxx.so.10
      #2 0xb7ea8244 in log4cxx::helpers::AppenderAttachableImpl::appendLoopOnAppenders(log4cxx::helpers::ObjectPtrT<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) () from /usr/lib/liblog4cxx.so.10
      #3 0xb7ef6b27 in log4cxx::Logger::callAppenders(log4cxx::helpers::ObjectPtrT<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&) const () from /usr/lib/liblog4cxx.so.10
      #4 0xb7ef8099 in log4cxx::Logger::forcedLog(log4cxx::helpers::ObjectPtrT<log4cxx::Level> const&, std::string const&, log4cxx::spi::LocationInfo const&) const () from /usr/lib/liblog4cxx.so.10
      #5 0x0808a98e in main (argc=1, argv=0xbfffefa4) at solarpowerlog.cpp:310
      (gdb)

      Installed version:

      tobi@moria:~/workspace/solarpowerlog$ dpkg -l liblog4cxx10-dev
      Desired=Unknown/Install/Remove/Purge/Hold

      Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
      / Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
      / Name Version Description
      +++==============================================================-==============================================================================
      ii liblog4cxx10-dev 0.10.0-1.1 A logging library for C++ (development files)

        Attachments

          Activity

            People

            • Assignee:
              carnold@apache.org Curt Arnold
              Reporter:
              coldtobi Tobias Frost
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: