Skip to content

Non uniquess of the UUID inside TFile #22015

@chaen

Description

@chaen

Check duplicate issues.

  • Checked for duplicates

Description

A few weeks ago LHCb switched from using a custom UUIDv4 to identify ROOT file to the TUUID that comes from ROOT's TFile.

This led to observing collisions of GUID between files that are produced concomitantly on the same worker node on the grid.

Reproducer

  1. Write mkuuid.cxx
#include "TUUID.h"
#include <cstdio>
int main() {
    TUUID u;
    puts(u.AsString());
    return 0;
}
  1. g++ -O2 -o mkuuid mkuuid.cxx $(root-config --cflags --libs)
  2. seq 50000 | xargs -P 512 -n1 ./mkuuid > uuids.txt
  3. check for duplicates (might take some tuning depending on the machine
$ wc -l uuids.txt
50000 uuids.txt
$ sort uuids.txt | uniq -d
d90ba95e-3e4b-11f1-a11e-ebd58d80beef

ROOT version

all

Installation method

LCG and Conda

Operating system

Linux

Additional context

For reference, this was the previous LHCb implementation
https://gitlab.cern.ch/gaudi/Gaudi/-/blob/34daa81ac63690ebf0aff19e8cd4454f7bb4ef34/GaudiUtils/src/component/createGuidAsString.cpp
https://linux.die.net/man/3/uuid_generate_time

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions