386 compilation error: dblogpruner/worker.go:32: constant 4294967296 overflows int

Bug #1433116 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Critical
Menno Finlay-Smits

Bug Description

The run-unit-tests-precise-i386 job fails with a compilation error.

worker/dblogpruner/worker.go:32: constant 4294967296 overflows int

The suspect commits are:
Commit 13914ab Merge pull request #1611 from anastasiamac/cmd-storage …
Commit 8ed7cb6Merge pull request #1846 from ericsnowcurrently/fix-1432421-discover-
Commit 8591069 Merge pull request #1853 from mjs/api-open-refactor …
Commit d6b2414 Merge pull request #1826 from wallyworld/lxc-loop-mount …
Commit 89fd719 Merge pull request #1850 from axw/storageprovisioner-api-attachments
Commit 6c3ce9e Merge pull request #1854 from juju/jes-cli …
Commit e94dee9 Merge pull request #1815 from waigani/insensitive-envusers …
Commit 06d65e6 Merge pull request #1847 from juju/db-log …
Commit 6d7f6f2 Merge pull request #1858 from mjs/1432652-TestLoginsDuringUpgrade-rob
Commit 5484f41 Merge pull request #1842 from wallyworld/persistent-volumes …
Commit 7a7a73d Merge pull request #1843 from voidspace/address-life-upgrade …
Commit c95a6d6 Merge pull request #1715 from mattyw/metricsmanager-watchers …

Revision history for this message
Dimiter Naydenov (dimitern) wrote :

This is due to #1847 - introducing the dblogpruner worker. On i386 because int is int32 4 *1024*1024*1024 actually overflows it. I'll attempt to fix it by using int(uint32(4*1024*1024*1024)-1) instead.

Changed in juju-core:
status: Triaged → Opinion
status: Opinion → In Progress
assignee: nobody → Dimiter Naydenov (dimitern)
Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Correction, the PR is #1781 but the issue was there before that, as the 4GB limit wasn't defined as a named constant.

Revision history for this message
Dimiter Naydenov (dimitern) wrote :
Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Fix changed a bit to reflect reviewer comments and IRC discussion.

Revision history for this message
Dimiter Naydenov (dimitern) wrote :

It appears the issue exposed some underlying problems with the implementation, which are outlined in the review. I'll reassign this to Tim and defer the decision on how to fix this as he has more information about it.

Changed in juju-core:
status: In Progress → Triaged
assignee: Dimiter Naydenov (dimitern) → nobody
assignee: nobody → Tim Penhey (thumper)
Changed in juju-core:
assignee: Tim Penhey (thumper) → Menno Smits (menno.smits)
status: Triaged → In Progress
Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :
Revision history for this message
Dimiter Naydenov (dimitern) wrote :
Download full text (5.1 KiB)

It seems like there are a couple of test failures:
(BTW can we please add gc.Commentf to such bizarre asserts like (X, jc.LessThan, Y) - if it fails it's obvious why it failed as the underlying assumption is not explicitly expressed).

----------------------------------------------------------------------
FAIL: logs_test.go:109: LogsSuite.TestPruneLogsBySize

SetUpTest
[LOG] 0:00.010 INFO juju.state opening state, mongo addresses: ["localhost:40798"]; entity <nil>
[LOG] 0:00.010 DEBUG juju.state dialing mongo
[LOG] 0:00.016 INFO juju.mongo dialled mongo successfully on address "127.0.0.1:40798"
[LOG] 0:00.022 DEBUG juju.state connection established
[LOG] 0:00.122 INFO juju.mongo dialled mongo successfully on address "127.0.0.1:40798"
[LOG] 0:00.122 INFO juju.state initializing environment, owner: "test-admin@local"
[LOG] 0:00.122 INFO juju.state info: &mongo.MongoInfo{Info:mongo.Info{Addrs:[]string{"localhost:40798"}, CACert:"-----BEGIN CERTIFICATE-----\nMIIB5DCCAZCgAwIBAgIBADALBgkqhkiG9w0BAQUwSjENMAsGA1UEChMEanVqdTE5\nMDcGA1UEAwwwanVqdS1nZW5lcmF0ZWQgQ0EgZm9yIGVudmlyb25tZW50ICJqdWp1\nIHRlc3RpbmciMB4XDTE1MDMxMTA4MTAwMloXDTI1MDMxODA4MTAwMlowSjENMAsG\nA1UEChMEanVqdTE5MDcGA1UEAwwwanVqdS1nZW5lcmF0ZWQgQ0EgZm9yIGVudmly\nb25tZW50ICJqdWp1IHRlc3RpbmciMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALpQ\naBqM39XlTHYQSiazNmp10SMgu2KMxUsosxI9tHXziQXL8Ri9Vvbrykv/5b/Rjyrd\nF80SPDFUrod6bMmuI5sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgCkMA8GA1UdEwEB\n/wQFMAMBAf8wHQYDVR0OBBYEFNtjLkqJk4nseX4MRjjjHsqwMDWYMB8GA1UdIwQY\nMBaAFNtjLkqJk4nseX4MRjjjHsqwMDWYMAsGCSqGSIb3DQEBBQNBAJCUzZPXWrqe\nUcoW5pbYqvah1a1abs2cHzhQpFDoXDODrAJ2ozlV8mLnpjLExC2N/mjllKewLfK3\nh6UeX1gZ7eQ=\n-----END CERTIFICATE-----\n"}, Tag:names.Tag(nil), Password:""}
[LOG] 0:00.122 INFO juju.state starting presence watcher
[LOG] 0:00.133 INFO juju.mongo dialled mongo successfully on address "127.0.0.1:40798"
SetUpTest done
[LOG] 0:00.179 INFO juju.state opening state, mongo addresses: ["localhost:40798"]; entity <nil>
[LOG] 0:00.179 DEBUG juju.state dialing mongo
[LOG] 0:00.188 INFO juju.mongo dialled mongo successfully on address "127.0.0.1:40798"
[LOG] 0:00.189 DEBUG juju.state connection established
[LOG] 0:00.202 INFO juju.mongo dialled mongo successfully on address "127.0.0.1:40798"
[LOG] 0:00.208 INFO juju.mongo dialled mongo successfully on address "127.0.0.1:40798"
[LOG] 0:03.456 INFO juju.state opening state, mongo addresses: ["localhost:40798"]; entity <nil>
[LOG] 0:03.456 DEBUG juju.state dialing mongo
[LOG] 0:03.458 INFO juju.mongo dialled mongo successfully on address "127.0.0.1:40798"
[LOG] 0:03.458 DEBUG juju.state connection established
[LOG] 0:03.465 INFO juju.mongo dialled mongo successfully on address "127.0.0.1:40798"
[LOG] 0:03.465 INFO juju.mongo dialled mongo successfully on address "127.0.0.1:40798"
logs_test.go:132:
    c.Assert(s.countLogs(c, s1), jc.LessThan, 9000)
... obtained int = 10000
... expected int = 9000

[LOG] 0:06.901 INFO juju.testing reset successfully reset admin password

----------------------------------------------------------------------
FAIL: logs_test.go:147: LogsSuite.TestPruneLogsWithSmallSizeThreshold

SetUpTest
[LOG] 0:00.019 INFO juju.state opening state, mongo addresses: ["local...

Read more...

Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

Sorry that this isn't fixed yet. I was OCR today so didn't have much time for anything else. Part of the problem is that MongoDB on the test servers seems to behave quite differently in terms of disk usage to MongoDB on my development machine so everything passes locally but falis during test runs.

I will fix this tomorrow, perhaps by taking actual MongoDB usage out of the equation for these tests.

Changed in juju-core:
status: In Progress → Fix Committed
Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

Fix committed: 0edbe59

Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

I can see the i386 jobs are compiling again so closing this ticket.

Changed in juju-core:
status: Fix Committed → 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.