<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.jacorb.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://www.jacorb.org/bugzilla/"
          
          maintainer="jacorb@goots.org"
>

    <bug>
          <bug_id>991</bug_id>
          
          <creation_ts>2014-09-08 03:51:27 +0000</creation_ts>
          <short_desc>JacORBConfiguration&apos;s getAttributeXXX methods are not thread safe</short_desc>
          <delta_ts>2014-11-07 05:05:56 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>JacORB</product>
          <component>ORB</component>
          <version>3.5</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>franky.bugzilla</reporter>
          <assigned_to name="Mailinglist to track bugs">jacorb-bugs</assigned_to>
          <cc>jacorb</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3200</commentid>
    <comment_count>0</comment_count>
      <attachid>445</attachid>
    <who name="">franky.bugzilla</who>
    <bug_when>2014-09-08 03:51:27 +0000</bug_when>
    <thetext>Created attachment 445
thread dump

I have a setup where I connect to multiple CORBA enabled devices in parallel from a thread pool. Once in a while I see that a number of threads used for the CORBA communication are stuck in an endless loop (threads are running at 100%) at start up of my application. A thread dump of a stuck thread can be found in the attached file. The threads got stuck in HashMap.getEntry which is known behavior when accessed and modified concurrently and the owner of this HashMap is JacOrbConfiguration. In fact there are 3 HashMaps which can be accessed concurrently in JacOrbConfiguration being stringAttributes, booleanAttributes and numberAttributes. The problem is that some of the methods getAttribute, getAttributeAsBoolean, getAttributeAsInteger try to get the value from the HashMap and if not the default value is put into the HashMap. If those getAttributeXXX methods are called concurrently the HashMaps can be accessed and modified concurrently and result in an infinite loop. I encountered this on 3.3 but I guess it&apos;s also on 3.5 as I didn&apos;t find any bug report related to this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3205</commentid>
    <comment_count>1</comment_count>
    <who name="">franky.bugzilla</who>
    <bug_when>2014-10-01 08:47:36 +0000</bug_when>
    <thetext>I&apos;ve encountered this problem on 3.3 but I see the JacORBConfiguration code in 3.5 is the same in this area, meaning the problem is also present in 3.5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3208</commentid>
    <comment_count>2</comment_count>
    <who name="Nick Cross">jacorb</who>
    <bug_when>2014-10-02 03:59:45 +0000</bug_when>
    <thetext>Do you have a thread dump?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3216</commentid>
    <comment_count>3</comment_count>
    <who name="Nick Cross">jacorb</who>
    <bug_when>2014-11-07 05:05:56 +0000</bug_when>
    <thetext>Hopefully fixed by SHA 6570aa2109ac3506c14fd928358107a66a5b7d23</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>445</attachid>
            <date>2014-09-08 03:51:27 +0000</date>
            <delta_ts>2014-09-08 03:51:27 +0000</delta_ts>
            <desc>thread dump</desc>
            <filename>threaddump.txt</filename>
            <type>text/plain</type>
            <size>1138</size>
            <attacher>franky.bugzilla</attacher>
            
              <data encoding="base64">amF2YS5sYW5nLlRocmVhZC5TdGF0ZTogUlVOTkFCTEUNCglhdCBqYXZhLnV0aWwuSGFzaE1hcC5n
ZXRFbnRyeShVbmtub3duIFNvdXJjZSkNCglhdCBqYXZhLnV0aWwuSGFzaE1hcC5nZXQoVW5rbm93
biBTb3VyY2UpDQoJYXQgb3JnLmphY29yYi5jb25maWcuSmFjT1JCQ29uZmlndXJhdGlvbi5nZXRB
dHRyaWJ1d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