Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CRI-O fails to detect link mode of binary on non english language OS #5165

@fracarvic

Description

@fracarvic

Description
I'm using CRI-O static in a ubuntu server with spanish locale (LANG=es_ES.UTF-8) and logs shows the following error every few seconds:

ago 04 14:18:36 server crio[862]: time="2021-08-04 14:18:36.573631718+02:00" level=warning msg="Encountered error detecting link mode of binary: `ldd /usr/local/bin/crio` failed: \tno es un ejecutable dinámico\n  (exit status 1)"
ago 04 14:18:46 server crio[862]: time="2021-08-04 14:18:46.633547844+02:00" level=warning msg="Encountered error detecting link mode of binary: `ldd /usr/local/bin/crio` failed: \tno es un ejecutable dinámico\n  (exit status 1)"
ago 04 14:18:56 server crio[862]: time="2021-08-04 14:18:56.687218704+02:00" level=warning msg="Encountered error detecting link mode of binary: `ldd /usr/local/bin/crio` failed: \tno es un ejecutable dinámico\n  (exit status 1)"
ago 04 14:19:06 server crio[862]: time="2021-08-04 14:19:06.747713189+02:00" level=warning msg="Encountered error detecting link mode of binary: `ldd /usr/local/bin/crio` failed: \tno es un ejecutable dinámico\n  (exit status 1)"
ago 04 14:19:16 server crio[862]: time="2021-08-04 14:19:16.804123603+02:00" level=warning msg="Encountered error detecting link mode of binary: `ldd /usr/local/bin/crio` failed: \tno es un ejecutable dinámico\n  (exit status 1)"
ago 04 14:19:26 server crio[862]: time="2021-08-04 14:19:26.866602961+02:00" level=warning msg="Encountered error detecting link mode of binary: `ldd /usr/local/bin/crio` failed: \tno es un ejecutable dinámico\n  (exit status 1)"
ago 04 14:19:36 server crio[862]: time="2021-08-04 14:19:36.918307177+02:00" level=warning msg="Encountered error detecting link mode of binary: `ldd /usr/local/bin/crio` failed: \tno es un ejecutable dinámico\n  (exit status 1)"

Seems that code is using text output from command ldd and expect an exact result, and it is not the case with non-English languages. The output of ldd /usr/local/bin/crio in my system is

$ ldd /usr/local/bin/crio
        no es un ejecutable dinámico

As a workaround , if I add

Environment=LANG=C

in systemd crio.service the error disappears.

Additional information you deem important (e.g. issue happens only occasionally):

Output of crio --version:

crio version 1.21.2
Version:       1.21.2
GitCommit:     b27d974e13c3f9e2baa2d848ca554c80434ea88c
GitTreeState:  dirty
BuildDate:     1980-01-01T00:00:00Z
GoVersion:     go1.15.7
Compiler:      gc
Platform:      linux/amd64
Linkmode:      static

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions