Try building and running junit tests with this block disabled and -Dbuild=memcheck to see if valgrind will tell you what the problem really is. You will probably want a test case in the pro TestLiveSchemaChanges that at least adds and queries and drops a complex group by matview on both a new table and on an existing table with instances. You should also test that you can drop a base table that has a complex group by matview on it.