Load Npcap wpcap.dll lazily to avoid blocking upgrades on Windows#51716
Conversation
🤖 GitHub commentsJust comment with:
|
|
This pull request is now in conflicts. Could you fix it? 🙏 |
5f3734b to
2ec4e64
Compare
This comment has been minimized.
This comment has been minimized.
2ec4e64 to
63cf83b
Compare
TL;DRThe current Buildkite failure is a Metricbeat Remediation
Investigation detailsRoot Cause
But So the third argument must be a Evidence
The PR diff shown for this run does not modify VerificationI reproduced the same compile failure locally with: The command failed with the same error: Follow-upThe previous detective comment on this PR was for an earlier merge-conflict failure. This run has a different root cause and remediation. What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
63cf83b to
e0dda74
Compare
|
Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform) |
|
Pinging @elastic/sec-windows-platform (Team:Security-Windows Platform) |
|
Tick the box to add this pull request to the merge queue (same as
|
|
@Mergifyio backport 9.5 9.4 9.3 |
✅ Backports have been createdDetails
|
On Windows importing
gopacket/pcapused to loadwpcap.dllin the packageinit()(see elastic/gopacket#7).When elastic-agent runs the collector in process mode, every collector process (not only packetbeat) loads
wpcap.dllat startup:While any of these processes holds the DLL open, the packetbeat installer cannot replace
wpcap.dllto upgrade Npcap.Load
wpcap.dlllazily instead of at package init so only packetbeat loads it and only when needed.Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration files./changelog/fragmentsusing the changelog tool.Disruptive User Impact
None.
wpcap.dllis now loaded on demand instead of at startup. Packetbeat behaves the same but other beats no longer hold the DLL open.How to test this PR locally
On Windows with an older Npcap already installed, run Packetbeat with the Network Traffic input plus other Beats. Packetbeat should upgrade Npcap and start capturing instead of failing with
exit status 2.Automated:
mage systemTeston Windows runsTestWindowsNpcapInstaller, which now also verifies that a process only importing the capture code does not loadwpcap.dll.Related issues