Skip to content

CCDBDownloader: More error checks - #11489

Merged
davidrohr merged 7 commits into
AliceO2Group:devfrom
TrifleMichael:LibuvErrorChecks
Jun 19, 2023
Merged

CCDBDownloader: More error checks#11489
davidrohr merged 7 commits into
AliceO2Group:devfrom
TrifleMichael:LibuvErrorChecks

Conversation

@TrifleMichael

Copy link
Copy Markdown
Contributor

Added result check for all libuv functions that return an error code. Libuv functions that lack this check are the ones returning void.

Even though almost all libuv function errors result in segmentation faults, this change may help with debugging the downloader in the future.

@TrifleMichael TrifleMichael changed the title CCDBDownloader: Libuv error checks CCDBDownloader: More error checks Jun 15, 2023
@TrifleMichael

Copy link
Copy Markdown
Contributor Author

I've added 4 types of error checks: Libuv, CurlMulti, CurlEasy and Sockets.

There is an additional check for whether the uvloop closes prematurely. That check uses the mIsClosing variable.

Because sockets are opened in only one line, and closed in two lines I didn't create a seperate function for testing them. Additionaly not creating that function makes it easier to differentiate whether closing or opening failed.

I've tested to make sure that no errors are logged on the current version. If an error causes a segmentation fault the thread will crash without calling LOG(error).

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI for ad5f7ee at 2023-06-15 18:40:

## sw/BUILD/O2-latest/log
/sw/SOURCES/O2/11489-slc8_x86-64/0/CCDB/src/CCDBDownloader.cxx:286:87: error: 'class o2::ccdb::CCDBDownloader' has no member named 'mSocketTimeoutMS'; did you mean 'mSocketTimerMap'?
ninja: build stopped: subcommand failed.

Full log here.

@davidrohr

Copy link
Copy Markdown
Collaborator

Could you rebase without merge commits, and squash the fixup commits?

github-actions Bot pushed a commit that referenced this pull request Jun 18, 2023
@davidrohr
davidrohr merged commit 91ba631 into AliceO2Group:dev Jun 19, 2023
mwinn2 pushed a commit to mwinn2/AliceO2 that referenced this pull request Aug 24, 2023
* CCDBDownloader: Libuv error checks

* Formatting correction

* Added check for premature uvloop closure

* Added curl checks and socket open/close checks

* After merge fix

* Removing redundant download
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