Commit b31329e
committed
Fix test-run crash when default server is crashed
Before this change, test-run crashed if the default tarantool server
had crashed with a segmentation fault, and as a result, this caused an
unhandled error with the broken tarantool console handshake. So such a
situation wasn't properly processed by test-run and it failed with the
following traceback:
Traceback (most recent call last):
File "/tarantool/test-run/lib/worker.py", line 283, in __init__
self.inspector = suite.start_server(self.server)
File "/tarantool/test-run/lib/test_suite.py", line 244, in start_server
server.deploy(silent=False)
File "/tarantool/test-run/lib/tarantool_server.py", line 784, in deploy
self.start(silent=silent, **kwargs)
File "/tarantool/test-run/lib/tarantool_server.py", line 911, in start
self.wait_until_started(wait_load, deadline)
File "/tarantool/test-run/lib/tarantool_server.py", line 1157, in wait_until_started
ans = yaml.safe_load(temp.execute('box.info.status'))[0]
File "/tarantool/test-run/lib/tarantool_connection.py", line 161, in execute
self.opt_reconnect()
File "/tarantool/test-run/lib/tarantool_connection.py", line 150, in opt_reconnect
self.reconnect()
File "/tarantool/test-run/lib/tarantool_connection.py", line 138, in reconnect
self.connect()
File "/tarantool/test-run/lib/admin_connection.py", line 96, in connect
raise RuntimeError('Broken tarantool console handshake')
RuntimeError: Broken tarantool console handshake
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/tarantool/test-run/dispatcher.py", line 386, in _run_worker
worker = self.gen_worker(worker_id)
File "/tarantool/test-run/lib/worker.py", line 297, in __init__
self.stop_server(cleanup=False)
File "/tarantool/test-run/lib/worker.py", line 301, in stop_server
self.suite.stop_server(self.server, self.inspector, silent=silent,
File "/tarantool/test-run/lib/test_suite.py", line 249, in stop_server
server.stop(silent=silent)
File "/tarantool/test-run/lib/tarantool_server.py", line 1092, in stop
save_join(self.crash_detector)
File "/tarantool/test-run/lib/tarantool_server.py", line 57, in save_join
green_obj.get(timeout=timeout)
File "src/gevent/greenlet.py", line 829, in gevent._gevent_cgreenlet.Greenlet.get
File "src/gevent/greenlet.py", line 371, in gevent._gevent_cgreenlet.Greenlet._raise_exception
File "/home/tarantool/.local/lib/python3.10/site-packages/gevent/_compat.py", line 65, in reraise
raise value.with_traceback(tb)
File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
File "/tarantool/test-run/lib/test.py", line 35, in _run
self.callable(*self.callable_args, **self.callable_kwargs)
File "/tarantool/test-run/lib/tarantool_server.py", line 967, in crash_detect
self.kill_current_test()
File "/tarantool/test-run/lib/tarantool_server.py", line 1032, in kill_current_test
if self.current_test.current_test_greenlet:
AttributeError: 'NoneType' object has no attribute 'current_test_greenlet'
Now test-run handles the segmentation fault of the default server and
the error with the broken tarantool console handshake properly.
Fixes tarantool#3981 parent ad43d8f commit b31329e
3 files changed
+18
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
96 | | - | |
| 100 | + | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
425 | 425 | | |
426 | 426 | | |
| 427 | + | |
427 | 428 | | |
428 | 429 | | |
429 | 430 | | |
430 | 431 | | |
431 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
432 | 435 | | |
433 | 436 | | |
434 | 437 | | |
| |||
957 | 960 | | |
958 | 961 | | |
959 | 962 | | |
960 | | - | |
| 963 | + | |
961 | 964 | | |
962 | 965 | | |
963 | 966 | | |
| |||
1168 | 1171 | | |
1169 | 1172 | | |
1170 | 1173 | | |
| 1174 | + | |
| 1175 | + | |
1171 | 1176 | | |
1172 | 1177 | | |
1173 | 1178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
288 | 292 | | |
289 | 293 | | |
290 | 294 | | |
| |||
0 commit comments