{"action":"created","issue":{"url":"https://api.github.com/repos/PX4/Firmware/issues/2381","labels_url":"https://api.github.com/repos/PX4/Firmware/issues/2381/labels{/name}","comments_url":"https://api.github.com/repos/PX4/Firmware/issues/2381/comments","events_url":"https://api.github.com/repos/PX4/Firmware/issues/2381/events","html_url":"https://github.com/PX4/Firmware/issues/2381","id":88508843,"number":2381,"title":"UAVCAN broken in stable / master","user":{"login":"mhkabir","id":5557676,"avatar_url":"https://avatars.githubusercontent.com/u/5557676?v=3","gravatar_id":"","url":"https://api.github.com/users/mhkabir","html_url":"https://github.com/mhkabir","followers_url":"https://api.github.com/users/mhkabir/followers","following_url":"https://api.github.com/users/mhkabir/following{/other_user}","gists_url":"https://api.github.com/users/mhkabir/gists{/gist_id}","starred_url":"https://api.github.com/users/mhkabir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhkabir/subscriptions","organizations_url":"https://api.github.com/users/mhkabir/orgs","repos_url":"https://api.github.com/users/mhkabir/repos","events_url":"https://api.github.com/users/mhkabir/events{/privacy}","received_events_url":"https://api.github.com/users/mhkabir/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PX4/Firmware/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"pavel-kirienko","id":3298404,"avatar_url":"https://avatars.githubusercontent.com/u/3298404?v=3","gravatar_id":"","url":"https://api.github.com/users/pavel-kirienko","html_url":"https://github.com/pavel-kirienko","followers_url":"https://api.github.com/users/pavel-kirienko/followers","following_url":"https://api.github.com/users/pavel-kirienko/following{/other_user}","gists_url":"https://api.github.com/users/pavel-kirienko/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-kirienko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-kirienko/subscriptions","organizations_url":"https://api.github.com/users/pavel-kirienko/orgs","repos_url":"https://api.github.com/users/pavel-kirienko/repos","events_url":"https://api.github.com/users/pavel-kirienko/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-kirienko/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/PX4/Firmware/milestones/2","html_url":"https://github.com/PX4/Firmware/milestones/First%20beta%20release","labels_url":"https://api.github.com/repos/PX4/Firmware/milestones/2/labels","id":656066,"number":2,"title":"First beta release","description":"The first beta release is intended for early adopters and testers. It should have a limited but stable feature set and cover the basic, but important use cases. It can be rough around the edges but must not fail or be hard to use.","creator":{"login":"LorenzMeier","id":1208119,"avatar_url":"https://avatars.githubusercontent.com/u/1208119?v=3","gravatar_id":"","url":"https://api.github.com/users/LorenzMeier","html_url":"https://github.com/LorenzMeier","followers_url":"https://api.github.com/users/LorenzMeier/followers","following_url":"https://api.github.com/users/LorenzMeier/following{/other_user}","gists_url":"https://api.github.com/users/LorenzMeier/gists{/gist_id}","starred_url":"https://api.github.com/users/LorenzMeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LorenzMeier/subscriptions","organizations_url":"https://api.github.com/users/LorenzMeier/orgs","repos_url":"https://api.github.com/users/LorenzMeier/repos","events_url":"https://api.github.com/users/LorenzMeier/events{/privacy}","received_events_url":"https://api.github.com/users/LorenzMeier/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":81,"state":"open","created_at":"2014-05-12T12:27:45Z","updated_at":"2015-06-21T17:57:24Z","due_on":"2015-05-01T07:00:00Z","closed_at":null},"comments":28,"created_at":"2015-06-15T18:50:50Z","updated_at":"2015-06-21T19:13:02Z","closed_at":null,"body":"The UAVCAN dynamic node ID allocation changes got into stable, which increases memory consumption to a breaking point, and also renders the system unusable.\r\n\r\nThis patch gets it back online and usable (for now)\r\n```\r\ndiff --git a/src/modules/uavcan/uavcan_main.cpp b/src/modules/uavcan/uavcan_main.cpp\r\nindex 2f3e1d5..85f55f9 100644\r\n--- a/src/modules/uavcan/uavcan_main.cpp\r\n+++ b/src/modules/uavcan/uavcan_main.cpp\r\n@@ -53,10 +53,6 @@\r\n #include <drivers/drv_pwm_output.h>\r\n \r\n #include \"uavcan_main.hpp\"\r\n-#include <uavcan_posix/dynamic_node_id_server/file_event_tracer.hpp>\r\n-#include <uavcan_posix/dynamic_node_id_server/file_storage_backend.hpp>\r\n-\r\n-#include <uavcan_posix/firmware_version_checker.hpp>\r\n \r\n //todo:The Inclusion of file_server_backend is killing\r\n // #include <sys/types.h> and leaving OK undefined\r\n@@ -75,20 +71,12 @@\r\n  * UavcanNode\r\n  */\r\n UavcanNode *UavcanNode::_instance;\r\n-uavcan::dynamic_node_id_server::CentralizedServer *UavcanNode::_server_instance;\r\n-uavcan_posix::dynamic_node_id_server::FileEventTracer tracer;\r\n-uavcan_posix::dynamic_node_id_server::FileStorageBackend storage_backend;\r\n-uavcan_posix::FirmwareVersionChecker fw_version_checker;\r\n \r\n UavcanNode::UavcanNode(uavcan::ICanDriver &can_driver, uavcan::ISystemClock &system_clock) :\r\n \tCDev(\"uavcan\", UAVCAN_DEVICE_PATH),\r\n \t_node(can_driver, system_clock),\r\n \t_node_mutex(),\r\n-\t_esc_controller(_node),\r\n-\t_fileserver_backend(_node),\r\n-\t_node_info_retriever(_node),\r\n-\t_fw_upgrade_trigger(_node, fw_version_checker),\r\n-\t_fw_server(_node, _fileserver_backend)\r\n+\t_esc_controller(_node)\r\n {\r\n \t_control_topics[0] = ORB_ID(actuator_controls_0);\r\n \t_control_topics[1] = ORB_ID(actuator_controls_1);\r\n@@ -154,7 +142,6 @@ UavcanNode::~UavcanNode()\r\n \tperf_free(_perfcnt_node_spin_elapsed);\r\n \tperf_free(_perfcnt_esc_mixer_output_elapsed);\r\n \tperf_free(_perfcnt_esc_mixer_total_elapsed);\r\n-\tdelete(_server_instance);\r\n \r\n }\r\n \r\n@@ -305,74 +292,6 @@ int UavcanNode::init(uavcan::NodeID node_id)\r\n \t\tbr = br->getSibling();\r\n \t}\r\n \r\n-\r\n-\t/* Initialize the fw version checker.\r\n-\t* giving it it's path\r\n-\t*/\r\n-\r\n-\tret = fw_version_checker.createFwPaths(UAVCAN_FIRMWARE_PATH);\r\n-\r\n-\tif (ret < 0) {\r\n-\t\treturn ret;\r\n-\t}\r\n-\r\n-\r\n-\t/* Start fw file server back */\r\n-\r\n-\tret = _fw_server.start();\r\n-\r\n-\tif (ret < 0) {\r\n-\t\treturn ret;\r\n-\t}\r\n-\r\n-\t/* Initialize storage back end for the node allocator using UAVCAN_NODE_DB_PATH directory */\r\n-\r\n-\tret = storage_backend.init(UAVCAN_NODE_DB_PATH);\r\n-\r\n-\tif (ret < 0) {\r\n-\t\treturn ret;\r\n-\t}\r\n-\r\n-\t/* Initialize trace in the UAVCAN_NODE_DB_PATH directory */\r\n-\r\n-\tret = tracer.init(UAVCAN_LOG_FILE);\r\n-\r\n-\tif (ret < 0) {\r\n-\t\treturn ret;\r\n-\t}\r\n-\r\n-\t/* Create dynamic node id server for the Firmware updates directory */\r\n-\r\n-\t_server_instance = new uavcan::dynamic_node_id_server::CentralizedServer(_node, storage_backend, tracer);\r\n-\r\n-\tif (_server_instance == 0) {\r\n-\t\treturn -ENOMEM;\r\n-\t}\r\n-\r\n-\t/* Initialize the dynamic node id server  */\r\n-\tret = _server_instance->init(_node.getNodeStatusProvider().getHardwareVersion().unique_id);\r\n-\r\n-\tif (ret < 0) {\r\n-\t\treturn ret;\r\n-\t}\r\n-\r\n-\t/* Start node info retriever to fetch node info from new nodes */\r\n-\r\n-\tret = _node_info_retriever.start();\r\n-\r\n-\tif (ret < 0) {\r\n-\t\treturn ret;\r\n-\t}\r\n-\r\n-\r\n-\t/* Start the fw version checker   */\r\n-\r\n-\tret = _fw_upgrade_trigger.start(_node_info_retriever, fw_version_checker.getFirmwarePath());\r\n-\r\n-\tif (ret < 0) {\r\n-\t\treturn ret;\r\n-\t}\r\n-\r\n \t/*  Start the Node   */\r\n \r\n \treturn _node.start();\r\ndiff --git a/src/modules/uavcan/uavcan_main.hpp b/src/modules/uavcan/uavcan_main.hpp\r\nindex dc81fb5..1157843 100644\r\n--- a/src/modules/uavcan/uavcan_main.hpp\r\n+++ b/src/modules/uavcan/uavcan_main.hpp\r\n@@ -48,13 +48,6 @@\r\n #include \"sensors/sensor_bridge.hpp\"\r\n \r\n \r\n-#include <uavcan/protocol/dynamic_node_id_server/centralized.hpp>\r\n-#include <uavcan/protocol/node_info_retriever.hpp>\r\n-#include <uavcan_posix/basic_file_server_backend.hpp>\r\n-#include <uavcan/protocol/firmware_update_trigger.hpp>\r\n-#include <uavcan/protocol/file_server.hpp>\r\n-\r\n-\r\n /**\r\n  * @file uavcan_main.hpp\r\n  *\r\n@@ -83,7 +76,7 @@ class UavcanNode : public device::CDev\r\n \r\n \tstatic constexpr unsigned PollTimeoutMs      = 10;\r\n \r\n-\tstatic constexpr unsigned MemPoolSize        = 10752; ///< Refer to the libuavcan manual to learn why\r\n+\tstatic constexpr unsigned MemPoolSize        = 7168; ///< Refer to the libuavcan manual to learn why\r\n \r\n \t/*\r\n \t * This memory is reserved for uavcan to use for queuing CAN frames.\r\n@@ -147,7 +140,6 @@ private:\r\n \tunsigned\t\t_output_count = 0;\t\t///< number of actuators currently available\r\n \r\n \tstatic UavcanNode\t*_instance;\t\t\t///< singleton pointer\r\n-\tstatic uavcan::dynamic_node_id_server::CentralizedServer *_server_instance;              ///< server singleton pointer\r\n \r\n \tNode\t\t\t_node;\t\t\t\t///< library instance\r\n \tpthread_mutex_t\t\t_node_mutex;\r\n@@ -155,11 +147,6 @@ private:\r\n \tUavcanEscController\t_esc_controller;\r\n \r\n \r\n-\tuavcan_posix::BasicFileSeverBackend _fileserver_backend;\r\n-\tuavcan::NodeInfoRetriever  _node_info_retriever;\r\n-\tuavcan::FirmwareUpdateTrigger  _fw_upgrade_trigger;\r\n-\tuavcan::BasicFileServer        _fw_server;\r\n-\r\n \tList<IUavcanSensorBridge *> _sensor_bridges;\t\t///< List of active sensor bridges\r\n \r\n \tMixerGroup\t\t*_mixers = nullptr;\r\n``` "},"comment":{"url":"https://api.github.com/repos/PX4/Firmware/issues/comments/113944607","html_url":"https://github.com/PX4/Firmware/issues/2381#issuecomment-113944607","issue_url":"https://api.github.com/repos/PX4/Firmware/issues/2381","id":113944607,"user":{"login":"davids5","id":1945821,"avatar_url":"https://avatars.githubusercontent.com/u/1945821?v=3","gravatar_id":"","url":"https://api.github.com/users/davids5","html_url":"https://github.com/davids5","followers_url":"https://api.github.com/users/davids5/followers","following_url":"https://api.github.com/users/davids5/following{/other_user}","gists_url":"https://api.github.com/users/davids5/gists{/gist_id}","starred_url":"https://api.github.com/users/davids5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davids5/subscriptions","organizations_url":"https://api.github.com/users/davids5/orgs","repos_url":"https://api.github.com/users/davids5/repos","events_url":"https://api.github.com/users/davids5/events{/privacy}","received_events_url":"https://api.github.com/users/davids5/received_events","type":"User","site_admin":false},"created_at":"2015-06-21T19:13:02Z","updated_at":"2015-06-21T19:13:02Z","body":"@pavel-kirienko \r\n\r\nAs we have been skype chatting about, the memory reduction of using 48 block size will not compile on master_uavcan_modular nor nuttx_next_uavcan_multi_threaded. I think the block allocation rework did not take into account the code you added for the virtual can driver and the testing was only done on uavcan_size_investigation that does not have the virtual can driver.\r\n\r\n```In instantiation of 'static void uavcan::IsDynamicallyAllocatable<T>::check() [with T = Queue<VirtualCanIface::RxItem>::Item]```\r\n\r\n\r\nThe issues it the size of Queue<RxItem> rx_queue_ is causing a check failure (CCASERT) on     ```char dummy[(sizeof(T) <= MemPoolBlockSize) ? 1 : -1] = { '0' };```\r\n\r\n\r\nPlease fix the issue and ensure both of the above mentioned branches compile with the uavcan "}}