Hi,
I have Metabase 0.35.4 running under Docker
I also have “vanilla” Postgress 12.4 running as a VM under CentoOS 7 with 1 test database.
Metabase is connected to to this database to visualize data.
Now, 1-2-3 times a day Postgres12 goes down with “Segmentation Fault” issue.
SAMPLE LOG:
2020-09-03 14:00:02.046 BST [3989] DETAIL: Failed process was running: – Metabase
2020-09-03 14:00:02.030 BST [1474] LOG: server process (PID 1854) was terminated by signal 11: Segmentation fault
2020-09-03 14:00:02.030 BST [1474] DETAIL: Failed process was running: – Metabase
SELECT “creditcard_demo”.“sysdiagrams”.“definition” AS “definition”, “creditcard_demo”.“sysdiagrams”.“name” AS “name”, “creditcard_demo”.“sysdiagrams”.“version” AS “version”, “creditcard_demo”.“sysdiagrams”.“principal_id” AS “principal_id”, “creditcard_demo”.“sysdiagrams”.“diagram_id” AS “diagram_id” FROM “creditcard_demo”.“sysdiagrams” LIMIT 10000
2020-09-03 14:00:02.031 BST [1474] LOG: terminating any other active server processes
Every time in the logs i see that the last SQL statement before this crash was the following (even if no activity is happening in the Metabase):
SELECT “creditcard_demo”.“sysdiagrams”.“definition” AS “definition”, “creditcard_demo”.“sysdiagrams”.“name” AS “name”, “creditcard_demo”.“sysdiagrams”.“version” AS “version”, “creditcard_demo”.“sysdiagrams”.“principal_id” AS “principal_id”, “creditcard_demo”.“sysdiagrams”.“diagram_id” AS “diagram_id” FROM “creditcard_demo”.“sysdiagrams” LIMIT 10000
Well…“sysdiagrams” does not exist in Postgres, it exists in MS SQL Server, but the datasource crated for the Postgres and it is the only datasource on that Metabase instance.
If i run this query from, say, DBeaver, Postgress will fail to run it, but will not crash.
However, when this is received from Metabase, it causes Segmentation Fault.
On the Metabase side we see the following, when this is happening:
09-03 13:00:01 INFO sync.analyze :: fingerprint-fields Analyzed [*****·············································] ߘ⠠ 10% Table 30 ‘public.d_date’
09-03 13:00:02 ERROR sync.util :: Error fingerprinting Table 6 ‘creditcard_demo.sysdiagrams’
org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:337)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:108)
----lots of other similar things
If Metabase is OFF, then Postgress is happyly running with no issues.
The only strange thing i noticed is that this is always happens at the begin of the hour (see log)
Any idea how to get this fixed?