[ZBX-25860] Zabbix upgrade from 6.4.15 to 7.0.8 produces error in function table due to patch 06050165 Created: 2025 Jan 10  Updated: 2025 Mar 20  Resolved: 2025 Mar 19

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 7.0.8
Fix Version/s: 7.0.11rc1, 7.2.5rc1, 7.4.0beta1 (master)

Type: Problem report Priority: Major
Reporter: Facundo Vilarnovo Assignee: Artjoms Rimdjonoks
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: 25.25h
Original Estimate: Not Specified

Attachments: Text File log_message_patch.diff.txt    
Issue Links:
Causes
caused by ZBX-21898 Add escaping of backslashes in histor... Closed
Duplicate
Team: Team C
Sprint: Prev.Sprint, S25-W6/7, S25-W8/9, S25-W10/11
Story Points: 0.5

 Description   

Patch 06050165, introduced additional escape slashes, increasing the field length and exceeding the defined limit of 255 characters. This behavior made all functions invalid, causing validation errors in Zabbix triggers.

LOG: 1:20250109:225630.265 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: value too long for type character varying(255)

Steps to reproduce:

Normal Scenario (Before Upgrade):

Functional parameter example:

$,,"regexp","\\\[MATCH
] \\.12925\\.1.*\\\[7
] (917505|917507|917516|1114114|1114116|1114118|1114122|1114123|1114124|1507330|1703946|1703961|1703967| 1703970|1966082|1966095|1966096|2293764|2555921|2555927|2555932|2687198|196830|590046|2949370|1704186) \\\[8
]"

  • Total length: 252 characters .
  • Correct validation in Zabbix.

Result:

Behavior During Upgrade:

Example of parameter after applying patch 06050165:

$,,"regexp",[\\\\\[MATCH\\\\] \\\\.12925\\\\.1. \\\\\[7\\\\] (917505|917507|917516|1114114|1114116|1114118|1114122|1114123|1114124|1507330|1703946|1703961|1703967| 1703970|1966082|1966095|1966096|2293764|2555921|2555927|2555932|2687198|196830|590046|2949370|1704186) \\\\\[8\\\\]|file://[MATCH/%5d%20/.12925/.1. /%5b7/%5d%20(917505|917507|917516|1114114|1114116|1114118|1114122|1114123|1114124|1507330|1703946|1703961|1703967| 1703970|1966082|1966095|1966096|2293764|2555921|2555927|2555932|2687198|196830|590046|2949370|1704186]

  • Total length: 260 characters

 

Tests Performed:

  1. Testing in a Separate Environment:
  2. Simulation of the upgrade process in a test environment.
  3. Noticed that the length of the parameter field has increased from 252 to 260 characters.
  1. Deletion of Invalid Data:
  2. By removing data that exceeded the 255 character limit, the upgrade process completed without errors.
  3. However, data written after the upgrade continued to be incorrectly escaped, invalidating the functions.
  4. Below is an image of the data recorded in the database in functional format.

Impact:

  • Existing functions become invalid due to the modification in the format of regular expressions.
  • Unable to complete migration without fixes.


 Comments   
Comment by Artjoms Rimdjonoks [ 2025 Mar 06 ]

Available in versions:

Comment by Martins Valkovskis [ 2025 Mar 19 ]

Updated documentation:

Generated at Tue Apr 01 07:18:43 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.