diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2024-06-13 10:55:16 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-06-18 08:45:22 +0100 |
commit | 5d88faa0f35f0205c1475893d8589d1e6533dcc0 (patch) | |
tree | be8a93e665b6b41736c78a951ea1e75d9d56be6e /meta/recipes-devtools/perl/files | |
parent | aca14abc35e948da40183cd6eafa249e18fb4788 (diff) | |
download | poky-5d88faa0f35f0205c1475893d8589d1e6533dcc0.tar.gz |
bitbake: siggen: catch FileNotFoundError everywhere and ConnectionError also in get_unihashes
* avoids long trace when BB_HASHSERVE points to non-existent socket
file, e.g.:
BB_HASHSERVE = "unix:///OE/no-socket.sock"
or when running the build before starting the bin/bitbake-hashserv.
* now it shows just warnings like it did in kirkstone
many of them, e.g. 6 just for rebuilding zlib-native, but better than long trace
for nonexistent socket file:
WARNING: zlib-native-1.3.1-r0 do_create_spdx: Error contacting Hash Equivalence Server unix:///OE/no-socket.sock: [Errno 2] No such file or directory
for existing file, but before starting bin/bitbake-hashserv:
WARNING: zlib-native-1.3.1-r0 do_create_spdx: Error contacting Hash Equivalence Server unix:///OE/hashserv.sock: [Errno 111] Connection refused
ERROR: An uncaught exception occurred in runqueue############################################################### | ETA: 0:00:00
Traceback (most recent call last):
File "/OE/build/oe-core/bitbake/lib/hashserv/__init__.py", line 80, in create_client(addr='unix:///OE/no-socket.sock', username=None, password=None):
if typ == ADDR_TYPE_UNIX:
> c.connect_unix(*a)
elif typ == ADDR_TYPE_WS:
File "/OE/build/oe-core/bitbake/lib/bb/asyncrpc/client.py", line 241, in Client.connect_unix(path='/OE/no-socket.sock'):
self.loop.run_until_complete(self.client.connect_unix(path))
> self.loop.run_until_complete(self.client.connect())
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in _UnixSelectorEventLoop.run_until_complete(future=<Task finished name='Task-6' coro=<AsyncClient.connect() done, defined at /OE/build/oe-core/bitbake/lib/bb/asyncrpc/client.
py:150> exception=FileNotFoundError(2, 'No such file or directory')>):
> return future.result()
File "/OE/build/oe-core/bitbake/lib/bb/asyncrpc/client.py", line 152, in AsyncClient.connect():
if self.socket is None:
> self.socket = await self._connect_sock()
await self.setup_connection()
File "/OE/build/oe-core/bitbake/lib/bb/asyncrpc/client.py", line 85, in connect_sock:
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM, 0)
> sock.connect(os.path.basename(path))
finally:
FileNotFoundError: [Errno 2] No such file or directory
ERROR: Running idle function
Traceback (most recent call last):
File "/OE/build/oe-core/bitbake/lib/hashserv/__init__.py", line 80, in create_client(addr='unix:///OE/no-socket.sock', username=None, password=None):
if typ == ADDR_TYPE_UNIX:
> c.connect_unix(*a)
elif typ == ADDR_TYPE_WS:
File "/OE/build/oe-core/bitbake/lib/bb/asyncrpc/client.py", line 241, in Client.connect_unix(path='/OE/no-socket.sock'):
self.loop.run_until_complete(self.client.connect_unix(path))
> self.loop.run_until_complete(self.client.connect())
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in _UnixSelectorEventLoop.run_until_complete(future=<Task finished name='Task-6' coro=<AsyncClient.connect() done, defined at /OE/build/oe-core/bitbake/lib/bb/asyncrpc/client.
py:150> exception=FileNotFoundError(2, 'No such file or directory')>):
> return future.result()
File "/OE/build/oe-core/bitbake/lib/bb/asyncrpc/client.py", line 152, in AsyncClient.connect():
if self.socket is None:
> self.socket = await self._connect_sock()
await self.setup_connection()
File "/OE/build/oe-core/bitbake/lib/bb/asyncrpc/client.py", line 85, in connect_sock:
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM, 0)
> sock.connect(os.path.basename(path))
finally:
FileNotFoundError: [Errno 2] No such file or directory
Summary: There were 2 ERROR messages, returning a non-zero exit code.
1605616 09:29:05.369352 Parse cache valid
1605616 09:30:14.500863 Registering idle function <function BBCooker.buildTargets.<locals>.buildTargetsIdle at 0x7f43988c09a0>
1605616 09:30:14.500927 Removing idle function <bound method Command.runAsyncCommand of <bb.command.Command object at 0x7f43a961c350>>
1605616 09:30:14.573274 Exception Traceback (most recent call last):
File "/OE/build/oe-core/bitbake/lib/bb/server/process.py", line 435, in idle_thread_internal
retval = function(self, data, False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/OE/build/oe-core/bitbake/lib/bb/cooker.py", line 1487, in buildTargetsIdle
retval = rq.execute_runqueue()
^^^^^^^^^^^^^^^^^^^^^
File "/OE/build/oe-core/bitbake/lib/bb/runqueue.py", line 1651, in execute_runqueue
return self._execute_runqueue()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/OE/build/oe-core/bitbake/lib/bb/runqueue.py", line 1567, in _execute_runqueue
if self.rqdata.prepare() == 0:
^^^^^^^^^^^^^^^^^^^^^
File "/OE/build/oe-core/bitbake/lib/bb/runqueue.py", line 1290, in prepare
unihashes = bb.parse.siggen.get_unihashes(ready)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/OE/build/oe-core/bitbake/lib/bb/siggen.py", line 713, in get_unihashes
with self.client() as client:
File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
return next(self.gen)
^^^^^^^^^^^^^^
File "/OE/build/oe-core/bitbake/lib/bb/siggen.py", line 595, in client
self._client = hashserv.create_client(self.server, **self.get_hashserv_creds())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/OE/build/oe-core/bitbake/lib/hashserv/__init__.py", line 88, in create_client
raise e
File "/OE/build/oe-core/bitbake/lib/hashserv/__init__.py", line 80, in create_client
c.connect_unix(*a)
File "/OE/build/oe-core/bitbake/lib/bb/asyncrpc/client.py", line 241, in connect_unix
self.loop.run_until_complete(self.client.connect())
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/OE/build/oe-core/bitbake/lib/bb/asyncrpc/client.py", line 152, in connect
self.socket = await self._connect_sock()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/OE/build/oe-core/bitbake/lib/bb/asyncrpc/client.py", line 85, in connect_sock
sock.connect(os.path.basename(path))
FileNotFoundError: [Errno 2] No such file or directory
broke the idle_thread, exiting
1605616 09:30:14.673756 Exiting (socket: True)
1605616 09:30:14.683153 Exiting as we could obtain the lock
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/OE/build/oe-core/bitbake-cookerdaemon.log' mode='a+' encoding='UTF-8'>
sys:1: ResourceWarning: unclosed <socket.socket fd=17, family=1, type=1, proto=0>
ResourceWarning: Enable tracemalloc to get the object allocation traceback
(Bitbake rev: 550c86969e5a137ffef61b08a520a4855232fb1c)
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/perl/files')
0 files changed, 0 insertions, 0 deletions