gearman / gearmand

http://gearman.org/
Other
738 stars 138 forks source link

Travis CI tests with g++ > v6 #192

Closed p-alik closed 5 years ago

p-alik commented 5 years ago

An attempt to run Travis CI tests with g++-7 failed. See https://github.com/gearman/gearmand/issues/188#issuecomment-435891565.

p-alik commented 5 years ago

it's done for g++-7 in #193

esabol commented 5 years ago

t/memcached failing? https://travis-ci.org/gearman/gearmand

p-alik commented 5 years ago

t/memcached failing?

it's fine after restart

esabol commented 5 years ago

t/memcached failing?

it's fine after restart

Flaky tests are very annoying! It is hard to know when there is an actual problem or not.

p-alik commented 5 years ago

Unfortunately it isn't reproducible in my testing environment. Not sure ./configure --disable-libmemcached in .travis.yml is an option.

p-alik commented 5 years ago

Local tests are always failing in this snippet https://github.com/gearman/gearmand/blob/c343b3b93e057dccf2a93a8109663437ceded148/libtest/signal.cc#L228-L232

exception: Invalid argument when opening lock

esabol commented 5 years ago

That's EINVAL, right? According to the man page, that means 'name consists of just "/", followed by no other characters,' which doesn't seem believable. Maybe adding some more information to the error message is needed, like lock_name and the actual errno value.

p-alik commented 5 years ago

I beg your pardon and I have to withdraw my statement. My changes on lock_name cause the issue.

p-alik commented 5 years ago

https://api.travis-ci.org/v3/job/458552968/log.txt shows

libtest/client.cc:268: in start() pid(30732) localhost:46220 ping(libtest/client.cc:268: Connection refused), additionally pid: 30796 is alive: true waited: 17 server started. exec: /home/travis/build/p-alik/gearmand/libtool --mode=execute /home/travis/build/p-alik/gearmand/./gearmand/gearmand --verbose=INFO --log-file=var/log/gearmand.logpcsEGr --pid-file=var/run/gearmand.pidCbEK24 --port=46220 --queue-type=libmemcached --libmemcached-servers=localhost:57005 --listen=localhost  stderr:

tests/memcached_test.cc:119: in lp_1054377_TEST() pid(30732) Assertion 'server_startup(servers, "gearmand", first_port, argv)'
memcached.queue restart.lp:1054377                  [ failed ]
esabol commented 5 years ago

If the testing code is waiting for the server to startup, maybe it just needs to wait a second before trying or retry a few times with a short delay in between attempts?

SpamapS commented 5 years ago

Those tests are pretty ridiculously flaky but we kind of got them down to 0.1% fail rate. Ultimately there's a refactor needed to just use a 0 port listen to get a random available one assigned and then pass the port back to the client code somehow. Until now.. it will just be flaky. I'd be fine with disabling all of the queue backends, as I think they're all pointless, but IIRC, some of you actually like them. ;)

p-alik commented 5 years ago

As long as gearmand supports a queue backend, we have to test it also.

esabol commented 5 years ago

The fail rate seems more like 10% to me, fwiw. That's not based on any actual data, of course, just my gut.

p-alik commented 5 years ago

fixed in #219