Why do I see database deadlocks in the log file of the data warehouse (DWH) service after updating to RHEV-M 3.5?
Issue
- Why are the following error messages reported in the log file of the data warehouse (
dwh
) service/var/log/ovirt-engine-dwh/ovirt-engine-dwhd.log
?
org.postgresql.util.PSQLException: ERROR: deadlock detected
Detail: Process 7986 waits for ShareLock on transaction 1258591922; blocked by process 7985.
Process 7985 waits for ShareLock on transaction 1258551055; blocked by process 7986.
Hint: See server log for query details.
Where: SQL statement "SELECT 1 FROM ONLY "public"."users_details_history" x WHERE "user_id" OPERATOR(pg_catalog.=) $1 FOR SHARE OF x"
[...]
at ovirt_engine_dwh.aggregationtohourly_3_5.AggregationToHourly.tJDBCInput_10Process(AggregationToHourly.java:25414)
at ovirt_engine_dwh.aggregationtohourly_3_5.AggregationToHourly$10.run(AggregationToHourly.java:26880)
org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
[...]
2015-09-29 10:02:51|nmKT8F|AOGYnQ|iYfCSa|OVIRT_ENGINE_DWH|AggregationToHourly|Default|6|Java Exception|tJDBCOutput_10|org.postgresql.util.PSQLException:ERROR: deadlock detected
Detail: Process 7986 waits for ShareLock on transaction 1258591922; blocked by process 7985.
Process 7985 waits for ShareLock on transaction 1258551055; blocked by process 7986.
Hint: See server log for query details.
Where: SQL statement "SELECT 1 FROM ONLY "public"."users_details_history" x WHERE "user_id" OPERATOR(pg_catalog.=) $1 FOR SHARE OF x"|1
- Why are the following deadlocks happening in the database?
LOG: process 7986 detected deadlock while waiting for ShareLock on transaction 1258591922 after 1000.103 ms
CONTEXT: SQL statement "SELECT 1 FROM ONLY "public"."users_details_history" x WHERE "user_id" OPERATOR(pg_catalog.=) $1 FOR SHARE OF x"
STATEMENT: INSERT INTO statistics_vms_users_usage_hourly (history_datetime,user_id,user_name,user_logged_in_to_guest,vm_id,session_time_in_minutes,cpu_usage_percent,max_cpu_usage,memory_usage_percent,max_memory_usage,user_cpu_usage_percent,max_user_cpu_usage_percent,system_cpu_usage_percent,max_system_cpu_usage_percent,vm_ip,vm_client_ip,currently_running_on_host,vm_configuration_version,current_host_configuration_version) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19)
ERROR: deadlock detected
DETAIL: Process 7986 waits for ShareLock on transaction 1258591922; blocked by process 7985.
Process 7985 waits for ShareLock on transaction 1258551055; blocked by process 7986.
Process 7986: INSERT INTO statistics_vms_users_usage_hourly (history_datetime,user_id,user_name,user_logged_in_to_guest,vm_id,session_time_in_minutes,cpu_usage_percent,max_cpu_usage,memory_usage_percent,max_memory_usage,user_cpu_usage_percent,max_user_cpu_usage_percent,system_cpu_usage_percent,max_system_cpu_usage_percent,vm_ip,vm_client_ip,currently_running_on_host,vm_configuration_version,current_host_configuration_version) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19)
Process 7985: UPDATE users_details_history SET first_name = $1,last_name = $2,domain = $3,username = $4,department = $5,user_role_title = $6,email = $7,external_id = $8,active = $9,create_date = $10,update_date = $11 WHERE user_id = $12
HINT: See server log for query details.
CONTEXT: SQL statement "SELECT 1 FROM ONLY "public"."users_details_history" x WHERE "user_id" OPERATOR(pg_catalog.=) $1 FOR SHARE OF x"
STATEMENT: INSERT INTO statistics_vms_users_usage_hourly (history_datetime,user_id,user_name,user_logged_in_to_guest,vm_id,session_time_in_minutes,cpu_usage_percent,max_cpu_usage,memory_usage_percent,max_memory_usage,user_cpu_usage_percent,max_user_cpu_usage_percent,system_cpu_usage_percent,max_system_cpu_usage_percent,vm_ip,vm_client_ip,currently_running_on_host,vm_configuration_version,current_host_configuration_version) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19)
Environment
- Red Hat Enterprise Virtualization 3.5.
- RHEV Data warehouse and Reports.
- Package
rhevm-dwh
version3.5.4-1.el6ev
or earlier.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.