Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-425

transcoder map is not thread safe on SMP machines

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Incomplete
    • 1.7.0
    • None
    • Non-Validating Parser
    • None
    • Operating System: Windows NT/2K
      Platform: PC
    • 8289

    Description

      Firstly, this may be a "feature" and well known, and not a bug at all. However,
      it came as a shock to me, so I thought it useful to report.

      I had many (~100) DOMParser instances, each of which was accessed by its own
      separate thread. During a "parse" call, eventually (after about 5 minutes of
      continuous use of all threads running), I would start getting the exception
      thrown, "Could not create a converter for encoding: ..."

      I eventually traced this to the function "XMLPlatformUtils::fgTransService-
      >makeNewTranscoderFor" returning NULL. This was caused by fCPMap in
      Win32TransService becoming corrupted somehow!

      The quick fix was to place a thread-mutex (critical_section) around the "parse"
      function, so that no two parsers were parsing at the same time.

      Attachments

        Activity

          People

            Unassigned Unassigned
            haas@yahoo.com Andrew Haas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: