Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Sep 26, 2024

Reverts #40684

We're reverting because Elastic Agent CI has been failing and we've narrowed it down to the type assertion failing here and not checking ok right after:

cm, ok := enc.(*charmap.Charmap)
cmID, _ := cm.ID()

Specifically, when integration tests for Elastic Agent run on its CI Windows hosts, we are seeing this failure in the log:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x284f4bf]

goroutine 1 [running]:
golang.org/x/text/encoding/charmap.(*Charmap).ID(0x0)
        /go/pkg/mod/golang.org/x/[email protected]/encoding/charmap/charmap.go:111 +0x1f
github.com/elastic/beats/v7/winlogbeat/sys.init.0()
        /go/src/github.com/elastic/beats/winlogbeat/sys/strings_windows.go:32 +0x10c
```<hr>This is an automatic backport of pull request #41009 done by [Mergify](https://mergify.com).

We're reverting because Elastic Agent CI has been failing and we've narrowed it down to the type assertion failing here and not checking `ok` right after: https://github.com/elastic/beats/blob/138e43cad7eda93c1414641682056b6c88efcf1d/winlogbeat/sys/strings_windows.go#L31-L32

Specifically, when integration tests for Elastic Agent run on its CI Windows hosts, we are seeing this failure in the log:

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x284f4bf]

goroutine 1 [running]:
golang.org/x/text/encoding/charmap.(*Charmap).ID(0x0)
        /go/pkg/mod/golang.org/x/[email protected]/encoding/charmap/charmap.go:111 +0x1f
github.com/elastic/beats/v7/winlogbeat/sys.init.0()
        /go/src/github.com/elastic/beats/winlogbeat/sys/strings_windows.go:32 +0x10c
```

(cherry picked from commit 307e95c)
@mergify mergify bot requested a review from a team as a code owner September 26, 2024 15:33
@mergify mergify bot added the backport label Sep 26, 2024
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 26, 2024
@botelastic
Copy link

botelastic bot commented Sep 26, 2024

This pull request doesn't have a Team:<team> label.

@ycombinator ycombinator enabled auto-merge (squash) September 26, 2024 15:36
@ycombinator ycombinator merged commit e268982 into 8.x Sep 26, 2024
@ycombinator ycombinator deleted the mergify/bp/8.x/pr-41009 branch September 26, 2024 16:07
@khushijain21 khushijain21 mentioned this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport needs_team Indicates that the issue/PR needs a Team:* label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants