github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/docs/linux/troubleshooting.md (about) 1 # Troubleshooting 2 3 Here are some things to check if there are problems running syzkaller. 4 5 - Check that QEMU can successfully boot the virtual machine. For example, 6 if `IMAGE` is set to the VM's disk image (as per the `image` config value) 7 and `KERNEL` is set to the test kernel (as per the `kernel` config value) 8 then something like the following command should start the VM successfully: 9 10 ```shell 11 qemu-system-x86_64 -hda $IMAGE -m 256 -net nic -net user,host=10.0.2.10,hostfwd=tcp::23505-:22 -enable-kvm -kernel $KERNEL -append root=/dev/sda 12 ``` 13 14 - Check that inbound SSH to the running virtual machine works. For example, with 15 a VM running and with `SSHKEY` set to the SSH identity (as per the `sshkey` config value) the 16 following command should connect: 17 18 ```shell 19 ssh -i $SSHKEY -p 23505 root@localhost 20 ``` 21 22 - If you *are* having SSH difficulties, make sure your kernel configuration 23 has networking enabled. Sometimes defconfig errs minimalistic and omits the 24 following necessary options: 25 ```shell 26 CONFIG_VIRTIO_NET=y 27 CONFIG_E1000=y 28 CONFIG_E1000E=y 29 ``` 30 - If the virtual machine reports that it has "Failed to start Raise network interfaces" or (which 31 is a consequence of that) syzkaller is unable to connect to the virtual machines, try to disable 32 the Predictable Network Interface Names mechanism. There are two ways to achieve this: 33 - Add the following two lines to the kernel configuration file and recompile the kernel. 34 ``` 35 CONFIG_CMDLINE_BOOL=y 36 CONFIG_CMDLINE="net.ifnames=0" 37 ``` 38 - Add the following line to the VM's properties inside the syzkaller manager configuration: 39 ``` 40 "cmdline": "net.ifnames=0" 41 ``` 42 43 The resulting configuration may look like this: 44 ```json 45 { 46 "target": "linux/amd64", 47 "http": "127.0.0.1:56741", 48 "workdir": "$GOPATH/src/github.com/google/syzkaller/workdir", 49 "kernel_obj": "$KERNEL", 50 "image": "$IMAGE/bullseye.img", 51 "sshkey": "$IMAGE/bullseye.id_rsa", 52 "syzkaller": "$GOPATH/src/github.com/google/syzkaller", 53 "procs": 8, 54 "type": "qemu", 55 "vm": { 56 "count": 4, 57 "kernel": "$KERNEL/arch/x86/boot/bzImage", 58 "cmdline": "net.ifnames=0", 59 "cpu": 2, 60 "mem": 2048 61 } 62 } 63 ``` 64 65 This is, however, not guaranteed to work across all virtualization technologies. 66 67 - Check that the `CONFIG_KCOV` option is available inside the VM: 68 - `ls /sys/kernel/debug # Check debugfs mounted` 69 - `ls /sys/kernel/debug/kcov # Check kcov enabled` 70 - Build the test program from `Documentation/kcov.txt` and run it inside the VM. 71 72 - Check that debug information (from the `CONFIG_DEBUG_INFO` option) is available 73 - Pass the hex output from the kcov test program to `addr2line -a -i -f -e $VMLINUX` (where 74 `VMLINUX` is the vmlinux file, as per the `kernel_obj` config value), to confirm 75 that symbols for the kernel are available. 76 77 Also see [this](/docs/troubleshooting.md) for generic troubleshooting advice. 78 79 If none of the above helps, file a bug on [the bug tracker](https://github.com/google/syzkaller/issues) 80 or ask us directly on the syzkaller@googlegroups.com mailing list. 81 Please include syzkaller commit id that you use and `syz-manager` output with `-debug` flag enabled if applicable.