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

Enlarge the 64KB limitation of log buffer size

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.1.2
    • Logging
    • None

    Description

      The Logging module use uint16_t(LogBuffer->m_state.s.m_offset/byte_count) to store log buffer size:

        struct
        {
          uint16_t offset;              // buffer should be <= 64KB
          uint16_t num_entries;         // number of entries in buffer
          uint16_t byte_count;          // bytes in buffer
          uint16_t full:1;              // not accepting more checkouts
          uint16_t num_writers:15;      // number of writers
        } s;
      

      It's very dangerous for user, as there are not any warning when user breaks the limitation.

      In our environment, we set the log_buffer_size to 512KB(and set max_entries_per_buffer to 1000), it make ATS crashing.

      I'll give a patch to enlarge this limitation from 64KB to 4GB by merging offset and byte_count variables into one, so that we can use uint32_t to store the buffer size.

      Attachments

        Activity

          People

            yunkai Yunkai Zhang
            yunkai Yunkai Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: