View Full Version : NetworkTables freeze bugs across C++/Java/Python
virtuald
31-01-2015, 02:09
Some of you may remember this bug (http://www.chiefdelphi.com/forums/showthread.php?t=126102) from last year that affected C++ teams. If you look at this year's NetworkTables code (https://github.com/robotpy/allwpilib/blob/master/networktables/cpp/lib/share/networktables2/WriteManager.cpp#L96)... pretty sure it's still there, somehow the patch (https://github.com/robotpy/wpilib-cpp-crio/commit/06c9bcfd4661422ca2fe63ed28221fac6dba2dac) slipped through.
I really like the idea of NetworkTables, and SmartDashboard/SFX are super useful -- so I spent a week examining the python NetworkTables implementation. I've identified at least two other places (though, I'm sure there's more) where deadlock/increased latency is possible -- and these places are the same across all three languages. I've written some details on this github issue (https://github.com/robotpy/pynetworktables/pull/11).
pynetworktables has fixes for these bugs, and should be pretty stable as of 2015.1.0.
I am not planning on fixing the other platforms, as I've already spent enough of my life fixing networktables bugs :( But hopefully this information can help someone else fix it.
Thad House
31-01-2015, 03:10
Some of you may remember this bug (http://www.chiefdelphi.com/forums/showthread.php?t=126102) from last year that affected C++ teams. If you look at this year's NetworkTables code (https://github.com/robotpy/allwpilib/blob/master/networktables/cpp/lib/share/networktables2/WriteManager.cpp#L96)... pretty sure it's still there, somehow the patch (https://github.com/robotpy/wpilib-cpp-crio/commit/06c9bcfd4661422ca2fe63ed28221fac6dba2dac) slipped through.
I really like the idea of NetworkTables, and SmartDashboard/SFX are super useful -- so I spent a week examining the python NetworkTables implementation. I've identified at least two other places (though, I'm sure there's more) where deadlock/increased latency is possible -- and these places are the same across all three languages. I've written some details on this github issue (https://github.com/robotpy/pynetworktables/pull/11).
pynetworktables has fixes for these bugs, and should be pretty stable as of 2015.1.0.
I am not planning on fixing the other platforms, as I've already spent enough of my life fixing networktables bugs :( But hopefully this information can help someone else fix it.
Ive noticed that NetworkTables for a long time has been really clunky. I was assuming most of that was caused by limitations of the CRIO platform. Maybe now that we have a much more capable system, it might be time to rewrite it to be cleaner and safer. I have had to help many teams debug issues with network tables, usually caused by teams writing data too quickly and causing the buffers to lag out.
I'm not much of a network programmer, so I don't know how much help I would actually be, but I would be glad to help try and learn more about how to make network tables cleaner. Being over 50 files in Java just to have a data sharing protocol seems like a lot too much.
wireties
31-01-2015, 09:18
Ive noticed that NetworkTables for a long time has been really clunky. I was assuming most of that was caused by limitations of the CRIO platform.
It has nothing to do with the platform, language or design. The implementation is just a little shaky - as if the authors were well-meaning but not so well-versed in network and multi-tasking environments. Perhaps a program where veteran software mentors server as code reviewers would help?
Greg McKaskle
31-01-2015, 09:37
By all three languages, you are talking about Java, C++, and python, right?
I do not think these issues exist in the LV implementation, but checking to see if that was what you were meaning by all three.
Greg McKaskle
virtuald
31-01-2015, 10:00
By all three languages, you are talking about Java, C++, and python, right?
I do not think these issues exist in the LV implementation, but checking to see if that was what you were meaning by all three.
Greg McKaskle
Yes, thanks for clarifying. I have not looked at the LV implementation.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.