NetBSD-Syzbot archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: NetBSD syzbot broken?
> Date: Thu, 26 Dec 2024 10:26:29 +0100
> From: Aleksandr Nogikh <nogikh%google.com@localhost>
>
> On Fri, Dec 20, 2024 at 2:01 AM Taylor R Campbell <riastradh%netbsd.org@localhost> wrote:
> >
> > Looks like the NetBSD syzbot is still not running, but for different
> > reasons now:
> >
> > https://syzkaller.appspot.com/bug?extid=848e5b707cc911337a29 looks
> > like a bug in the NetBSD build which was fixed back in October by
> > adding shquote(3) to libnbcompat during the tools build
>
> Does something need to be done on the syzbot side to incorporate this fix?
Shouldn't be -- if you just do a clean build of NetBSD with build.sh,
starting with build.sh tools, it should pick that up.
If you had cached the tools build, it's possible you need to delete
your tooldir and rebuild it. A quick skim of
https://github.com/google/syzkaller/blob/d3ccff6372e07c6aabd02b5da419aa6492b5f0ad/pkg/build/netbsd.go#L24
suggests you do use fresh tools:
// Clear the tools.
if _, err := osutil.RunCmd(5*time.Minute, params.KernelDir, "rm", "-rf", "obj/"); err != nil {
return ImageDetails{}, err
}
So this should be addressed, but if it still happens (e.g., if I
misunderstood what is getting cleaned here -- usually I use `build.sh
-O ../obj' so all the build products go into ../obj and the source
tree can even be read-only), I can take a closer look.
> > https://syzkaller.appspot.com/bug?extid=85f03a4da9f6aedf4c44 looks
> > like a golang build problem that probably isn't NetBSD specific?
> >
> > --- FAIL: TestFuzz (11.34s)
> > testutil.go:35: seed=1733770450604578864
> > fuzzer_test.go:210: CRASH: first bug
> > fuzzer_test.go:210: CRASH: second bug
> > fuzzer_test.go:88: resulting corpus:
> > testing.go:1231: TempDir RemoveAll cleanup: unlinkat /tmp/TestFuzz1015377258/001: directory not empty
> > FAIL
>
> This looks like a one-off reincarnation of
> https://github.com/google/syzkaller/issues/4920
> It may cause syzbot sometimes to not update to a newer revision, but
> it should not prevent it from doing fuzzing.
OK, thanks!
> > https://syzkaller.appspot.com/bug?extid=ed1ef9cf91c3de65d44b looks
> > like a testbed problem with posix_spawnp -- presumably this is
> > happening before anything even starts running NetBSD?
>
> Yes, it happens when syzbot tries to update to a newer NetBSD kernel
> revision. It runs syz-manager with a "-mode=smoke-test" option and
> that quickly fails with "SYZFAIL: posix_spawnp failed".
>
> This must have begun after
> https://github.com/google/syzkaller/commit/bc1a1b50f942408a9139887b914f745d9fa02adc
>
> > Can I trouble any of you folks to help get syzbot again on NetBSD?
> > Anything I can do to help make it happen?
>
> It would really help if you could take a look at the posix_spawnp()
> invocation in the commit I referenced above. On NetBSD, the syscall
> fails with "errno 22: Invalid argument". What could be that invalid
> argument? Why was posix_spawn() working fine?
That's pretty weird, because posix_spawnp just searches $PATH and then
defers to posix_spawn:
https://nxr.netbsd.org/xref/src/lib/libc/gen/posix_spawnp.c?r=1.5
Only the file -> fpath argument is changed (and then only if there's
no slash in the pathname); all of the other ones are passed through
verbatim to posix_spawn.
If you can ktrace or ktruss the program it might help to find what
arguments are being passed to posix_spawn. The usage is:
ktrace ./prog # writes binary trace to ktrace.out
kdump # formats binary trace in ktrace.out human-readably
or, if you want a usage model a little more like strace at somewhat
higher overhead:
ktruss [-o <outfile>] ./prog # traces and formats simultaneously
(I guess I should try going through the instructions to run syzkaller
locally at this point rather than just teledebug everything remotely!)
--
You received this message because you are subscribed to the Google Groups "syzkaller-netbsd-bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-netbsd-bugs+unsubscribe%googlegroups.com@localhost.
To view this discussion visit https://groups.google.com/d/msgid/syzkaller-netbsd-bugs/20241226152403.56CCD85638%40mail.netbsd.org.
Home |
Main Index |
Thread Index |
Old Index