<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - race condition issue?"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=69845">69845</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>fontconfig-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>race condition issue?
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>freedesktop@behdad.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>akira@tagoh.org
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>fc-cache
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>fontconfig
          </td>
        </tr></table>
      <p>
        <div>
        <pre>There seems the kind of the race condition issue when updating the fontconfig
cache for directory. it is, somehow the directory cache is missing a directory
'a'  when creating a directory, installing a font and generating a cache.
That seems most likely to happen when installing OS newly.

I'm not quite sure the details and root-cause but the scenario what I can
imagine is:

1. installing 'a' font package
2. generating a cache for 'a'
3. installing 'b' font package at the same time
4. generating a cache for 'b'
5. somehow updating the parent directory cache from 'b' first
6. updating the parent directory cache from 'a'

If there are no 'b' directory when processing 'a', this might happens.

possible some idea to address this situation:
a) remember the time when starting to generate the cache and write it into the
cache. so if it's newer than one has, they can just stop to proceed.

b) when failed to lock the cache, restart the process from reading the
directory

any other idea?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>