Skip to content

pkg/ifaceprobe: note error only when res.Err is not null #6021

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jiangenj
Copy link
Contributor


Before sending a pull request, please review Contribution Guidelines:
https://github.com/google/syzkaller/blob/master/docs/contributing.md


@jiangenj jiangenj force-pushed the ifaceprobe branch 2 times, most recently from 73ada06 to f48d65e Compare May 14, 2025 06:24
@a-nogikh
Copy link
Collaborator

What are the cases when res.Status != queue.Success but res.Err is nil?

@jiangenj
Copy link
Contributor Author

This is one kind of error:

[FATAL] interface probing failed: failed to execute prog: %!w(<nil>) (Crashed)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000080)='/sys/devices/pci0000:00/0000:00:01.1/ata1/host0/target0:0:0/0:0:0:0/block/sda/queue/scheduler', 0x1, 0x0)
write(r0, &(0x7f0000000100)=' ', 0x1)

exit status 1

Seeing iface-probe run exits abnormally:

```
[FATAL] interface probing failed: failed to execute prog: %!w(<nil>) (Crashed)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000080)='/sys/devices/pci0000:00/0000:00:01.1/
	ata1/host0/target0:0:0/0:0:0:0/block/sda/queue/scheduler', 0x1, 0x0)
write(r0, &(0x7f0000000100)=' ', 0x1)

exit status 1
```

The node to have this `%!w(nil>) (Crashed)` is random, but
continue when res.Err is null bypass the problem.
@a-nogikh
Copy link
Collaborator

The fact that the kernel crashed when the tool was probing an interface does seem to me like a valid case for reporting an error. Otherwise we will get different descriptions each run depending on what programs were not properly executed.

Cc @dvyukov who wrote this code.

@dvyukov
Copy link
Collaborator

dvyukov commented May 15, 2025

I don't know what's the best answer here. Both failing the tool and ignoring the kernel bug bad. Ideally of course kernel does not crash on such simple actions like opening a file.

One recommendation when running the tool is to add this to the manager config:

	"cmdline": "panic_on_warn=0"
	"ignores": [".*"]

And maybe configuring the kernel w/o most debugging configs (it only needs KCOV).
Joey, does this help in your case?

@jiangenj
Copy link
Contributor Author

Hi @dvyukov ,
Tried

	"cmdline": "panic_on_warn=0"
	"ignores": [".*"]

and disabled CONFIG_KASAN, still see this

2025/05/16 16:04:12 VM 9: crash: no output from test machine
2025/05/16 16:04:12 VM 11: crash: no output from test machine
2025/05/16 16:04:12 VM 17: crash: no output from test machine
2025/05/16 16:04:18 exec total=366811 (545/sec) pending=17 reproducing=0
2025/05/16 16:04:19 VM 5: crash: no output from test machine
2025/05/16 16:04:20 done file 61000
2025/05/16 16:04:20 VM 14: crash: no output from test machine
2025/05/16 16:04:21 VM 19: crash: no output from test machine
2025/05/16 16:04:21 VM 1: crash: no output from test machine
2025/05/16 16:04:22 VM 18: crash: no output from test machine
2025/05/16 16:04:22 VM 4: crash: no output from test machine
2025/05/16 16:04:23 [FATAL] interface probing failed: failed to execute prog: %!w(<nil>) (Crashed)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000040)='/sys/fs/cgroup/system.slice/memory.max', 0x1, 0x0)
write(r0, &(0x7f0000000080)=' ', 0x1)

can you share your .config and manager.cfg, I'm currently using dashboard/config/linux/upstream-apparmor-kasan.config without CONFIG_KASAN.

I also tried defconfig, however it will enter into rescue mode (no network) when starting bullseye.img.

@dvyukov
Copy link
Collaborator

dvyukov commented May 20, 2025

I did not record exact kernel revision/config, etc. But also used something similar to dashboard/config/linux/upstream-apparmor-kasan.config.

If looks like your kernel/VM is somehow mis-configured based on very frequent "no output from test machine". Do you run qemu w/o KVM by any chance? Does syz-manager work fine with this exact config?

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

Successfully merging this pull request may close these issues.

3 participants