Deep Sequencing Notes

A Race Condition in the goat pipeline

We recently discovered a race condition in the goat pipeline v0.3 as created by Illumina. In the file you will find the following source.

     paramsfile = os.path.join(analysisfolder, ".params")
     olddata = get_params(paramsfile, ["data", "BaseCallAnalysis"])
     if olddata:
         data = merge_runs(olddata, data)

      keyattr = ["Name", "Version", "X", "Y", "Index", "Min", "Max",
                "Path", "Number", "First", "Last"]
      XMLSimple.XMLout(data, RootName="BaseCallAnalysis",
                      KeyAttr=keyattr, XMLDecl=1)

This is clearly a race condition since between reading the file, merging the data and exporting the file again, some other process might already have written to the same file. The best advice is not to run multiple goat instance in the same folder.

More Deep Sequencing notes