FTBFS - test failure TestHeadReadWriter_WriteChunk_Chunk_IterateChunks

Bug #1930752 reported by Dan Bungert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
prometheus (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

prometheus currently FTBFS due to a failure in
TestHeadReadWriter_WriteChunk_Chunk_IterateChunks

--- FAIL: TestHeadReadWriter_WriteChunk_Chunk_IterateChunks (0.23s)
panic: runtime error: slice bounds out of range [:104326] with capacity 104293 [recovered]
 panic: runtime error: slice bounds out of range [:104326] with capacity 104293

goroutine 7 [running]:
testing.tRunner.func1.2(0x608b80, 0xc00001a2d0)
 /usr/lib/go-1.16/src/testing/testing.go:1144 +0x332
testing.tRunner.func1(0xc000001e00)
 /usr/lib/go-1.16/src/testing/testing.go:1147 +0x4b6
panic(0x608b80, 0xc00001a2d0)
 /usr/lib/go-1.16/src/runtime/panic.go:965 +0x1b9
github.com/prometheus/prometheus/tsdb/chunks.TestHeadReadWriter_WriteChunk_Chunk_IterateChunks(0xc000001e00)
 /tmp/autopkgtest.8J3CEG/autopkgtest_tmp/build/src/github.com/prometheus/prometheus/tsdb/chunks/head_chunks_test.go:119 +0xbb9
testing.tRunner(0xc000001e00, 0x632270)
 /usr/lib/go-1.16/src/testing/testing.go:1194 +0xef
created by testing.(*T).Run
 /usr/lib/go-1.16/src/testing/testing.go:1239 +0x2b3
FAIL github.com/prometheus/prometheus/tsdb/chunks 0.275s

This is a known issue and already fixed upstream:
https://github.com/prometheus/prometheus/issues/8403
https://github.com/prometheus/prometheus/pull/8538

This also appears to be related to go 1.16 - previous versions of go appear to
not trigger the issue (or so I infer from the upstream bug report).

Filing the bug largely to track this as a known issue and mark it in the
update-excuses report. Should be resolved when a new upstream version is
uploaded, or the above fix could be cherry-picked if someone is so inclined.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Since we are reaching feature freeze I am adding the mentioned upstream commit as a delta to finally release this version in Impish. The debdiff is attached, I tested it locally and it builds fine and autopkgtest is happy:

autopkgtest [16:16:11]: @@@@@@@@@@@@@@@@@@@@ summary
dh-golang-autopkgtest PASS

The proposed package is also available in this PPA:

https://launchpad.net/~lucaskanashiro/+archive/ubuntu/testing

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thanks Lucas! LGTM

I suppose you decided not to forward this one to Debian because Debian may never be affected by this specific bug (in case a new prometheus version lands before go 1.16 does so), which is reasonable.

I also have a short nitpick here: it would be nice to add a "Bug-Ubuntu" field to the DEP3 metadata in the patch (and maybe a "Bug" one as well, although the GH issue is already linked in the patch description)

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for the review Athos!

I did not forward anything because the next Debian upload should already contain the fix upstream (I am one of the maintainers in Debian), if it is not and this becomes an issue there I'll know where to grab the patch ;)

I am adding the extra DEP-3 headers your asked before performing the upload!

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package prometheus - 2.24.1+ds-1ubuntu1

---------------
prometheus (2.24.1+ds-1ubuntu1) impish; urgency=medium

  * d/p/15-Fix_TestChunkDiskMapper_WriteChunk_Chunk_IterateChunks.patch: add
    upstream patch to fix the test with Go 1.16 (LP: #1930752).

 -- Lucas Kanashiro <email address hidden> Mon, 16 Aug 2021 15:52:50 -0300

Changed in prometheus (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.