Skip to content

Conversation

@justonedev1
Copy link
Collaborator

The crash was caused by missing exception handling in CcdbDatabase.cxx when we receive something else than expected json as boost::property_tree::read_json throws an exception in case it fails.

This fix was tested on staging. I also tried to create some unit test that catches this, but I wasn't really succesfull is it is not that easy to make ccdb able to initiate but make unresponsive automatically, which is why it took so long to create PR.

boost::property_tree::read_json(listingAsStringStream, listingAsTree);
try {
boost::property_tree::read_json(listingAsStringStream, listingAsTree);
} catch (const boost::property_tree::json_parser::json_parser_error&) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add an error with support level, indicating that the listing did not have correct JSON format due to possibly malformed or missing reply from QCDB? The same comment for the other catch in the PR.

@justonedev1 justonedev1 requested a review from knopers8 February 26, 2025 08:10
@knopers8 knopers8 enabled auto-merge (squash) February 26, 2025 08:21
@knopers8 knopers8 merged commit 28933e2 into master Feb 26, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants