Project

General

Profile

Actions

Defect #1904

closed

Deadlock while change system identifier

Added by Ondřej Kopr over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
High
Assignee:
Radek Tomiška
Category:
Provisioning
Target version:
Start date:
10/15/2019
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

We founded use case that creates entity events that is in running state forever.

How to simulate this issue:
  • we have clean CzechIdM environment without some projspec implementation in version 9.7.10,
  • we have one mapped system (table, in virtual this works) with one role,
  • as identifier is mapped username,
  • assign this role to some user (role will be assigned correctly),
  • change username and check entity events.

The query:

select * from pg_stat_activity;

show us two query that has lock (in column query is query with two updates sys_system_entity and sys_provisioning_operation):

datid    datname    pid    usesysid    usename    application_name    client_addr    client_hostname    client_port    backend_start    xact_start    query_start    state_change    wait_event_type    wait_event    state    backend_xid    backend_xmin    query    backend_type
16384    bcv_idm_storage    1265    16385    idmadmin    PostgreSQL JDBC Driver    172.17.0.1        56452    2019-10-15 18:43:35    2019-10-15 18:47:03    2019-10-15 18:47:03    2019-10-15 18:47:03    Client    ClientRead    idle in transaction    467702        update sys_system_entity set created=$1, creator=$2, creator_id=$3, modified=$4, modifier=$5, modifier_id=$6, original_creator=$7, original_creator_id=$8, original_modifier=$9, original_modifier_id=$10, realm_id=$11, transaction_id=$12, entity_type=$13, system_id=$14, uid=$15, wish=$16 where id=$17    client backend
16384    bcv_idm_storage    1292    16385    idmadmin    PostgreSQL JDBC Driver    172.17.0.1        56524    2019-10-15 18:46:47    2019-10-15 18:47:03    2019-10-15 18:47:03    2019-10-15 18:47:03    Lock    transactionid    active    467703    467702    update sys_provisioning_operation set created=$1, creator=$2, creator_id=$3, modified=$4, modifier=$5, modifier_id=$6, original_creator=$7, original_creator_id=$8, original_modifier=$9, original_modifier_id=$10, realm_id=$11, transaction_id=$12, provisioning_batch_id=$13, current_attempt=$14, entity_identifier=$15, entity_type=$16, max_attempts=$17, operation_type=$18, provisioning_context=$19, result_cause=$20, result_code=$21, result_model=$22, result_state=$23, role_request_id=$24, system_id=$25, system_entity_id=$26 where id=$27    client backend

Event detail:

Provisoning operation detail:

There is gif with simulation: https://up.xyxy.cz/f.php?h=0kfNr5UO&p=1 (sorry for link, the gif has more than 5mb)

Affected version: 9.7.9


Files

lock002.png (60.8 KB) lock002.png Ondřej Kopr, 10/15/2019 04:53 PM
lock001.png (57 KB) lock001.png Ondřej Kopr, 10/15/2019 04:53 PM

Related issues

Related to IdStory Identity Manager - Defect #1884: Provisioning update in created state was executed after delete provisioning operationClosedRadek Tomiška10/01/2019

Actions
Related to IdStory Identity Manager - Task #1896: Add foreign keys to all entitiesNewRadek Tomiška10/08/2019

Actions
Actions

Also available in: Atom PDF