Failing scan attempts AXM4Q-CbzYgjI3PWd2x_

the automatic scans started failing on github around june 11. what is causing this error below?

The last analysis has failed. If it keeps on failing after several attempts, please contact us on Community forum and provide the following failing analysis ID: “AXM4Q-CbzYgjI3PWd2x_”.

Hi @jamierohr

Seems that there were a parsing error on some of your php files, i’m pinging my colleagues to help you on his, stay tuned !

Thanks.
Mickaël

were you able to find any errors that may have caused the scans to stop working?

i tried switching branches to do another analysis and i got another error below different from the first one

The last analysis has failed. If it keeps on failing after several attempts, please contact us on Community forum and provide the following failing analysis ID: “AXOATUCMfmio-Jg89E_p”.

It looks like the analysis AXOATUCMfmio-Jg89E_p failed with the same error. We still don’t have a good understanding of the problem, and without the source code (or a minimal reproducer), this is very difficult.

I noticed that we used to have this error a few dozen times per week until recently. We haven’t seen this since July 31st. It’s possible that recent versions of analyzers have fixed the issue.

Can you please try to analyze the same code again and see what happens?

we found this link today https://sonarcloud.io/dashboard?id=xxx&pullRequest=99
it appears that it is trying to analyze a branch that we have deleted.

is there a way to stop a scan so that we can manually try to restart it

It’s not possible to abort an ongoing analysis, but I’m not sure how that’s important.

To start a new analysis, you could push a new commit, or close/reopen a PR on GitHub.

Hi @janos,

We’ve pushed hundreds of commits thus far, and it’s still stuck on processing one job on a branch that’s over a hundred pull requests old.

I resurrected the old branch it’s trying to use in an attempt to give that specific one a commit as you suggested. So far nothing has changed.

Do you need any other information that would allow someone to assist us further?

Thanks.

What makes you think it’s stuck? (At our side, when analysis takes more than about 90 minutes, we kill the process. Nothing can be stuck longer than that.)

After a new analysis, if it failed, it should give you a reason or the analysis id, either in the red status bar, or on the Background Tasks page. So what do you see?

@janos when using the dropdown that shows the branches, #99 has a progress indicator that’s been spinning for many days:

Screen Shot 2020-08-10 at 1.45.47 PM

I’ll reach out to the account admin to see if any errors are showing.

That’s strange. But if it’s an old analysis, it doesn’t matter. To see the behavior (improvements) of the new releases of analyzers, we need a fresh new analysis.

Btw, no need to analyze the exact same code, if you get such errors on recent pull requests (in August). Any of them will be suitable for us to investigate. Any analysis that fails without a clear explanation, only an analysis id to track.

Right? Our admin just removed that PR from Sonar Cloud.

When I use the PR dropdown, I noticed it polls the status of them all so I monitored the JSON from the server.

It looks like all PR’s have failed with reason: scanner_error

Here’s one of the most recent analysis ID’s: AXPZJjGK_bWkjcp1IrSf

Thanks, I see the behavior has changed. Unfortunately the cause of the failure is still not clear at all. We will investigate and get back to you.

Hey @caseyw,

We have identified the potential source of the problem in our PHP analyzer. The fix will be released with a new version in around 2 weeks.

In the meantime you can try deactivating the rule S1186 “Methods should not be empty” in the PHP quality profile you are using.

Best,
Karim.

1 Like

Thanks @Karim_El_Ouerghemmi, we’ll give it a shot.

Hey guys,
I have the same issue with error .

Caused by: java.lang.StackOverflowError
at java.util.regex.Pattern$Branch.match(Pattern.java:4604)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
at java.util.regex.Pattern$LazyLoop.match(Pattern.java:4847)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)

Do you know in which sonar version this PHP Scanner issue is fixed?

Thanks

Hey Antoine,

The issue in this thread was fixed with the release of version 3.9 of the PHP analyzer.

If you are already scanning with the latest version and the issue still appears, please create a new thread so that we can investigate it.

Best,
Karim.

Okay thanks, I’ll ask which version is used