This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
By default, EBPF programs will not run on WSL2 due to required kernel modules missing. The following example error is an | |
indication of this problem: | |
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.84-microso | |
ft-standard/modules.dep.bin' | |
modprobe: FATAL: Module kheaders not found in directory /lib/modules/4.19.84-microsoft-standard | |
chdir(/lib/modules/4.19.84-microsoft-standard/build): No such file or directory | |
To fix this you need to rebuild the WSL2 kernel with the missing kernel modules. The below instructions are for Ubuntu 18.04 WSL2. | |
1. git clone https://github.com/microsoft/WSL2-Linux-Kernel.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
• Launch WinDbg Preview as an Administrator | |
• File->Attach to Process | |
• Check ‘Show processes from all users’ | |
• Select <process to attach to> | |
• Click ‘Attach’ | |
Once the debugger has attached: | |
• Enter: .symfix | |
• Enter: .reload |