#1350 stops CREATE_TABLESPACE from being scheduled when tablespace testing is disabled, which is the default on every platform other than Linux. QPG reaches the generator through a different path, so with --qpg-enable true every worker still dies with a NullPointerException on Query.getLogString() in GlobalState.executePrologue.
Cause
ProviderAdapter.mutateTables() selects a mutation by reward and PostgresProvider.executeMutator() resolves it with Action.values()[index]. That path does not consult mapActions(), so the scheduling guard does not apply to it, PostgresTableSpaceGenerator.generate() returns null, and executeStatement() dereferences it.
CREATE_TABLESPACE is the only one of the 28 PostgreSQL actions whose generator can return null, so this is the only action affected.
With the default interval of 1000 the same failure needs a long run, and CI does not see it because it runs on Linux.
Fix
Throw IgnoreMeException from the generator. mutateTables() already catches it, so the QPG framework needs no change. The scheduling guard from #1350 stays as it is and remains the reason the generator is never called during database generation.
Testing
mvn -Dtest=sqlancer.postgres.gen.TestPostgresTableSpaceGenerator test passes. Verified on Windows with the reproduction command above: QPG runs to completion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#1350 stops CREATE_TABLESPACE from being scheduled when tablespace testing is disabled, which is the default on every platform other than Linux. QPG reaches the generator through a different path, so with --qpg-enable true every worker still dies with a NullPointerException on Query.getLogString() in GlobalState.executePrologue.
Cause
ProviderAdapter.mutateTables() selects a mutation by reward and PostgresProvider.executeMutator() resolves it with Action.values()[index]. That path does not consult mapActions(), so the scheduling guard does not apply to it, PostgresTableSpaceGenerator.generate() returns null, and executeStatement() dereferences it.
CREATE_TABLESPACE is the only one of the 28 PostgreSQL actions whose generator can return null, so this is the only action affected.
Reproduction
On macOS or Windows:
With the default interval of 1000 the same failure needs a long run, and CI does not see it because it runs on Linux.
Fix
Throw IgnoreMeException from the generator. mutateTables() already catches it, so the QPG framework needs no change. The scheduling guard from #1350 stays as it is and remains the reason the generator is never called during database generation.
Testing
mvn -Dtest=sqlancer.postgres.gen.TestPostgresTableSpaceGenerator test passes. Verified on Windows with the reproduction command above: QPG runs to completion.