yandex / yandex-tank

Load and performance benchmark tool
Other
2.46k stars 278 forks source link

Broken pipe in pipe.stdin.write(“stop\n”) #99

Closed v0devil closed 8 years ago

v0devil commented 10 years ago

i have a problem with yandex-tank-jmeter.

My load.ini:

[tank] plugin_web=/usr/lib/yandex-tank/Tank/Plugins/WebOnline.py [jmeter] jmx=tw2testplan_0_33.jmx jmeter_path=/home/apache-jmeter-2.11/bin/jmeter args=-r [graphite] address=localhost port=2003 prefix=jmeter [web] port=8089 [monitoring] config=monitoring.xml

So when test trying to stop i see the next output in console:

13:18:13 INFO: Finishing monitoring 13:18:15 WARNING: Killing 15630 with 9 13:18:17 WARNING: Killing 15630 with 9 13:18:21 WARNING: Killing 15630 with 9

Process 15630: root@loadtest:~# ps -ef | grep 15630 root 15630 15593 0 13:15 ? 00:00:00 [ssh] then I tried to press CTRL+C:

13:19:11 INFO: Trying to shutdown gracefully... 13:19:11 INFO: Finishing test... 13:19:11 ERROR: Failed finishing plugin <Aggregator.AggregatorPlugin instance at 0x7f0b7434afc8>: I/O operation on closed file 13:19:11 INFO: Finishing monitoring

3:19:11 WARNING: Problems stopping agent: Traceback (most recent call last): File "/usr/lib/yandex-tank/Tank/MonCollector/collector.py", line 352, in stop pipe.stdin.write("stop\n") IOError: [Errno 32] Broken pipe

13:19:13 WARNING: Killing 15630 with 9

as a temporary solution (i don`t know is it ok from python side) was fixed collector.py:

line 358:

while tankcore.pid_exists(pipe.pid): if first_try: logging.debug("Killing %s with %s", pipe.pid, signal.SIGTERM) os.killpg(pipe.pid, signal.SIGTERM) pipe.wait() ----- was added first_try = False time.sleep(0.1)

direvius commented 8 years ago

There were a lot of changes in monitoring plugin, this one is fixed now.