You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the point that all jobs have been submitted (i.e. jobs_processed is equal to ctx->NumJobsSubmitted()) but the jobs have not yet completed (because uploading is still in progress), this loop becomes equivalent to:
while (1) {
// do nothing
}
i.e. a CPU spinloop. This behaviour can be easily observed by publishing anything via a gateway: the publisher will hit 100% CPU usage within cvmfs_swissknife sync, and attaching gdb shows that one thread is just spinning inside SessionContext::UploadLoop().
The text was updated successfully, but these errors were encountered:
The existing code in
SessionContext::UploadLoop()
:cvmfs/cvmfs/session_context.cc
Lines 414 to 429 in 8fc9e82
uses a simple (atomic) integer flag to indicate that the loop should terminate:
cvmfs/cvmfs/session_context.cc
Lines 434 to 436 in 8fc9e82
At the point that all jobs have been submitted (i.e.
jobs_processed
is equal toctx->NumJobsSubmitted()
) but the jobs have not yet completed (because uploading is still in progress), this loop becomes equivalent to:i.e. a CPU spinloop. This behaviour can be easily observed by publishing anything via a gateway: the publisher will hit 100% CPU usage within
cvmfs_swissknife sync
, and attachinggdb
shows that one thread is just spinning insideSessionContext::UploadLoop()
.The text was updated successfully, but these errors were encountered: