You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn’t a very big deal, but something to perhaps clean up in the future. The new headless command server is letting me see much more information on our shutdown and one thing I notice is that we have an interface that is using tcpip_client_interface with nil timeouts for both read and write (it is expected that this interface won’t be constantly transmitting). Anyway, it is failing to shut down cleanly on exit (full message below).
It looks like tcpip_socket_stream expects to get a IOERROR or Errno::ENOTSOCK when the socket is closed while waiting on the select(), but that apparently isn’t happening.
It looks like this may be a common problem that can be refactored around by just doing a blocking read instead of using select: https://www.ruby-forum.com/topic/4415582
I could refactor the target on the other side to send packets more frequently so we could use a timeout, but that seems a workaround rather than a fix.
2015/07/09 15:02:07.156 INFO: Killing thread for interface BUSMON_INT
2015/07/09 15:02:08.161 WARN: Failed to gracefully kill thread:
Caller Backtrace:
/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/interface_thread.rb:124:in stop' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/interfaces.rb:121:instop_thread'
/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/connections.rb:84:in disconnect' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/connections.rb:44:inblock in stop'
/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/connections.rb:43:in each' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/connections.rb:43:instop'
/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb:226:in stop' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb:365:inensure in post_options_parsed_hook'
/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb:365:in post_options_parsed_hook' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/gui/qt_tool.rb:181:inblock in run'
/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/top_level.rb:682:in set_working_dir' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/gui/qt_tool.rb:177:inrun'
/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb:403:in block in run' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/top_level.rb:511:incatch_fatal_exception'
/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb:376:in run' ./CmdTlmServer:15:inblock in
Merge in COSMOSEE/base from connect_running_scripts to master
* commit 'df1fa92b4a4e314512a087067ba3018a1636b6a2':
Support reconnecting to running script
From Kyle---
This isn’t a very big deal, but something to perhaps clean up in the future. The new headless command server is letting me see much more information on our shutdown and one thing I notice is that we have an interface that is using tcpip_client_interface with nil timeouts for both read and write (it is expected that this interface won’t be constantly transmitting). Anyway, it is failing to shut down cleanly on exit (full message below).
It looks like tcpip_socket_stream expects to get a IOERROR or Errno::ENOTSOCK when the socket is closed while waiting on the select(), but that apparently isn’t happening.
It looks like this may be a common problem that can be refactored around by just doing a blocking read instead of using select:
https://www.ruby-forum.com/topic/4415582
I could refactor the target on the other side to send packets more frequently so we could use a timeout, but that seems a workaround rather than a fix.
2015/07/09 15:02:07.156 INFO: Killing thread for interface BUSMON_INT
'2015/07/09 15:02:08.161 WARN: Failed to gracefully kill thread:
Caller Backtrace:
/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/interface_thread.rb:124:in
stop' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/interfaces.rb:121:in
stop_thread'/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/connections.rb:84:in
disconnect' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/connections.rb:44:in
block in stop'/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/connections.rb:43:in
each' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/connections.rb:43:in
stop'/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb:226:in
stop' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb:365:in
ensure in post_options_parsed_hook'/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb:365:in
post_options_parsed_hook' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/gui/qt_tool.rb:181:in
block in run'/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/top_level.rb:682:in
set_working_dir' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/gui/qt_tool.rb:177:in
run'/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb:403:in
block in run' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/top_level.rb:511:in
catch_fatal_exception'/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb:376:in
run' ./CmdTlmServer:15:in
block in/export/home/j1swtb/cosmos/tool_dispatcher/tools/tool_launch.rb:16:in
tool_launch' ./CmdTlmServer:13:in
'Thread Backtrace:
/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/core_ext/io.rb:25:in
select' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/core_ext/io.rb:25:in
fast_select'/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/streams/tcpip_socket_stream.rb:57:in
rescue in read' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/streams/tcpip_socket_stream.rb:51:in
read'/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/streams/stream_protocol.rb:350:in
read_and_handle_timeout' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/streams/stream_protocol.rb:366:in
read_minimum_size'/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/streams/preidentified_stream_protocol.rb:97:in
reduce_to_single_packet' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/streams/stream_protocol.rb:144:in
block in read'/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/streams/stream_protocol.rb:139:in
loop' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/streams/stream_protocol.rb:139:in
read'/opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/interfaces/stream_interface.rb:56:in
read' /opt/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/cosmos-3.5.0/lib/cosmos/tools/cmd_tlm_server/interface_thread.rb:81:in
block in start'2015/07/09 15:02:08.171 INFO: Disconnected from interface BUSMON_INT
The text was updated successfully, but these errors were encountered: