Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-7447

Fix remaining log message formatting errors with std::chrono 'Rep' type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.12.0
    • native client
    • None

    Description

      As a developer (or customer), I would very much like to be able to collect debug-level logs from the native client, when necessary, without fear of either:

      • hitting a segfault in the logging code, or
      • emitting invalid UTF-8 text due to a mismatched variable size & format specifier

       

      GEODE-7426 fixed a specific instance of this bug, but there are a number of these remaining in the codebase, any of which could bite us at any time.  The std::chrono 'Rep' type is numeric, but its size can vary depending on platform, and combined with the %z format specifier in a log message, will produce a segfault when Rep is a different size than expected.  

      A survey of the source tree at the current `develop` branch SHA (

      1bb8cf4b296bc09b3fb4ae098be6fb73ff90c61d)

      shows 17 instances of the problem, at the following locations:

      EntryExpiryHandler.cpp: 59

      LocalRegion.cpp: 699, 720, 2799, 2804

      Log.cpp: 527 (maybe?  Not sure on this one)

      RegionExpiryHandler.cpp: 58, 69

      TcpConn.cpp: 212

      TcpSslConn.cpp: 94

      TcrConnection.cpp: 619, 647

      TcrEndpoint.cpp: 187, 924, 1053

      ThinClientRegion.cpp: 3019, 3028

       

      When fixing these, refer to the original fix for GEODE-7426.

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            bbender Blake Bender
            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 - 2.5h
                2.5h