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

Property/DOMConfigurator::configureAndWatch can continue to run after APR termination

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The configureAndWatch methods launch a thread to monitor whether a configuration file has changed. Once launched, there is no attempt to reclaim or cleanly shut down the thread when the application exits. Depending on the circumstance, this can delay the programs exit or cause a crash.

      The attached patch attempts to shutdown the watchdog thread when the supporting APR pool is being destroyed as part of the APR shutdown sequence. Unfortunately, the patch as it stands will result in a warning about double freed memory when running the modified trivial test program.

      The changes to trivial.cpp are not intended to be committed, but provide a sample for testing configureAndWatch.

        Attachments

        1. LOGCXX-305C.patch.txt
          10 kB
          Curt Arnold
        2. LOGCXX-305B.patch
          0.7 kB
          Curt Arnold
        3. LOGCXX-305.patch
          8 kB
          Curt Arnold

          Issue Links

            Activity

              People

              • Assignee:
                carnold@apache.org Curt Arnold
                Reporter:
                carnold@apache.org Curt Arnold
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: