Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL crashes when loading can.ko #11196

Closed
1 of 2 tasks
dkuschmierz opened this issue Feb 22, 2024 · 3 comments
Closed
1 of 2 tasks

WSL crashes when loading can.ko #11196

dkuschmierz opened this issue Feb 22, 2024 · 3 comments

Comments

@dkuschmierz
Copy link

dkuschmierz commented Feb 22, 2024

Windows Version

Microsoft Windows [Version 10.0.22631.3155]

WSL Version

2.0.0.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.123.1-1

Distro Version

Ubuntu22.04

Other Software

No response

Repro Steps

I try to get CAN support running inside WSL by compiling the kernel modules as follows. If I try to load the module, WSL crashes and immediately shuts down without any error log or something.

This is how I compile the modules inside my running distro:

sudo apt-get install build-essential flex bison libssl-dev bc libelf-dev libncurses-dev dwarves

mkdir /kernel_build

cd /kernel_build

git clone --depth 1 --branch linux-msft-wsl-5.15.123.1 https://github.com/microsoft/WSL2-Linux-Kernel.git

cd WSL2-Linux-Kernel

cat /proc/config.gz | gunzip > .config

make prepare modules_prepare

make menuconfig

-> Networking Support
  -> <M>  CAN bus subsystem support
     ->  <M>   Raw CAN Protocol (raw access with CAN-ID filtering)
     ->  <M>   Broadcast Manager CAN Protocol (with content filtering)
     ->  <M>   CAN Gateway/Router (with netlink configuration)
     ->  CAN Device Drivers
           -> <M> Virtual Local CAN Interface (vcan)
           -> <M> Platform CAN drivers with Netlink support
           -> [*]   CAN bit-timing calculation
           -> [*] CAN devices debugging messages
           -> CAN USB interfaces  --->
                -> <M> PEAK PCAN-USB/USB Pro interfaces for CAN 2.0b/CAN-FD

Save config

make M=drivers/net/can/
make M=net/can

sudo cp drivers/net/can/dev/can-dev.ko /lib/modules/5.15.123.1-microsoft-standard-WSL2
sudo cp drivers/net/can/vcan.ko /lib/modules/5.15.123.1-microsoft-standard-WSL2
sudo cp drivers/net/can/usb/peak_usb/peak_usb.ko /lib/modules/5.15.123.1-microsoft-standard-WSL2
sudo cp net/can/*.ko /lib/modules/5.15.123.1-microsoft-standard-WSL2

sudo depmod -a
sudo modprobe can

Immediately afterwards WSL is crashing and window is closing. Have no clue how to debug this...
If I do a sudo modprobe vcan the module is loaded but actually it is not working because of missing can module.
So I guess the compilation itself is working...

Expected Behavior

Kernel module is loaded

Actual Behavior

WSL crashes and window closes.

Diagnostic Logs

No response

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 13, 2024

/dupe #10450

Copy link
Contributor

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants