Skip to content

SEGV panic during JSONBench query on CSUP input #7109

Description

@philrz
$ curl -s -O https://clickhouse-public-datasets.s3.amazonaws.com/bluesky/file_0001.json.gz &&
  gunzip file_0001.json.gz &&
  super -version &&
  super -dynamic -i fjson -f csup -o bluesky1m.csup file_0001.json &&
  super -c "                                      
SELECT
    commit.collection AS event,
    count() AS count,
    count(distinct did) AS users
FROM 'bluesky1m.csup'
WHERE kind = 'commit'
  AND commit.operation = 'create'
GROUP BY event
ORDER BY count DESC;"

Version: v0.3.0-243-g2a372e091

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xfbd9e8d]

goroutine 90 [running]:
github.com/brimdata/super/csup.metadataValue(0x2ffb01530310, 0x2ffb01a045f0, 0x2ffb014a1a48, 0xf6f52ca?, {0x2ffb01b334a0, 0x1, 0x1})
	/Users/phil/work/super/csup/metadata.go:354 +0xecd
github.com/brimdata/super/csup.metadataValue(0x2ffb01530310, 0x2ffb01a045f0, 0x2ffb014a1a48, 0xf6f52ca?, {0x2ffb01b3c2d0, 0x2, 0x2})
	/Users/phil/work/super/csup/metadata.go:336 +0xc18
github.com/brimdata/super/csup.metadataValue(0x2ffb01530310, 0x2ffb01a045f0, 0x2ffb01c8da48, 0x178c9d8?, {0x2ffb01b3c2d0, 0x2, 0x2})
	/Users/phil/work/super/csup/metadata.go:322 +0x79c
github.com/brimdata/super/csup.(*Object).ProjectMetadata(0x2ffb01b98000, 0x2ffb01a045f0, {0x2ffb01b3c2d0, 0x2, 0x2})
	/Users/phil/work/super/csup/object.go:93 +0x2cd
github.com/brimdata/super/sio/csupio.pruneObject(0x12516f40?, 0x2ffb01b7de30, 0x12838240?)
	/Users/phil/work/super/sio/csupio/vectorreader.go:139 +0x31
github.com/brimdata/super/sio/csupio.(*VectorReader).ConcurrentPull(0x2ffb01558c80, 0x0?, 0x8)
	/Users/phil/work/super/sio/csupio/vectorreader.go:118 +0x21c
github.com/brimdata/super/runtime/exec.(*errorPrefixConcurrentPuller).ConcurrentPull(0x2ffb01b10080, 0x0?, 0x0?)
	/Users/phil/work/super/runtime/exec/environment.go:198 +0x24
github.com/brimdata/super/runtime/vam/op.(*concurrentPuller).Pull(0x2ffb01b33680, 0x0?)
	/Users/phil/work/super/runtime/vam/op/filescan.go:136 +0x147
github.com/brimdata/super/runtime/vam/op.(*Filter).Pull(0x2ffb014759b0, 0x0)
	/Users/phil/work/super/runtime/vam/op/filter.go:22 +0x35
github.com/brimdata/super/runtime/vam/op/aggregate.(*Aggregate).Pull(0x2ffb0191f290, 0x0?)
	/Users/phil/work/super/runtime/vam/op/aggregate/aggregate.go:60 +0x14c
github.com/brimdata/super/runtime/vam/op.(*combineParent).run(0x2ffb01d06100)
	/Users/phil/work/super/runtime/vam/op/combine.go:109 +0x3c
created by github.com/brimdata/super/runtime/vam/op.(*Combine).Pull.func1 in goroutine 81
	/Users/phil/work/super/runtime/vam/op/combine.go:42 +0x35

Details

Repro is with super commit 2a372e0.

The query above is SuperSQL take on JSONBench q2.

The panic is correlated with the merge of #7100. As of commit 207a6b9 that was right before #7100 merged, the query did execute, but per #7061, the query above would produce no output. While #7100 made the simpler repro query in #7061 start returning the correct result instead of nothing, for the full JSONBench query above we now have the panic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions