/srv/irclogs.ubuntu.com/2021/07/20/#snappy.txt

mborzeckimorning06:02
mardymborzecki: hi!06:04
mborzeckimardy: heya06:04
pstolowskimorning06:12
mardypstolowski: hi!06:15
mborzeckipstolowski: and hey06:17
pstolowskimborzecki: do you have a moment for 2nd review of https://github.com/snapcore/snapd/pull/10539 ?06:23
mborzeckipstolowski: will do, i have it open already06:23
pstolowskity06:23
mborzeckihttps://github.com/snapcore/snapd/pull/10542 is simple and needs a 2nd review07:12
mardymborzecki: added a +1, but mine is just a formal review07:29
zygagood morning :)07:32
mborzeckizyga: hey07:46
mardyzyga: hi!07:50
zygahey mardy :)07:50
mardyuh... I'm getting the unit tests to hang in my branch stuck for 10 minutes in TestHappyOrthogonalRefreshAutoAliases. Any ideas of what could be wrong? https://paste.ubuntu.com/p/VQrNm8GjJJ/08:27
pstolowskimardy: hard to say, when this happens to me I usually add a loop to print all tasks (kind + status) right before assert around settle08:33
zyga-mbpmardy usually deadlock08:35
zyga-mbpor state waiting forever08:35
pstolowskiah, but this doesn't return from settle08:35
zyga-mbpright08:35
pstolowskiso yeah, something is probably holding the lock so Wait() deadlocks08:35
mborzeckipstolowski: mardy hm i just directly add a couple of printfs in taskrunner before the handler runs08:39
mardyok, let's go back to a more basic question :-) How do I run a single test? I tried `go test -v -run TestHappyOrthogonalRefreshAutoAliases ./overlord/` but it doesn't find any tests to run08:49
pstolowskimardy: go test -check.f <partial name>08:49
mardypstolowski: aahhhh, thanks :-)08:50
zyga-mbpit took me a while to query check command line options08:50
zyga-mbpmardy note that check and testing are separate beasts08:50
zyga-mbpmardy testing sees one test08:51
zyga-mbpcheck has internal structure08:51
zyga-mbpit's a bit annoying at times08:51
zyga-mbpI could be wrong but my attempts to use testing specific features didn't work08:51
mardymines either: $ go test -v -check.f TestHappyOrthogonalRefreshAutoAliases ./overlord/08:53
mardycan't load package: package github.com/snapcore/snapd: no Go files in /home/mardy/go/src/github.com/snapcore/snapd08:53
pstolowskigrrr, power outages today08:55
mardypstolowski: you probably missed my last question then: if I add the -check.f parameter, then it doesn't find the packages to test anymore:08:58
mardy$ go test -v -check.f TestHappyOrthogonalRefreshAutoAliases ./overlord/08:58
mardycan't load package: package github.com/snapcore/snapd: no Go files in /home/mardy/go/src/github.com/snapcore/snapd08:58
pstolowskimardy: run it from the actual subdirecotry08:58
zyga-mbppstolowski oh?08:58
zyga-mbppstolowski more storms?08:58
zyga-mbpmardy yeah08:58
mardypstolowski: wow, so easy, yet so hidden :-)08:59
zyga-mbpmardy it looks like a bug in check08:59
zyga-mbpI ran into that lately a lot08:59
pstolowskizyga-mbp: not storms right now, might be just some maintenance work08:59
pstolowski*no storms08:59
mardyzyga-mbp: yes, I guess it can't be a design decision09:00
mardypstolowski_: mmm... actually, the fault is not only in my branch: that test times out even in the master branch, in my machine09:11
zyga-mbpmardy which directory? overlord?09:12
pstolowski_mardy: checking09:12
mardyzyga-mbp: yep09:12
pstolowski_mardy: passes here09:12
zyga-mbpI bet missing dependency09:12
mardyzyga-mbp: I run `go test -check.f HappyOrthogonalRefreshAutoAliases -v .`09:12
pstolowski_wot09:12
zyga-mbpit relies on squashfstools09:12
zyga-mbptrying09:13
mardylet me check...09:13
zyga-mbpwait09:13
zyga-mbpI mean, give me a sec09:13
zyga-mbpI need older go09:14
zyga-mbpI use 1.1709:14
mardyI do have squashfs-tools installed, do I need squashfs-tools-ng?09:14
zyga-mbpapt-get build-dep .09:15
zyga-mbpthis will give you the right list09:15
zyga-mbptesting overlord with go 1.1009:15
zyga-mbpbtw, what does mardy and pstolowski_ use for go version?09:15
mardynope, seems like I have all the needed deps09:15
zyga-mbp...09:15
pstolowski_1.13.809:15
zyga-mbp(it's sure taking a long time)09:15
zyga-mbppassed09:16
zyga-mbpon 1.1009:16
mardygo version go1.13.8 linux/amd6409:16
pstolowski_yes it's slow for all tests in overlord09:16
zyga-mbptrying 1.1309:17
zyga-mbpmardy what sort of machine do you have? I'm doing this on a 8 core laptop09:17
zyga-mbpmaybe it's just slow09:17
zyga-mbp32 seconds on 1st run on go 1.1309:18
pstolowski_just HappyOrthogonalRefreshAutoAliases is relatively fast09:18
mardyzyga-mbp: it's an intel i5 from... uh... 2011 I think :-) I upgraded it to 8GB of RAM a couple of years ago09:23
zyga-mbpmardy do you have a hdd there?09:23
zyga-mbpcould be that IO is just slow09:23
mardyzyga-mbp: mmm... no, it's an SSD, but in the background I'm creating a copy of an external 1TB drive into another 1TB drive; I wonder if this has an impact...09:25
mardyops on my root partition seem to be fast, though09:25
zyga-mbpmardy no idea though09:27
zyga-mbpare you swapping?09:27
zyga-mbp8GB is a bit thin09:27
pstolowskithese tests have 45s timeout for Settle though09:30
pstolowskishould be more than enough ;)09:30
pstolowskimardy: ah, i missed what you said about 1TB copy op in the background... yeah, maybe09:31
mardylet's see how CI goes then :-)09:31
mardypstolowski, ijohnson[m]: so, the issue with "snapctl start" happens because, unless --enable is given, I build a list of the snap's disabled services and I pass that to wrappers.StartServices()13:40
mardyI've verified that if I set this to nil, then everything works13:40
mardywhen building this list I do exclude those snaps explicitly mentioned in the command line, but this does not seem to be enough13:40
mardy(indeed, the explicitly mentioned services are not part of the disabledServices list)13:41
mardybut I guess that some of these disabled services are a dependency for the explicitly requested one?13:42
mardywe do not track service dependencies, AFAIK13:43
ijohnson[m]mardy: I don't think dependencies have anything to do with it13:45
ijohnson[m]mardy: pstolowski I wrote a simple reproducer test expanding our current existing spread test13:45
mardyijohnson[m]: can you push it somewhere?13:47
mardyijohnson[m]: I guess that some of those units which I'm not starting are sockets needed by the requested snap13:48
ijohnson[m]mardy: sorry I thought I linked it here but I forgot to paste it https://github.com/snapcore/snapd/pull/1054813:48
pstolowskiijohnson[m]: ah, so existing test didn't pass --enable, that's why it was happy13:49
ijohnson[m]yes13:49
mardypstolowski: it's actually the opposite: the test *did* pass --enable, that's why it was happy :-)13:54
pstolowskimardy: yes you're right13:55
ijohnson[m]uh sorry my test modification as proposed isn't working, let me fix it13:58
pstolowskimardy: anyway, the if !enable {... case is most likely the culprit but it's not clear to me how, needs some printf debugging14:00
mardyouch14:07
mardyexplicit service is "snap.edgexfoundry.postgres.service", but the string being compared to it is "edgexfoundry.postgres"14:08
mardyI think I saw some patch from Samuele addressing snap service names14:08
ijohnson[m]mardy: pstolowski ok, the test if fixed now, it fails as expected :-)14:11
pstolowskiijohnson[m]: thanks a lot for it and for finding the regression!14:11
mardyijohnson[m], pstolowski: this works for the edgexfoundry snap, now I'll try to pull the spread test and see how it goes with that: https://github.com/snapcore/snapd/pull/1054914:35
pstolowskimardy: we didn't have a unit test for !enable or was it using incorrect input names?14:41
mardypstolowski: don't remember, but maybe it was receiving the proper names, being that they are mocked14:44
mardyijohnson[m]: yep, your test passes with my changes14:58
ijohnson[m]mardy: \o/ nice thanks for looking into this so quickly14:59
pstolowskiawesome15:05
* cachio lunch16:14
* cachio afk20:28

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!