-
Notifications
You must be signed in to change notification settings - Fork 265
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
Possible crash due to "invalid regular expression for idPattern" #2769
Comments
It seems there are three cases in which our code can declare a regex invalid: https://github.com/telefonicaid/fiware-orion/search?l=C%2B%2B&q=%22Invalid+regex+for+entity+id+pattern%22&type=Code&utf8=%E2%9C%93. They should be analyzed to check if everything is ok with them. Note that there are .test that could cover some of them (see cases/2257_crash_with_invalid_subscription_when_matching/crash_with_invalid_subscription_when_matching.test). However, maybe there are covering "basic" cases and not the pre-conditions that lead to the bug. In fact, that pre-conditions could be even hardly reproductible using .test so first step is to think about possible pre-conditions that may cause the logic to fail/crash just looking the code. |
Actually, regcomp() is called in 10 different places:
I just don't think it is worth the effort to check these calls for crashes. Looking at one of the usages of regcomp (MongoGlobal.cpp):
If I do not know, but that might be dangerous, depending on how regcomp failed. Need to look into this, in all 10 places, to see what is done about |
As far as I understand by our skype discussion, of the 10 places, only 1 (the one which code if cited above) has a missplaced |
We took a look at the source code of |
After the fix on PR #2813 this issue goes back to Quarantine milestone to evaluate how it goes. |
Similar problem seen again with 1.7.0. Restart at orion.lab.fiware.org:
Version data:
Log trace showing transactions summary counter restart (the one hour offset at log traces is normal):
Thus, moving out Quarentine milestone. |
Another case:
Log trace:
Version:
|
Another case:
Log trace:
Same version (1.7.0). |
From orion.lab recent report:
Looking into contextBroker.log, we can see the moment in which the restart takes place (transactions number in the summary is "reseted" as a consecuence):
Maybe the cause is related with this:
"invalid regular expression for idPattern"
Version info:
A similar problem happened time ago:
that time it was with 1.5.0
The text was updated successfully, but these errors were encountered: