{"action":"created","issue":{"url":"https://api.github.com/repos/cms-sw/cmssw/issues/14127","repository_url":"https://api.github.com/repos/cms-sw/cmssw","labels_url":"https://api.github.com/repos/cms-sw/cmssw/issues/14127/labels{/name}","comments_url":"https://api.github.com/repos/cms-sw/cmssw/issues/14127/comments","events_url":"https://api.github.com/repos/cms-sw/cmssw/issues/14127/events","html_url":"https://github.com/cms-sw/cmssw/issues/14127","id":149246710,"number":14127,"title":"edmWriteConfigs segfaults libTestProducerWithPSetDesc.so (Invalid read of size 8)","user":{"login":"davidlt","id":197091,"avatar_url":"https://avatars.githubusercontent.com/u/197091?v=3","gravatar_id":"","url":"https://api.github.com/users/davidlt","html_url":"https://github.com/davidlt","followers_url":"https://api.github.com/users/davidlt/followers","following_url":"https://api.github.com/users/davidlt/following{/other_user}","gists_url":"https://api.github.com/users/davidlt/gists{/gist_id}","starred_url":"https://api.github.com/users/davidlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidlt/subscriptions","organizations_url":"https://api.github.com/users/davidlt/orgs","repos_url":"https://api.github.com/users/davidlt/repos","events_url":"https://api.github.com/users/davidlt/events{/privacy}","received_events_url":"https://api.github.com/users/davidlt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cms-sw/cmssw/labels/pending-assignment","name":"pending-assignment","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-18T19:20:52Z","updated_at":"2016-04-18T19:24:31Z","closed_at":null,"body":"GCC 6.0.1 (`slc6_amd64_gcc600`) started failing.\r\n\r\nThe following command segfaults with `-02` or higher optimisation:\r\n```\r\nedmWriteConfigs -p /mnt/build/davidlt/CMSSW_8_1_X_2016-04-18-1100/tmp/slc6_amd64_gcc600/src/FWCore/Integration/test/TestProducerWithPSetDesc/libTestProducerWithPSetDesc.so\r\n```\r\n\r\n```\r\nProgram received signal SIGSEGV, Segmentation fault.\r\nedm::ParameterSetDescription::addNode (this=this@entry=0x7fffffff25c0, node=..., optional=optional@entry=false, writeToCfi=writeToCfi@entry=true) at /mnt/build/davidlt/CMSSW_8_1_X_2016-04-18-1100/src/FWCore/ParameterSet/src/ParameterSetDescription.cc:92\r\n92          node->checkAndGetLabelsAndTypes(nodeLabels, nodeParameterTypes, nodeWildcardTypes);\r\n(gdb) info args\r\nthis = 0x7fffffff25c0\r\nnode = {\r\n  _M_t = {<std::_Tuple_impl<0ul, edm::ParameterDescriptionNode*, std::default_delete<edm::ParameterDescriptionNode> >> = {<std::_Tuple_impl<1ul, std::default_delete<edm::ParameterDescriptionNode> >> = {<std::_Head_base<1ul, std::default_delete<edm::ParameterDescriptionN\r\node>, true>> = {<std::default_delete<edm::ParameterDescriptionNode>> = {<No data fields>}, <No data fields>}, <No data fields>}, <std::_Head_base<0ul, edm::ParameterDescriptionNode*, false>> = {_M_head_impl = 0x100000000}, <No data fields>}, <No data fields>}}\r\noptional = false\r\nwriteToCfi = true\r\n(gdb) bt\r\n#0  edm::ParameterSetDescription::addNode (this=this@entry=0x7fffffff25c0, node=..., optional=optional@entry=false, writeToCfi=writeToCfi@entry=true) at /mnt/build/davidlt/CMSSW_8_1_X_2016-04-18-1100/src/FWCore/ParameterSet/src/ParameterSetDescription.cc:92\r\n#1  0x00007ffff44fa658 in edm::ParameterSetDescription::add<int, char [16]> (writeToCfi=true, isOptional=false, isTracked=false, value=@0x7fffffff3400: -2147483647, iLabel=..., this=0x7fffffff25c0)\r\n    at /mnt/build/davidlt/CMSSW_8_1_X_2016-04-18-1100/src/FWCore/ParameterSet/interface/ParameterSetDescription.h:422\r\n#2  edm::ParameterSetDescription::addUntracked<int, char [16]> (value=@0x7fffffff3400: -2147483647, iLabel=..., this=0x7fffffff25c0) at /mnt/build/davidlt/CMSSW_8_1_X_2016-04-18-1100/src/FWCore/ParameterSet/interface/ParameterSetDescription.h:95\r\n#3  edmtest::ProducerWithPSetDesc::fillDescriptions (descriptions=...) at /mnt/build/davidlt/CMSSW_8_1_X_2016-04-18-1100/src/FWCore/Integration/test/ProducerWithPSetDesc.cc:459\r\n#4  0x00007ffff450fbbc in edm::ParameterSetDescriptionFiller<edmtest::ProducerWithPSetDesc>::fill (this=<optimized out>, descriptions=...) at /mnt/build/davidlt/CMSSW_8_1_X_2016-04-18-1100/src/FWCore/ParameterSet/interface/ParameterSetDescriptionFiller.h:55\r\n#5  0x00000000004059c0 in (anonymous namespace)::<lambda()>::operator() (__closure=<synthetic pointer>) at /mnt/build/davidlt/CMSSW_8_1_X_2016-04-18-1100/src/FWCore/ParameterSet/bin/edmWriteConfigs.cpp:90\r\n#6  edm::convertException::wrap<(anonymous namespace)::writeCfisForPlugin(const string&, edm::ParameterSetDescriptionFillerPluginFactory*)::<lambda()> > (iFunc=...)\r\n    at /cvmfs/cms-ib.cern.ch/week1/slc6_amd64_gcc600/cms/cmssw/CMSSW_8_1_X_2016-04-18-1100/src/FWCore/Utilities/interface/ConvertException.h:20\r\n#7  (anonymous namespace)::writeCfisForPlugin (factory=0x7ffff7ff8ae0 <edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase* ()>::get()::s_instance>, pluginName=...)\r\n    at /mnt/build/davidlt/CMSSW_8_1_X_2016-04-18-1100/src/FWCore/ParameterSet/bin/edmWriteConfigs.cpp:91\r\n#8  std::_Bind<void (*(std::_Placeholder<1>, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase* ()>*))(std::string const&, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase* ()>*)>::__call<void, std::string&, 0ul, 1ul>(std::tuple<std::string&\r\n>&&, std::_Index_tuple<0ul, 1ul>) (__args=<optimized out>, this=<optimized out>) at /cvmfs/cms-ib.cern.ch/2016-17/slc6_amd64_gcc600/external/gcc/6.0.0-giojec/include/c++/6.0.1/functional:943\r\n#9  std::_Bind<void (*(std::_Placeholder<1>, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase* ()>*))(std::string const&, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase* ()>*)>::operator()<std::string&, void>(std::string&) (\r\n    this=<optimized out>) at /cvmfs/cms-ib.cern.ch/2016-17/slc6_amd64_gcc600/external/gcc/6.0.0-giojec/include/c++/6.0.1/functional:1002\r\n#10 std::for_each<__gnu_cxx::__normal_iterator<std::string*, std::vector<std::string, std::allocator<std::string> > >, std::_Bind<void (*(std::_Placeholder<1>, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase* ()>*))(std::string const&, edmplugin::PluginF\r\nactory<edm::ParameterSetDescriptionFillerBase* ()>*)> >(__gnu_cxx::__normal_iterator<std::string*, std::vector<std::string, std::allocator<std::string> > >, __gnu_cxx::__normal_iterator<std::string*, std::vector<std::string, std::allocator<std::string> > >, std::_Bind<v\r\noid (*(std::_Placeholder<1>, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase* ()>*))(std::string const&, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase* ()>*)>) (__f=..., __last=..., __first=...)\r\n    at /cvmfs/cms-ib.cern.ch/2016-17/slc6_amd64_gcc600/external/gcc/6.0.0-giojec/include/c++/6.0.1/bits/stl_algo.h:3776\r\n#11 edm::for_all<std::vector<std::string, std::allocator<std::string> >, std::_Bind<void (*(std::_Placeholder<1>, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase* ()>*))(std::string const&, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase*\r\n ()>*)> >(std::vector<std::string, std::allocator<std::string> >&, std::_Bind<void (*(std::_Placeholder<1>, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase* ()>*))(std::string const&, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase* ()>*)\r\n>) (f=..., s=...) at /cvmfs/cms-ib.cern.ch/week1/slc6_amd64_gcc600/cms/cmssw/CMSSW_8_1_X_2016-04-18-1100/src/FWCore/Utilities/interface/Algorithms.h:17\r\n#12 <lambda()>::operator() (__closure=<synthetic pointer>) at /mnt/build/davidlt/CMSSW_8_1_X_2016-04-18-1100/src/FWCore/ParameterSet/bin/edmWriteConfigs.cpp:285\r\n#13 edm::convertException::wrap<main(int, char**)::<lambda()> > (iFunc=...) at /cvmfs/cms-ib.cern.ch/week1/slc6_amd64_gcc600/cms/cmssw/CMSSW_8_1_X_2016-04-18-1100/src/FWCore/Utilities/interface/ConvertException.h:20\r\n#14 main (argc=<optimized out>, argv=<optimized out>) at /mnt/build/davidlt/CMSSW_8_1_X_2016-04-18-1100/src/FWCore/ParameterSet/bin/edmWriteConfigs.cpp:286\r\n```\r\n\r\nQuick valgrind run:\r\n```\r\n==31968== Use of uninitialised value of size 8\r\n==31968==    at 0x40C7674: checkAndGetLabelsAndTypes (ParameterDescriptionNode.h:213)\r\n==31968==    by 0x40C7674: edm::ParameterSetDescription::addNode(std::unique_ptr<edm::ParameterDescriptionNode, std::default_delete<edm::ParameterDescriptionNode> >, bool, bool) (ParameterSetDescription.cc:92)\r\n==31968==    by 0x8705657: add<int, char [16]> (ParameterSetDescription.h:422)\r\n==31968==    by 0x8705657: addUntracked<int, char [16]> (ParameterSetDescription.h:95)\r\n==31968==    by 0x8705657: edmtest::ProducerWithPSetDesc::fillDescriptions(edm::ConfigurationDescriptions&) (ProducerWithPSetDesc.cc:459)\r\n==31968==    by 0x871ABBB: edm::ParameterSetDescriptionFiller<edmtest::ProducerWithPSetDesc>::fill(edm::ConfigurationDescriptions&) const (ParameterSetDescriptionFiller.h:55)\r\n==31968==    by 0x4059BF: operator() (edmWriteConfigs.cpp:90)\r\n==31968==    by 0x4059BF: wrap<(anonymous namespace)::writeCfisForPlugin(const string&, edm::ParameterSetDescriptionFillerPluginFactory*)::<lambda()> > (ConvertException.h:20)\r\n==31968==    by 0x4059BF: writeCfisForPlugin (edmWriteConfigs.cpp:91)\r\n==31968==    by 0x4059BF: __call<void, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, 0ul, 1ul> (functional:943)\r\n==31968==    by 0x4059BF: operator()<std::basic_string<char, std::char_traits<char>, std::allocator<char> >&> (functional:1002)\r\n==31968==    by 0x4059BF: for_each<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::vector<std::basic_string<char> > >, std::_Bind<void (*(std::_Placeholder<1>, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase*()>*))(const std::basic_string<cha\r\nr>&, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase*()>*)> > (stl_algo.h:3776)\r\n==31968==    by 0x4059BF: for_all<std::vector<std::basic_string<char> >, std::_Bind<void (*(std::_Placeholder<1>, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase*()>*))(const std::basic_string<char>&, edmplugin::PluginFactory<edm::ParameterSetDescription\r\nFillerBase*()>*)> > (Algorithms.h:17)\r\n==31968==    by 0x4059BF: operator() (edmWriteConfigs.cpp:285)\r\n==31968==    by 0x4059BF: wrap<main(int, char**)::<lambda()> > (ConvertException.h:20)\r\n==31968==    by 0x4059BF: main (edmWriteConfigs.cpp:286)\r\n==31968==  Uninitialised value was created by a stack allocation\r\n==31968==    at 0x8705544: edmtest::ProducerWithPSetDesc::fillDescriptions(edm::ConfigurationDescriptions&) (ProducerWithPSetDesc.cc:438)\r\n==31968==\r\n==31968== Invalid read of size 8\r\n==31968==    at 0x40C7674: checkAndGetLabelsAndTypes (ParameterDescriptionNode.h:213)\r\n==31968==    by 0x40C7674: edm::ParameterSetDescription::addNode(std::unique_ptr<edm::ParameterDescriptionNode, std::default_delete<edm::ParameterDescriptionNode> >, bool, bool) (ParameterSetDescription.cc:92)\r\n==31968==    by 0x8705657: add<int, char [16]> (ParameterSetDescription.h:422)\r\n==31968==    by 0x8705657: addUntracked<int, char [16]> (ParameterSetDescription.h:95)\r\n==31968==    by 0x8705657: edmtest::ProducerWithPSetDesc::fillDescriptions(edm::ConfigurationDescriptions&) (ProducerWithPSetDesc.cc:459)\r\n==31968==    by 0x871ABBB: edm::ParameterSetDescriptionFiller<edmtest::ProducerWithPSetDesc>::fill(edm::ConfigurationDescriptions&) const (ParameterSetDescriptionFiller.h:55)\r\n==31968==    by 0x4059BF: operator() (edmWriteConfigs.cpp:90)\r\n==31968==    by 0x4059BF: wrap<(anonymous namespace)::writeCfisForPlugin(const string&, edm::ParameterSetDescriptionFillerPluginFactory*)::<lambda()> > (ConvertException.h:20)\r\n==31968==    by 0x4059BF: writeCfisForPlugin (edmWriteConfigs.cpp:91)\r\n==31968==    by 0x4059BF: __call<void, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, 0ul, 1ul> (functional:943)\r\n==31968==    by 0x4059BF: operator()<std::basic_string<char, std::char_traits<char>, std::allocator<char> >&> (functional:1002)\r\n==31968==    by 0x4059BF: for_each<__gnu_cxx::__normal_iterator<std::basic_string<char>*, std::vector<std::basic_string<char> > >, std::_Bind<void (*(std::_Placeholder<1>, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase*()>*))(const std::basic_string<cha\r\nr>&, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase*()>*)> > (stl_algo.h:3776)\r\n==31968==    by 0x4059BF: for_all<std::vector<std::basic_string<char> >, std::_Bind<void (*(std::_Placeholder<1>, edmplugin::PluginFactory<edm::ParameterSetDescriptionFillerBase*()>*))(const std::basic_string<char>&, edmplugin::PluginFactory<edm::ParameterSetDescription\r\nFillerBase*()>*)> > (Algorithms.h:17)\r\n==31968==    by 0x4059BF: operator() (edmWriteConfigs.cpp:285)\r\n==31968==    by 0x4059BF: wrap<main(int, char**)::<lambda()> > (ConvertException.h:20)\r\n==31968==    by 0x4059BF: main (edmWriteConfigs.cpp:286)\r\n==31968==  Address 0x1ffdfeb5400000 is not stack'd, malloc'd or (recently) free'd\r\n```"},"comment":{"url":"https://api.github.com/repos/cms-sw/cmssw/issues/comments/211539737","html_url":"https://github.com/cms-sw/cmssw/issues/14127#issuecomment-211539737","issue_url":"https://api.github.com/repos/cms-sw/cmssw/issues/14127","id":211539737,"user":{"login":"cmsbuild","id":4170616,"avatar_url":"https://avatars.githubusercontent.com/u/4170616?v=3","gravatar_id":"","url":"https://api.github.com/users/cmsbuild","html_url":"https://github.com/cmsbuild","followers_url":"https://api.github.com/users/cmsbuild/followers","following_url":"https://api.github.com/users/cmsbuild/following{/other_user}","gists_url":"https://api.github.com/users/cmsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/cmsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmsbuild/subscriptions","organizations_url":"https://api.github.com/users/cmsbuild/orgs","repos_url":"https://api.github.com/users/cmsbuild/repos","events_url":"https://api.github.com/users/cmsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/cmsbuild/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T19:24:31Z","updated_at":"2016-04-18T19:24:31Z","body":"New categories assigned: core\n\n@Dr15Jones,@smuzaffar you have been requested to review this Pull request/Issue and eventually sign? Thanks"}}