Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26661

Deadlock on autoreg_host table update during auto registration from the Proxy group

XMLWordPrintable

    • S25-W28/29, S25-W30/31
    • 3

      Steps to reproduce:

      1. Configure 11 proxis in 1 proxy group
      2. Put this proxies correctly in ServerActive parameter o nthe Agent side
      3. Other settings:
        HostMetadata=Linux Telemetry_Release_202502
        HostMetadataItem=system.uname
        
      4. Run system on high NVPS rate with thousands of Agents

      Result:
      Get regular deadlocks on auto registration process:

      2025-05-05 18:34:14.937 UTC \[3729734] ERROR:  deadlock detected
      2025-05-05 18:34:14.937 UTC \[3729734] DETAIL:  Process 3729734 waits for ShareLock on transaction 1158673410; blocked by process 3751006.
              Process 3751006 waits for ShareLock on transaction 1158673399; blocked by process 3729734.
              Process 3729734: update autoreg_host set listen_ip='1.2.3.4',listen_dns='vm0',listen_port=10050,host_metadata='Linux Telemetry_Release_202502',tls_accepted='1',flags=0,proxyid=1 where autoreg_hostid=56965;
              update autoreg_host set listen_ip='2.3.4.5',listen_dns='vm1',listen_port=10050,host_metadata='Linux Telemetry_Release_202502',tls_accepted='1',flags=0,proxyid=1 where autoreg_hostid=56972;
      
       Process 3751006: update autoreg_host set listen_ip='2.3.4.5',listen_dns='vm1',listen_port=10050,host_metadata='Linux Telemetry_Release_202502',tls_accepted='1',flags=0,proxyid=2 where autoreg_hostid=56972;
          update autoreg_host set listen_ip='1.2.3.4',listen_dns='vm0',listen_port=10050,host_metadata='Linux Telemetry_Release_202502',tls_accepted='1',flags=0,proxyid=2 where autoreg_hostid=56965;
      

      At least 2 different proxy_id used for locking SQL:

      select proxyid, name, proxy_groupid from proxy where proxyid in (1,2);
      
      proxyid, name, proxy_groupid
      1 "proxy5" 1
      2 "proxy6" 1
      

      Expected:
      No duplicate transactions due to the multiple proxies from one proxy group trying to do auto-registration.

            vso Vladislavs Sokurenko
            edgar.akhmetshin Edgar Akhmetshin
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 15h
                15h