Okay, the dataset dimensions were insufficient to replicate the crash on my end; I will probably need to send you a series of debug builds to get to the bottom of this.
To start, can you try splitting this run into three components:
1. plink2 --vcf merged.vcf.gz dosage=DS --not-chr X --out intermediate
intermission. plink2 --pfile intermediate --validate: does this fail? If yes, we know the problem is with VCF import, and don't need to worry about the rest. Check if adding "--threads 1" to the first step causes the problem to disappear.
2. plink2 --pfile intermediate --exclude-if-info "R2<=0.9" --freq: is this enough to trigger the crash? If yes, does it crash at the same place each time? Does the crash go away if "--threads 1" is added?
3. If --freq + --exclude-if-info wasn't enough to trigger the crash, check if your original --exclude-if-info + --set-all-var-ids + --rm-dup + --score triggers the crash again; if yes, check if the crash goes away with "--threads 1".