Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getWorkerInfo fails during worker startup #3585

Closed
cmumford opened this issue Sep 6, 2017 · 4 comments · Fixed by #7051
Closed

getWorkerInfo fails during worker startup #3585

cmumford opened this issue Sep 6, 2017 · 4 comments · Fixed by #7051

Comments

@cmumford
Copy link

cmumford commented Sep 6, 2017

The worker was able to start and do a successful build, but cannot reconnect to the master during any restart.

Master Versions:

  • Python version: 3.4.2
  • Buildbot version: 0.9.10
  • Twisted version: 17.5.0

Worker Versions:

  • Python version: 3.5.1
  • Buildbot version: 0.9.10
  • Twisted version: 17.5.0

From master/twistd.log:

...
2017-09-06 13:55:29+0000 [-] buildbotNetUsageData: buildbot.net said: ok
2017-09-06 13:55:40+0000 [Broker,0,10.0.9.11] worker 'macOS-1' attaching from IPv4Address(TCP, '10.0.9.11', 54424)
2017-09-06 13:55:40+0000 [Broker,0,10.0.9.11] Failed to communicate with worker 'macOS-1'
	'ascii' codec can't decode byte 0x9f in position 3: ordinal not in range(128)
2017-09-06 13:55:40+0000 [Broker,0,10.0.9.11] Peer will receive following PB traceback:
2017-09-06 13:55:40+0000 [Broker,0,10.0.9.11] Unhandled Error
	Traceback (most recent call last):
	  File "/home/chris/buildbot/sandbox/lib/python3.4/site-packages/twisted/internet/defer.py", line 500, in errback
	    self._startRunCallbacks(fail)
	  File "/home/chris/buildbot/sandbox/lib/python3.4/site-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks
	    self._runCallbacks()
	  File "/home/chris/buildbot/sandbox/lib/python3.4/site-packages/twisted/internet/defer.py", line 653, in _runCallbacks
	    current.result = callback(current.result, *args, **kw)
	  File "/home/chris/buildbot/sandbox/lib/python3.4/site-packages/twisted/internet/defer.py", line 1442, in gotResult
	    _inlineCallbacks(r, g, deferred)
	--- <exception caught here> ---
	  File "/home/chris/buildbot/sandbox/lib/python3.4/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
	    result = result.throwExceptionIntoGenerator(g)
	  File "/home/chris/buildbot/sandbox/lib/python3.4/site-packages/twisted/python/failure.py", line 393, in throwExceptionIntoGenerator
	    return g.throw(self.type, self.value, self.tb)
	  File "/home/chris/buildbot/sandbox/lib/python3.4/site-packages/buildbot/worker/protocols/pb.py", line 76, in _getPerspective
	    accepted = yield workers.newConnection(conn, workerName)
	  File "/home/chris/buildbot/sandbox/lib/python3.4/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
	    result = result.throwExceptionIntoGenerator(g)
	  File "/home/chris/buildbot/sandbox/lib/python3.4/site-packages/twisted/python/failure.py", line 393, in throwExceptionIntoGenerator
	    return g.throw(self.type, self.value, self.tb)
	  File "/home/chris/buildbot/sandbox/lib/python3.4/site-packages/buildbot/worker/manager.py", line 132, in newConnection
	    info = yield conn.remoteGetWorkerInfo()
	  File "/home/chris/buildbot/sandbox/lib/python3.4/site-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
	    result = result.throwExceptionIntoGenerator(g)
	  File "/home/chris/buildbot/sandbox/lib/python3.4/site-packages/twisted/spread/pb.py", line 513, in throwExceptionIntoGenerator
	    return g.throw(RemoteError(self.type, self.value, self.traceback))
	  File "/home/chris/buildbot/sandbox/lib/python3.4/site-packages/buildbot/worker/protocols/pb.py", line 201, in remoteGetWorkerInfo
	    info = yield self.mind.callRemote('getWorkerInfo')
	twisted.spread.pb.RemoteError: 'ascii' codec can't decode byte 0x9f in position 3: ordinal not in range(128)
@seankelly
Copy link
Member

Byte 0x9f isn't defined in ISO-8859-1 and in windows-1252 it's Ÿ. Are there any files with non-ASCII names in the info directory for the worker?

@cmumford
Copy link
Author

cmumford commented Sep 6, 2017

I did do the first build with the stock two info files (admin and host). After the first build I edited both files (using MacVim) and restarted the worker. Once the failures started I created a second worker (using buildbot-worker create-worker worker localhost example-worker pass) and copied those two files over my edited ones, and after restart was still seeing the problems. I'll verify that no other files (like vim temp files) somehow crept into that directory after I edited it when I get back to that machine in about six hours.

@cmumford
Copy link
Author

cmumford commented Sep 7, 2017

@seankelly yup - that was it. Temporary files. Out of curiosity, why does the implementation send over all files in the info directory? Would it be better to only send over known files?

ls -la
total 56
drwxr-xr-x  6 chris  staff    204 Sep  6 06:57 .
drwxr-xr-x  8 chris  staff    272 Sep  6 07:27 ..
-rw-r--r--  1 chris  staff  12525 Sep  5 17:21 .admin.un~
-rw-r--r--  1 chris  staff   1042 Sep  5 17:21 .host.un~
-rw-r--r--  1 chris  staff     43 Sep  6 07:06 admin
-rw-r--r--  1 chris  staff     49 Sep  6 07:06 host

@seankelly
Copy link
Member

That code pre-dates the import from CVS in 2005. It's mentioned in the changelog though from 2003:

buildbot/bot.py (Bot.remote_getSlaveInfo): add routines to get "slave information" from $(slavedir)/info/* . These files are maintained by the slave administrator, and describe the machine/environment that is hosting the slave. Information from them is put into the "Builder" HTML page. Still need to establish a set of well-known filenames and meanings for this data: at the moment, all info/* files are sent to the master, but only 'admin' and 'host' are used on that end.

@rodrigc rodrigc added bytes and removed py3 labels Sep 21, 2017
@rjarry rjarry added this to the 2.0.0 milestone Jan 14, 2019
@rodrigc rodrigc removed this from the 2.0.0 milestone Jan 19, 2019
vibbo added a commit to vibbo/buildbot that referenced this issue Aug 22, 2023
Worker lists and reads all file in WORKER/info folder in functin remote_getWorkerInfo. To prevent it from crashing when it encounteres file that can not be decoded we now only report this error to log and continue.

Fixes buildbot#3585
Fixes buildbot#4758
Fixes buildbot#6932
vibbo added a commit to vibbo/buildbot that referenced this issue Aug 23, 2023
Worker lists and reads all file in WORKER/info folder in functin remote_getWorkerInfo. To prevent it from crashing when it encounteres file that can not be decoded we now only report this error to log and continue.

Fixes buildbot#3585
Fixes buildbot#4758
Fixes buildbot#6932
p12tic pushed a commit to p12tic/buildbot that referenced this issue Sep 2, 2023
Worker lists and reads all file in WORKER/info folder in functin remote_getWorkerInfo. To prevent it from crashing when it encounteres file that can not be decoded we now only report this error to log and continue.

Fixes buildbot#3585
Fixes buildbot#4758
Fixes buildbot#6932
pmisik pushed a commit to pmisik/buildbot that referenced this issue Sep 6, 2023
Worker lists and reads all file in WORKER/info folder in functin remote_getWorkerInfo. To prevent it from crashing when it encounteres file that can not be decoded we now only report this error to log and continue.

Fixes buildbot#3585
Fixes buildbot#4758
Fixes buildbot#6932
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants