Skip to content

Baxos encoding crashes when using PRNG input in parallel threads. #5

@Ame-ReIori

Description

@Ame-ReIori

Hello, I want to encode an OKVS object with baxos.solve. In addition, I want to input a PRNG for randomizing all 0 positions in the OKVS objects and make the encoding phase parallel. However, a segmentation fault always occurs when running the statement like baxos.solve<block>(in, values, okvs, &prng, kThrdNum);

Here is my code, which may reproduce the above error.

int main() {
  uint64_t kItemNum = 1ull << 20;
  int kBinSize = 1 << 14;
  int kCuckooHashNum = 3;
  int kLambda = 40;
  int kThrdNum = 8;

  PRNG prng(sysRandomSeed());
  std::vector<block> in(kItemNum);
  std::vector<block> values(kItemNum);

  prng.get<block>(in);
  prng.get<block>(values);

  volePSI::Baxos baxos;
  baxos.init(kItemNum, kBinSize, kCuckooHashNum, kLambda,
             volePSI::PaxosParam::GF128, AllOneBlock);

  std::vector<block> okvs(baxos.size());
  baxos.solve<block>(in, values, okvs, &prng, kThrdNum);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions