Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-4728

Null pointer error in LogHost.cc.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.0.0
    • 6.2.1, 7.0.0
    • Logging
    • None

    Description

      jpeach@apache.org I am getting a null pointer access error with the following assertion at the time of traffic_server start-up with log collation enabled (client-side). I was able to get around it by just commenting it out, but perhaps a better fix is required.

      LogHost::create_orphan_LogFile_object()
      {
        // We expect that no-one else is holding any refcounts on the
        // orphan file so that is will be releases when we replace it
        // below.
        ink_assert(m_orphan_file->refcount() == 1);
      

      Back-trace –

      #0  0x000000000053e772 in RefCountObj::refcount (this=0x8) at ../lib/ts/Ptr.h:80
      #1  0x0000000000692f9f in LogHost::create_orphan_LogFile_object (this=0x2268d80) at LogHost.cc:235
      #2  0x0000000000692a45 in LogHost::set_ipstr_port (this=0x2268d80, ipstr=0x2265d40 "127.0.0.1", pt=8085) at LogHost.cc:135
      #3  0x0000000000692b92 in LogHost::set_name_or_ipstr (this=0x2268d80, name_or_ip=0x2265d40 "127.0.0.1") at LogHost.cc:155
      #4  0x0000000000684046 in LogConfig::read_xml_log_config (this=0x21e4110) at LogConfig.cc:1472
      #5  0x000000000067ff73 in LogConfig::setup_log_objects (this=0x21e4110) at LogConfig.cc:510
      #6  0x000000000067f858 in LogConfig::init (this=0x21e4110, prev_config=0x0) at LogConfig.cc:395
      #7  0x00000000006721fe in Log::init (flags=0) at Log.cc:925
      #8  0x0000000000542552 in main (argv=0x7ffcc853abd8) at Main.cc:1828
      

      I made minimal changes to logs_xml.config to set as client –

      <LogFormat>
          <Name = "minimal"/>
          <Format = "%<chi> : %<cqu> : %<pssc>"/>
      </LogFormat>
      
      <LogObject>
          <Format = "minimal"/>
          <Filename = "minimal_remote"/>
          <CollationHosts = "127.0.0.1:8085"/>
      </LogObject>
      

      Attachments

        Issue Links

          Activity

            People

              jamespeach James Peach
              pbchou Peter Chou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 20m
                  2h 20m