robotpy / mostrobotpy

Official Repository of python implementation of WPILib components
https://robotpy.github.io
Other
11 stars 14 forks source link

QuickVision example fails with SIGABRT #61

Open virtuald opened 10 months ago

virtuald commented 10 months ago

It's hard to duplicate this, but...

(gdb) bt
#0  0xb69031f4 in raise () from target:/lib/libc.so.6
#1  0xb68ee1d8 in abort () from target:/lib/libc.so.6
#2  0xb5d57470 in ?? () from target:/usr/local/lib/python3.12/site-packages/wpinet/lib/libwpinet.so
#3  0xb6ac506c in ?? () from target:/lib/libpthread.so.0
#4  0xb5d6199c in uv_once(int*, void (*)()) () from target:/usr/local/lib/python3.12/site-packages/wpinet/lib/libwpinet.so
#5  0xb5d57624 in uv__work_submit(uv_loop_s*, uv__work*, uv__work_kind, void (*)(uv__work*), void (*)(uv__work*, int)) ()
   from target:/usr/local/lib/python3.12/site-packages/wpinet/lib/libwpinet.so
#6  0xb5d6dd9c in uv_getaddrinfo(uv_loop_s*, uv_getaddrinfo_s*, void (*)(uv_getaddrinfo_s*, int, addrinfo*), char const*, char const*, addrinfo const*) () from target:/usr/local/lib/python3.12/site-packages/wpinet/lib/libwpinet.so
#7  0xb5d20128 in wpi::uv::GetAddrInfo(wpi::uv::Loop&, std::shared_ptr<wpi::uv::GetAddrInfoReq> const&, std::basic_string_view<char, std::char_traits<char> >, std::basic_string_view<char, std::char_traits<char> >, addrinfo const*) ()
   from target:/usr/local/lib/python3.12/site-packages/wpinet/lib/libwpinet.so
#8  0xb5d3aa50 in wpi::ParallelTcpConnector::Connect() ()
   from target:/usr/local/lib/python3.12/site-packages/wpinet/lib/libwpinet.so
#9  0xb5d3fff8 in std::_Function_handler<void (wpi::promise<void>, std::function<void (wpi::uv::Loop&)>), wpi::EventLoopRunner::Thread::Thread()::{lambda(auto:1, std::function<void (wpi::uv::Loop&)>)#1}>::_M_invoke(std::_Any_data const&, wpi::promise<void>&&, std::function<void (wpi::uv::Loop&)>&&) () from target:/usr/local/lib/python3.12/site-packages/wpinet/lib/libwpinet.so
#10 0xb5d40130 in wpi::uv::AsyncFunction<void (std::function<void (wpi::uv::Loop&)>)>::Create(std::shared_ptr<wpi::uv::Loop> const&, std::function<void (wpi::promise<void>, std::function<void (wpi::uv::Loop&)>)>)::{lambda(uv_async_s*)#1}::_FUN(uv_async_s*) () from target:/usr/local/lib/python3.12/site-packages/wpinet/lib/libwpinet.so
#11 0xb5d63b60 in ?? () from target:/usr/local/lib/python3.12/site-packages/wpinet/lib/libwpinet.so
#12 0xb5d5e9f4 in uv__io_poll(uv_loop_s*, int) () from target:/usr/local/lib/python3.12/site-packages/wpinet/lib/libwpinet.so
#13 0xb5d6b8fc in uv_run(uv_loop_s*, uv_run_mode) ()
   from target:/usr/local/lib/python3.12/site-packages/wpinet/lib/libwpinet.so
#14 0xb5d3f7d4 in wpi::EventLoopRunner::Thread::Main() ()
   from target:/usr/local/lib/python3.12/site-packages/wpinet/lib/libwpinet.so
#15 0xb62c8d28 in ?? () from target:/usr/local/lib/python3.12/site-packages/wpiutil/lib/libwpiutil.so
#16 0xb60a32b8 in ?? () from target:/usr/lib/libstdc++.so.6
#17 0xb6abcda0 in ?? () from target:/lib/libpthread.so.0

I killed the webserver process and it seems to work, so it might be that it's running out of memory.

virtuald commented 10 months ago

FWIW memory:

The quickvision robot program is 109m. If I import numpy then vsz goes from 13M to 50M. Importing cscore goes from 50M to 75M. Not 100% sure how that affects actual memory pressure.

virtuald commented 10 months ago

Anyone running into this should try to disable the NI webserver:

python -m robotpy installer niweb disable

You mostly only need it to set the IP address of your robot. If there is ever a time you need to enable it again:

python -m robotpy installer niweb enable