ros / ros_comm

ROS communications-related packages, including core client libraries (roscpp, rospy, roslisp) and graph introspection tools (rostopic, rosnode, rosservice, rosparam).
http://wiki.ros.org/ros_comm
765 stars 913 forks source link

roscore stuck at checking logs not starting server #2330

Open acxz opened 1 year ago

acxz commented 1 year ago

similar ros answers question: https://answers.ros.org/question/411865/roscore-stuck-at-checking-logs-not-starting-server/

Since the update to python 3.11 roscore hangs at the below prompt, when hitting Ctrl-C, the following error shows up:

$ roscore

Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

^CTraceback (most recent call last):
  File "/opt/ros/noetic/bin/roscore", line 84, in <module>
    roslaunch.main(['roscore', '--core'] + sys.argv[1:])
  File "/opt/ros/noetic/lib/python3.11/site-packages/roslaunch/__init__.py", line 347, in main
    p.start()
  File "/opt/ros/noetic/lib/python3.11/site-packages/roslaunch/parent.py", line 301, in start
    self.logger.info("starting roslaunch parent run")
  File "/usr/lib/python3.11/logging/__init__.py", line 1489, in info
    self._log(INFO, msg, args, **kwargs)
  File "/usr/lib/python3.11/logging/__init__.py", line 1622, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/ros/noetic/lib/python3.11/site-packages/rosgraph/roslogging.py", line 67, in findCaller
    filename = os.path.normcase(co.co_filename)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen posixpath>", line 52, in normcase
KeyboardInterrupt
^CException ignored in atexit callback: <function _ros_atexit at 0x7ff80276db20>
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3.11/site-packages/rospy/core.py", line 615, in _ros_atexit
    signal_shutdown('atexit')
  File "/opt/ros/noetic/lib/python3.11/site-packages/rospy/core.py", line 560, in signal_shutdown
    _logger.info("signal_shutdown [%s]"%reason)
  File "/usr/lib/python3.11/logging/__init__.py", line 1489, in info
    self._log(INFO, msg, args, **kwargs)
  File "/usr/lib/python3.11/logging/__init__.py", line 1622, in _log
    fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/ros/noetic/lib/python3.11/site-packages/rosgraph/roslogging.py", line 67, in findCaller
    filename = os.path.normcase(co.co_filename)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen posixpath>", line 52, in normcase
KeyboardInterrupt: 
acxz commented 1 year ago

See: https://github.com/ros/ros_comm/pull/2297