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

Fuzz vng roundtrip #4833

Merged
merged 52 commits into from
Nov 6, 2023
Merged

Fuzz vng roundtrip #4833

merged 52 commits into from
Nov 6, 2023

Conversation

jamii
Copy link
Contributor

@jamii jamii commented Oct 30, 2023

This includes:

vng/vng_test.go Outdated Show resolved Hide resolved
@jamii
Copy link
Contributor Author

jamii commented Oct 30, 2023

I tracked the first failure down to a non-deterministic sort in makeDict but haven't figured out the root cause. I've disabled dict vectors for now.

@jamii
Copy link
Contributor Author

jamii commented Oct 30, 2023

The fuzzer now OOMs very quickly. I imagine this means a memory leak somewhere.

@jamii
Copy link
Contributor Author

jamii commented Oct 30, 2023

Looks like the vng reader is leaving many goroutines behind?

goroutine 19 [running]:
github.com/brimdata/zed/vng_test.FuzzVngRoundtrip.func1(0xc000322680, {0xc00034a1e0, 0x1c1, 0x1e0})
	/home/jamie/zed/vng/vng_test.go:91 +0xca5
reflect.Value.call({0x73fe60?, 0x7da1d8?, 0x13?}, {0x7a2039, 0x4}, {0xc0002dff20, 0x2, 0x2?})
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/reflect/value.go:586 +0xb0b
reflect.Value.Call({0x73fe60?, 0x7da1d8?, 0xa01440?}, {0xc0002dff20?, 0x7a1300?, 0xc0001250c0?})
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/reflect/value.go:370 +0xbc
testing.(*F).Fuzz.func1.1(0x0?)
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/fuzz.go:335 +0x3f3
testing.tRunner(0xc000322680, 0xc0002ee630)
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/testing.go:1576 +0x10b
created by testing.(*F).Fuzz.func1
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/fuzz.go:322 +0x5b9

goroutine 1 [chan receive]:
testing.runFuzzTests({0x8b6c20?, 0xaae500}, {0xa72ca0, 0x1, 0x0?}, {0x100c0002ed608?, 0xa7fc00?, 0xa7fc00?})
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/fuzz.go:528 +0x8f4
testing.(*M).Run(0xc00013fcc0)
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/testing.go:1907 +0x685
main.main()
	_testmain.go:49 +0x1aa

goroutine 18 [chan receive]:
testing.(*F).Fuzz.func1({0x8b3640?, 0xc000338000}, {{0x0, 0x0}, {0xc0001403c0, 0x2f}, {0x0, 0x0, 0x0}, {0xc000328140, ...}, ...})
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/fuzz.go:337 +0x5cc
testing.(*F).Fuzz(0xc000338000, {0x73fe60?, 0x7da1d8})
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/fuzz.go:402 +0xab7
github.com/brimdata/zed/vng_test.FuzzVngRoundtrip(0x0?)
	/home/jamie/zed/vng/vng_test.go:24 +0x27
testing.fRunner(0xc000338000, 0x7da1e0)
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/fuzz.go:722 +0xc5
created by testing.runFuzzTests
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/fuzz.go:527 +0x8de

goroutine 20 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002ee750, {0x4e962a?, 0xc000322680?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 21 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002ee7e0, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 22 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002ee870, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 23 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002ee900, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 24 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002ee990, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 25 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002eea20, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 26 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002eeab0, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 27 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002eeb40, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 28 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002eebd0, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 29 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002eec60, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 30 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002eecf0, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 31 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002eed80, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 32 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002eee10, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 33 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002eeea0, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 34 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002eef30, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

goroutine 35 [select]:
github.com/brimdata/zed/zio/zngio.(*worker).run(0xc0002eefc0, {0x0?, 0x0?}, 0xc000114840)
	/home/jamie/zed/zio/zngio/scanner.go:213 +0xa5
created by github.com/brimdata/zed/zio/zngio.(*scanner).start
	/home/jamie/zed/zio/zngio/scanner.go:102 +0x38

@jamii
Copy link
Contributor Author

jamii commented Oct 30, 2023

Well, we hit this line twice.

https://github.com/brimdata/zed/blob/0667645fc23276f1c8cef513dc4c141fbb8fedfa//zio/zngio/reader.go#L86-L88

Called from:

goroutine 19 [running]:
runtime/debug.Stack()
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/runtime/debug/stack.go:16 +0x19
github.com/brimdata/zed/zio/zngio.(*Reader).init(0xc00012aa80)
	/home/jamie/zed/zio/zngio/reader.go:90 +0x6e
github.com/brimdata/zed/zio/zngio.(*Reader).Read(0xc00012aa80)
	/home/jamie/zed/zio/zngio/reader.go:106 +0x1e
github.com/brimdata/zed/zio/zngio.readTrailer({0xc0002f21f6, 0x92, 0x92})
	/home/jamie/zed/zio/zngio/trailer.go:129 +0x16a
github.com/brimdata/zed/zio/zngio.findTrailer({0xc0002f2000, 0x288, 0x288})
	/home/jamie/zed/zio/zngio/trailer.go:96 +0xf4
github.com/brimdata/zed/zio/zngio.ReadTrailer({0x7f17c62feb58?, 0xc0002d93b0?}, 0xb?)
	/home/jamie/zed/zio/zngio/trailer.go:54 +0x45
github.com/brimdata/zed/vng.readTrailer({0x7f17c62feb58?, 0xc0002d93b0?}, 0x8b3af8?)
	/home/jamie/zed/vng/trailer.go:22 +0x2a
github.com/brimdata/zed/vng.NewObject(0xc00012a9c0, {0x7f17c62feb58?, 0xc0002d93b0}, 0x288)
	/home/jamie/zed/vng/object.go:36 +0x48
github.com/brimdata/zed/zio/vngio.NewReader(0xc000154e80?, {0x8b28a0, 0xc0002d93b0})
	/home/jamie/zed/zio/vngio/reader.go:24 +0xa5
github.com/brimdata/zed/vng_test.FuzzVngRoundtrip.func1(0xc0002a2680, {0xc0002ca1e0, 0x1c1, 0x1e0})
	/home/jamie/zed/vng/vng_test.go:49 +0x49c
reflect.Value.call({0x73fe60?, 0x7da1f8?, 0x13?}, {0x7a2039, 0x4}, {0xc00025df20, 0x2, 0x2?})
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/reflect/value.go:586 +0xb0b
reflect.Value.Call({0x73fe60?, 0x7da1f8?, 0xa01528?}, {0xc00025df20?, 0x7a1300?, 0xc0001250c0?})
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/reflect/value.go:370 +0xbc
testing.(*F).Fuzz.func1.1(0x0?)
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/fuzz.go:335 +0x3f3
testing.tRunner(0xc0002a2680, 0xc00026c630)
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/testing.go:1576 +0x10b
created by testing.(*F).Fuzz.func1
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/fuzz.go:322 +0x5b9

goroutine 19 [running]:
runtime/debug.Stack()
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/runtime/debug/stack.go:24 +0x65
runtime/debug.PrintStack()
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/runtime/debug/stack.go:16 +0x19
github.com/brimdata/zed/zio/zngio.(*Reader).init(0xc0000942a0)
	/home/jamie/zed/zio/zngio/reader.go:90 +0x6e
github.com/brimdata/zed/zio/zngio.(*Reader).Read(0xc0000942a0)
	/home/jamie/zed/zio/zngio/reader.go:106 +0x1e
github.com/brimdata/zed/vng.(*Object).readMetaData(0xc00026c630)
	/home/jamie/zed/vng/object.go:136 +0x8b
github.com/brimdata/zed/vng.NewObject(0xc00012a9c0, {0x7f17c62feb58?, 0xc0002d93b0}, 0x288)
	/home/jamie/zed/vng/object.go:53 +0x134
github.com/brimdata/zed/zio/vngio.NewReader(0xc000154e80?, {0x8b28a0, 0xc0002d93b0})
	/home/jamie/zed/zio/vngio/reader.go:24 +0xa5
github.com/brimdata/zed/vng_test.FuzzVngRoundtrip.func1(0xc0002a2680, {0xc0002ca1e0, 0x1c1, 0x1e0})
	/home/jamie/zed/vng/vng_test.go:49 +0x49c
reflect.Value.call({0x73fe60?, 0x7da1f8?, 0x13?}, {0x7a2039, 0x4}, {0xc00025df20, 0x2, 0x2?})
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/reflect/value.go:586 +0xb0b
reflect.Value.Call({0x73fe60?, 0x7da1f8?, 0xa01528?}, {0xc00025df20?, 0x7a1300?, 0xc0001250c0?})
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/reflect/value.go:370 +0xbc
testing.(*F).Fuzz.func1.1(0x0?)
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/fuzz.go:335 +0x3f3
testing.tRunner(0xc0002a2680, 0xc00026c630)
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/testing.go:1576 +0x10b
created by testing.(*F).Fuzz.func1
	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/fuzz.go:322 +0x5b9

@jamii jamii marked this pull request as draft October 30, 2023 03:00
@jamii jamii force-pushed the jamii-fuzz-vng branch 4 times, most recently from 425e203 to 4f537bb Compare October 30, 2023 05:01
@jamii
Copy link
Contributor Author

jamii commented Oct 30, 2023

@nwt With the most recent commit the fuzzer can reproduce something that looks similar to the crashes I'm seeing on real data.

fuzz: elapsed: 0s, gathering baseline coverage: 0/2396 completed
failure while testing seed corpus entry: FuzzVngRoundtrip/f5c94e3a7a95e75c
fuzz: elapsed: 0s, gathering baseline coverage: 3/2396 completed
--- FAIL: FuzzVngRoundtrip (0.38s)
    --- FAIL: FuzzVngRoundtrip (0.00s)
        testing.go:1485: panic: runtime error: slice bounds out of range [:-3]
            goroutine 47 [running]:
            runtime/debug.Stack()
            	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/runtime/debug/stack.go:24 +0x9e
            testing.tRunner.func1()
            	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/testing.go:1485 +0x1f6
            panic({0x8c5280, 0xc00002e4c8})
            	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/runtime/panic.go:884 +0x213
            github.com/brimdata/zed/pkg/peeker.(*Reader).Peek(0xc00009c7d0, 0xfffffffffffffffd)
            	/home/jamie/zed/pkg/peeker/reader.go:77 +0x377
            github.com/brimdata/zed/pkg/peeker.(*Reader).Read(0xc00009c7d0, 0xfffffffffffffffd)
            	/home/jamie/zed/pkg/peeker/reader.go:81 +0x45
            github.com/brimdata/zed/zio/zngio.(*parser).readCompressedFrame(0xc0001fa120, 0xd0?)
            	/home/jamie/zed/zio/zngio/parser.go:186 +0x33f
            github.com/brimdata/zed/zio/zngio.(*parser).decodeTypes(0xc0001fa120, 0x41)
            	/home/jamie/zed/zio/zngio/parser.go:61 +0x8a
            github.com/brimdata/zed/zio/zngio.(*parser).read(0xc0001fa120)
            	/home/jamie/zed/zio/zngio/parser.go:45 +0x2cd
            github.com/brimdata/zed/zio/zngio.(*scannerSync).Pull(0xc0001fa0e0, 0x0?)
            	/home/jamie/zed/zio/zngio/sync.go:60 +0x127
            github.com/brimdata/zed/zbuf.(*pullerReader).Read(0xc0000aba40)
            	/home/jamie/zed/zbuf/batch.go:190 +0x126
            github.com/brimdata/zed/zio/zngio.(*Reader).Read(0xc000015860)
            	/home/jamie/zed/zio/zngio/reader.go:106 +0xc9
            github.com/brimdata/zed/zio/zngio.readTrailer({0xc00003852d, 0x7, 0x7})
            	/home/jamie/zed/zio/zngio/trailer.go:129 +0x17f
            github.com/brimdata/zed/zio/zngio.findTrailer({0xc000038460, 0xd4, 0xd4})
            	/home/jamie/zed/zio/zngio/trailer.go:96 +0x17d
            github.com/brimdata/zed/zio/zngio.ReadTrailer({0x7f2c7c184e18?, 0xc0002a0060?}, 0x1008730e0?)
            	/home/jamie/zed/zio/zngio/trailer.go:54 +0x9b
            github.com/brimdata/zed/vng.readTrailer({0x7f2c7c184e18?, 0xc0002a0060?}, 0xc00030100a?)
            	/home/jamie/zed/vng/trailer.go:22 +0x5b
            github.com/brimdata/zed/vng.NewObject(0xc0000157a0, {0x7f2c7c184e18?, 0xc0002a0060}, 0xd4)
            	/home/jamie/zed/vng/object.go:36 +0x70
            github.com/brimdata/zed/zio/vngio.NewReader(0xc000042c00?, {0x9f81c0, 0xc0002a0060})
            	/home/jamie/zed/zio/vngio/reader.go:24 +0x14f
            github.com/brimdata/zed/vng_test.roundtrip(0xc000184d00, {0xc06500, 0x0, 0x0?}, {0x0?, 0x0?})
            	/home/jamie/zed/vng/vng_test.go:80 +0x37b
            github.com/brimdata/zed/vng_test.FuzzVngRoundtrip.func1(0x0?, {0xc0000194b0?, 0x0?, 0x468859?})
            	/home/jamie/zed/vng/vng_test.go:49 +0x299
            reflect.Value.call({0x880e60?, 0x91b5b0?, 0x13?}, {0x8e3057, 0x4}, {0xc0006a94d0, 0x2, 0x2?})
            	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/reflect/value.go:586 +0xb0b
            reflect.Value.Call({0x880e60?, 0x91b5b0?, 0xb58d28?}, {0xc0006a94d0?, 0x8e2300?, 0xc0000194c0?})
            	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/reflect/value.go:370 +0xbc
            testing.(*F).Fuzz.func1.1(0x0?)
            	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/fuzz.go:335 +0x3f3
            testing.tRunner(0xc000184d00, 0xc0001ecbd0)
            	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/testing.go:1576 +0x10b
            created by testing.(*F).Fuzz.func1
            	/nix/store/m3mi5km1zdmaqdb33byirlixigzh3f4l-go-1.20.7/share/go/src/testing/fuzz.go:322 +0x5b9

@nwt
Copy link
Member

nwt commented Oct 31, 2023

I tracked the first failure down to a non-deterministic sort in makeDict but haven't figured out the root cause. I've disabled dict vectors for now.

@jamii: The root cause here is an underspecified total order for Zed types. Neither the specification nor zed.CompareTypes addresses the order of a named type relative to its underlying type or to another named type with the same underlying type. I'm working on a fix for that.

@nwt
Copy link
Member

nwt commented Nov 1, 2023

I tracked the first failure down to a non-deterministic sort in makeDict but haven't figured out the root cause. I've disabled dict vectors for now.

@jamii: The root cause here is an underspecified total order for Zed types. Neither the specification nor zed.CompareTypes addresses the order of a named type relative to its underlying type or to another named type with the same underlying type. I'm working on a fix for that.

#4837 should fix this.

@jamii jamii force-pushed the jamii-fuzz-vng branch 2 times, most recently from d77c4ff to 7717d5a Compare November 2, 2023 18:37
vng/vng_test.go Show resolved Hide resolved
@jamii
Copy link
Contributor Author

jamii commented Nov 2, 2023

I couldn't find a setting to mark a test as a known failure, so I stashed the testdata for these issues in jamii-fuzz-vng-repro.

@jamii jamii marked this pull request as ready for review November 2, 2023 20:51
vng/vector/primitive.go Outdated Show resolved Hide resolved
vng/vng_test.go Outdated Show resolved Hide resolved
vng/vng_test.go Outdated Show resolved Hide resolved
vng/vng_test.go Outdated Show resolved Hide resolved
vng/vng_test.go Outdated Show resolved Hide resolved
vng/vng_test.go Outdated Show resolved Hide resolved
jamii and others added 2 commits November 3, 2023 18:17
vng/vng_test.go Outdated Show resolved Hide resolved
vng/vng_test.go Outdated Show resolved Hide resolved
vng/vng_test.go Outdated Show resolved Hide resolved
vng/vng_test.go Outdated Show resolved Hide resolved
vng/vng_test.go Outdated Show resolved Hide resolved
vng/vng_test.go Outdated Show resolved Hide resolved
jamii and others added 6 commits November 5, 2023 09:49
vng/vng_test.go Outdated Show resolved Hide resolved
@@ -125,7 +125,6 @@ func findCandidate(b []byte, off int) int {
}
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep me!

Copy link
Contributor Author

@jamii jamii Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...I could have sworn I already removed that line from the diff, but apparently I just randomly added it.

bd2645d

jamii and others added 2 commits November 6, 2023 15:17
Co-authored-by: Noah Treuhaft <[email protected]>
@jamii jamii merged commit 84d6834 into main Nov 6, 2023
3 checks passed
@jamii jamii deleted the jamii-fuzz-vng branch November 6, 2023 23:27
jamii added a commit that referenced this pull request Nov 6, 2023
Add a roundtrip fuzzer for vng.
jamii added a commit that referenced this pull request Nov 7, 2023
Hooking up demand to vector.Read.
* Use demand in vector.Read to avoid reading unneeded vectors. Also changes the type of the output value, removing any unused fields so that we can avoid having to materialize a bunch of nulls.
* Add vngio.ReaderOpts, where opts.Demand defaults to demand.All{}.
* Split the demand representation into a separate package to avoid import loops.
* Pull the fuzzer code from #4833 into a fuzz package. (I've manually copied across the requested changes from that pr).
* Add a fuzzer that runs random queries through both zng and vng paths and compares the results. (Found #4854). This uses a gross hack to get around the fact that readers are created before queries are analyzed.
* Change the constants vector to hold []byte instead of zed.Value, since all we ever do is copy the bytes out.

This doesn't yet actually do anything for `zq` or `zed query`. I can work on the latter, and @nwt is thinking about how to refactor to make `zq` possible.
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.

2 participants