pganalyze / pg_query.rs

Rust library to parse, deparse and normalize SQL queries using the PostgreSQL query parser
MIT License
126 stars 12 forks source link

Fix `LeakSanitizer` segfault #22

Closed msepga closed 1 year ago

msepga commented 1 year ago

It looks like spawning 10,000 threads with our particular workload causes LeakSanitizer to segfault on GetThreadLocked in an array access. This is likely a bug in LeakSanitizer; it is segfaulting on an array access to an internal threads_ datastructure, indexed by thread ID.

Reducing the total thread count in parallel_tests seems to solve the issue. To ensure we still test contention, each thread now does more repeated work.