-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sonar-scanner hangs with sonar-sxx 2.1 #2505
Comments
Hi @AndreyAlifanov, can you provide more input with debug info on from the LOG file please: In which step / sensor does it hang? Regards, |
Hi @guwirth, Part of log (full log is too long to publish - 58 MB)
Here scanner hangs In which step / sensor does it hang? In case you are waiting longer, does it finish? From your description I understand that the source code is the same? Regards |
I've excluded folder with boost from list to analyze. And scanner doesn't hang. |
Hi @AndreyAlifanov, Why do you need to scan third party code? https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Detect-and-fix-parsing-errors
I would recommend you to exclude all third party code sonar.exclusions=**/ThirdProjects/** By the way: Which Boost version are you using? Regards, |
Hi @guwirth, We don't need to scan code with sonar-cxx at all. We use this plugin to import results of PVS-Studio scan only. I don't understand, why we don't have problems with version 2.0.7? But have them with version 2.1.0. We use boost 1.81. Regards |
Hi @AndreyAlifanov,
There is a new SQ version, a new cxx plugin version, a new API version, a different scanner, a different Java version, … . Really difficult to say what the root cause is. Is it possible to use the old setup with SQ 8.9 and exchange the cxx plugin only (2.0.7 to 2.1.0)? If problem also occurs there, it’s then clear that’s an plugin issue. I can also try to test wit Boost 1.81, but that takes some time. One know issue is #2131. Regards, |
Is the snippet above showing the end of the log file (last entries)? Regards, |
Yes, this snippet shows the end of the log file. |
Hi @guwirth, as I wrote difference is only in version of plugin. I'm really sorry, if it's not clear in my first letter. Regards |
Hi @AndreyAlifanov, thanks, I just wanna be one the safe side. Looking to the log file
Something special in this file? You can also try to copy/paste the content of that file into As said above I need some more time to reproduce the setup. Regards, |
Hi @AndreyAlifanov, maybe easier for you is to delete all other files except Regards, |
Hi @guwirth, ok, I'll try it next week. Regards |
Hi @AndreyAlifanov, testing the file // (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
//------------------------------------------------------------------------------
// no include guards, this file is intended for multiple inclusions
#ifdef __WAVE__
// this file has been generated from the master.hpp file in the same directory
# pragma wave option(preserve: 0)
#endif
#if !BOOST_PP_IS_ITERATING
# ifndef BOOST_FT_DETAIL_CC_LOOP_MASTER_HPP_INCLUDED
# define BOOST_FT_DETAIL_CC_LOOP_MASTER_HPP_INCLUDED
# include <boost/function_types/config/cc_names.hpp>
# include <boost/preprocessor/cat.hpp>
# include <boost/preprocessor/seq/size.hpp>
# include <boost/preprocessor/seq/elem.hpp>
# include <boost/preprocessor/tuple/elem.hpp>
# include <boost/preprocessor/iteration/iterate.hpp>
# include <boost/preprocessor/facilities/expand.hpp>
# include <boost/preprocessor/arithmetic/inc.hpp>
# endif
# include <boost/function_types/detail/encoding/def.hpp>
# include <boost/function_types/detail/encoding/aliases_def.hpp>
# define BOOST_PP_FILENAME_1 \
<boost/function_types/detail/pp_cc_loop/master.hpp>
# define BOOST_PP_ITERATION_LIMITS \
(0,BOOST_PP_SEQ_SIZE(BOOST_FT_CC_NAMES_SEQ)-1)
# include BOOST_PP_ITERATE()
# if !defined(BOOST_FT_config_valid) && BOOST_FT_CC_PREPROCESSING
# define BOOST_FT_cc_id 1
# define BOOST_FT_cc_name implicit_cc
# define BOOST_FT_cc BOOST_PP_EMPTY
# define BOOST_FT_cond callable_builtin
# include BOOST_FT_cc_file
# undef BOOST_FT_cond
# undef BOOST_FT_cc_name
# undef BOOST_FT_cc
# undef BOOST_FT_cc_id
# elif !defined(BOOST_FT_config_valid) // and generating preprocessed file
BOOST_PP_EXPAND(#) ifndef BOOST_FT_config_valid
BOOST_PP_EXPAND(#) define BOOST_FT_cc_id 1
BOOST_PP_EXPAND(#) define BOOST_FT_cc_name implicit_cc
BOOST_PP_EXPAND(#) define BOOST_FT_cc BOOST_PP_EMPTY
BOOST_PP_EXPAND(#) define BOOST_FT_cond callable_builtin
#define _()
BOOST_PP_EXPAND(#) include BOOST_FT_cc_file
#undef _
BOOST_PP_EXPAND(#) undef BOOST_FT_cond
BOOST_PP_EXPAND(#) undef BOOST_FT_cc_name
BOOST_PP_EXPAND(#) undef BOOST_FT_cc
BOOST_PP_EXPAND(#) undef BOOST_FT_cc_id
BOOST_PP_EXPAND(#) else
BOOST_PP_EXPAND(#) undef BOOST_FT_config_valid
BOOST_PP_EXPAND(#) endif
# else
# undef BOOST_FT_config_valid
# endif
# include <boost/function_types/detail/encoding/aliases_undef.hpp>
# include <boost/function_types/detail/encoding/undef.hpp>
#elif BOOST_FT_CC_PREPROCESSING
# define BOOST_FT_cc_id BOOST_PP_INC(BOOST_PP_FRAME_ITERATION(1))
# define BOOST_FT_cc_inf \
BOOST_PP_SEQ_ELEM(BOOST_PP_FRAME_ITERATION(1),BOOST_FT_CC_NAMES_SEQ)
# define BOOST_FT_cc_pp_name BOOST_PP_TUPLE_ELEM(3,0,BOOST_FT_cc_inf)
# define BOOST_FT_cc_name BOOST_PP_TUPLE_ELEM(3,1,BOOST_FT_cc_inf)
# define BOOST_FT_cc BOOST_PP_TUPLE_ELEM(3,2,BOOST_FT_cc_inf)
# define BOOST_FT_cond BOOST_PP_CAT(BOOST_FT_CC_,BOOST_FT_cc_pp_name)
# if BOOST_FT_cond
# define BOOST_FT_config_valid 1
# include BOOST_FT_cc_file
# endif
# undef BOOST_FT_cond
# undef BOOST_FT_cc_pp_name
# undef BOOST_FT_cc_name
# undef BOOST_FT_cc
# undef BOOST_FT_cc_id
# undef BOOST_FT_cc_inf
#else // if generating preprocessed file
BOOST_PP_EXPAND(#) define BOOST_FT_cc_id BOOST_PP_INC(BOOST_PP_ITERATION())
# define BOOST_FT_cc_inf \
BOOST_PP_SEQ_ELEM(BOOST_PP_ITERATION(),BOOST_FT_CC_NAMES_SEQ)
# define BOOST_FT_cc_pp_name BOOST_PP_TUPLE_ELEM(3,0,BOOST_FT_cc_inf)
# define BOOST_FT_CC_DEF(name,index) \
name BOOST_PP_TUPLE_ELEM(3,index,BOOST_FT_cc_inf)
BOOST_PP_EXPAND(#) define BOOST_FT_CC_DEF(BOOST_FT_cc_name,1)
BOOST_PP_EXPAND(#) define BOOST_FT_CC_DEF(BOOST_FT_cc,2)
# undef BOOST_FT_CC_DEF
# define BOOST_FT_cc_cond_v BOOST_PP_CAT(BOOST_FT_CC_,BOOST_FT_cc_pp_name)
BOOST_PP_EXPAND(#) define BOOST_FT_cond BOOST_FT_cc_cond_v
# undef BOOST_FT_cc_cond_v
# undef BOOST_FT_cc_pp_name
# undef BOOST_FT_cc_inf
BOOST_PP_EXPAND(#) if BOOST_FT_cond
BOOST_PP_EXPAND(#) define BOOST_FT_config_valid 1
#define _()
BOOST_PP_EXPAND(#) include BOOST_FT_cc_file
#undef _
BOOST_PP_EXPAND(#) endif
BOOST_PP_EXPAND(#) undef BOOST_FT_cond
BOOST_PP_EXPAND(#) undef BOOST_FT_cc_name
BOOST_PP_EXPAND(#) undef BOOST_FT_cc
BOOST_PP_EXPAND(#) undef BOOST_FT_cc_id
#endif Regards, |
Hi @guwirth, I've deleted all the files from boost except this one. Regards |
Hi @AndreyAlifanov, I reduced the file This requires a deeper investigation. BOOST_PP_EXPAND(#) ifndef BOOST_FT_config_valid
BOOST_PP_EXPAND(#) define BOOST_FT_cc_id 1
BOOST_PP_EXPAND(#) define BOOST_FT_cc_name implicit_cc
BOOST_PP_EXPAND(#) define BOOST_FT_cc BOOST_PP_EMPTY
BOOST_PP_EXPAND(#) define BOOST_FT_cond callable_builtin
#define _()
BOOST_PP_EXPAND(#) include BOOST_FT_cc_file
#undef _
BOOST_PP_EXPAND(#) undef BOOST_FT_cond
BOOST_PP_EXPAND(#) undef BOOST_FT_cc_name
BOOST_PP_EXPAND(#) undef BOOST_FT_cc
BOOST_PP_EXPAND(#) undef BOOST_FT_cc_id
BOOST_PP_EXPAND(#) else
BOOST_PP_EXPAND(#) undef BOOST_FT_config_valid
BOOST_PP_EXPAND(#) endif Regards, |
Hi @AndreyAlifanov, can you try with #2518 if this helps? |
@AndreyAlifanov thx for testing. |
verified it with cxx plugin 2.0.7, same behaviour => also slow |
slow:
fast:
fast:
All cases result in syntax errors if |
After update sonar-cxx from version 2.0 to 2.1 our scan hangs after 10-12 minutes of work.
I tried it with SonarQube 8.9LTS and 9.9LTS, scanner of version 4.8.0
It works with sonar.cxx.squid.disabled=true, but it's not good decision. Because we need information for code coverage, code duplications, code lines and so on.
PS With version 2.0 of sonar-cxx process works well. But this version doesn't work with SonarQube 9.9LTS, only with 8.9. :-(
The text was updated successfully, but these errors were encountered: