Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-10287

[C++] Avoid std::random_device whenever possible

    XMLWordPrintableJSON

    Details

    • Type: Wish
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: C++

      Description

      I just tried running the tests on a default build on Ubuntu 20.04 with an AMD Ryzen CPU (where presumably RDRAND can't be relied on, but I don't know if that's the underlying reason), and the tests appear to hand blocking on std::random_device at some point. I suppose some versions of libstdc++ will use /dev/random instead of /dev/urandom (which is a bad idea in itself).

      We should probably try to minimize our usage of std::random_device. After all, we're not generating cryptographic keys or anything.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                apitrou Antoine Pitrou
                Reporter:
                apitrou Antoine Pitrou
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h