Skip to content

Data too long for value in customvars leads to crash of icingadb #943

@christoph2497

Description

@christoph2497

Describe the bug

When using an extremely long dictionary as value in a single host custom var which is longer than 65k chars this exceeds the limit for the value field of the customvars table. The database field is set to type TEXT and therefore limits the chars to round about 65k chars. This leads to an instant crash of the icingadb-daemon as the value can't be inserted into the table.

To Reproduce

Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include configuration, logs, etc. to reproduce, if relevant.

  1. create a customvar with a value of a long input exceeding 65k chars
  2. restart icingadb-daemon
  3. it will instantly crash

Expected behavior

Icingadb should handle the error gracefully and should not kill the icingadb-daemon process. Maybe the database field should be adjusted to fit a bigger amount of chars.

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • Icinga DB version: 1.3.0
  • Icinga 2 version: 2.14.5
  • Operating System and version: Debian 12

Additional context

#Ref NC841810

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions