Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
2f52a37e
Commit
2f52a37e
authored
4 years ago
by
Andrey Kleshchev
Browse files
Options
Downloads
Patches
Plain Diff
SL-13811 Crash on coroprocedure
parent
a8b5ca77
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llmessage/llcoproceduremanager.cpp
+8
-13
8 additions, 13 deletions
indra/llmessage/llcoproceduremanager.cpp
with
8 additions
and
13 deletions
indra/llmessage/llcoproceduremanager.cpp
+
8
−
13
View file @
2f52a37e
...
...
@@ -77,12 +77,12 @@ class LLCoprocedurePool: private boost::noncopyable
///
inline
size_t
countActive
()
const
{
return
mActiveCoprocs
.
size
()
;
return
mActiveCoprocs
Count
;
}
/// Returns the total number of coprocedures either queued or in active processing.
///
inline
size_t
count
()
const
inline
S32
count
()
const
{
return
countPending
()
+
countActive
();
}
...
...
@@ -113,12 +113,10 @@ class LLCoprocedurePool: private boost::noncopyable
// because the consuming coroutine might outlive this LLCoprocedurePool
// instance.
typedef
boost
::
shared_ptr
<
CoprocQueue_t
>
CoprocQueuePtr
;
typedef
std
::
map
<
LLUUID
,
LLCoreHttpUtil
::
HttpCoroutineAdapter
::
ptr_t
>
ActiveCoproc_t
;
std
::
string
mPoolName
;
size_t
mPoolSize
,
mPending
{
0
}
;
size_t
mPoolSize
,
mActiveCoprocsCount
,
mPending
;
CoprocQueuePtr
mPendingCoprocs
;
ActiveCoproc_t
mActiveCoprocs
;
LLTempBoundListener
mStatusListener
;
typedef
std
::
map
<
std
::
string
,
LLCoreHttpUtil
::
HttpCoroutineAdapter
::
ptr_t
>
CoroAdapterMap_t
;
...
...
@@ -281,6 +279,8 @@ void LLCoprocedureManager::close(const std::string &pool)
LLCoprocedurePool
::
LLCoprocedurePool
(
const
std
::
string
&
poolName
,
size_t
size
)
:
mPoolName
(
poolName
),
mPoolSize
(
size
),
mActiveCoprocsCount
(
0
),
mPending
(
0
),
mPendingCoprocs
(
boost
::
make_shared
<
CoprocQueue_t
>
(
DEFAULT_QUEUE_SIZE
)),
mHTTPPolicy
(
LLCore
::
HttpRequest
::
DEFAULT_POLICY_ID
),
mCoroMapping
()
...
...
@@ -406,8 +406,7 @@ void LLCoprocedurePool::coprocedureInvokerCoro(
}
// we actually popped an item
--
mPending
;
ActiveCoproc_t
::
iterator
itActive
=
mActiveCoprocs
.
insert
(
ActiveCoproc_t
::
value_type
(
coproc
->
mId
,
httpAdapter
)).
first
;
mActiveCoprocsCount
++
;
LL_DEBUGS
(
"CoProcMgr"
)
<<
"Dequeued and invoking coprocedure("
<<
coproc
->
mName
<<
") with id="
<<
coproc
->
mId
.
asString
()
<<
" in pool
\"
"
<<
mPoolName
<<
"
\"
("
<<
mPending
<<
" left)"
<<
LL_ENDL
;
...
...
@@ -417,10 +416,6 @@ void LLCoprocedurePool::coprocedureInvokerCoro(
}
catch
(
const
LLCoros
::
Stop
&
)
{
LL_INFOS
(
"CoProcMgr"
)
<<
"Viewer is shutting Down. Stopping coprocedure('"
<<
coproc
->
mName
<<
"', id="
<<
coproc
->
mId
.
asString
()
<<
") in pool '"
<<
mPoolName
<<
"'"
<<
LL_ENDL
;
mActiveCoprocs
.
erase
(
itActive
);
throw
;
// let toplevel handle this as LLContinueError
}
catch
(...)
...
...
@@ -429,13 +424,13 @@ void LLCoprocedurePool::coprocedureInvokerCoro(
<<
"', id="
<<
coproc
->
mId
.
asString
()
<<
") in pool '"
<<
mPoolName
<<
"'"
));
// must NOT omit this or we deplete the pool
mActiveCoprocs
.
erase
(
itActive
)
;
mActiveCoprocs
Count
--
;
continue
;
}
LL_DEBUGS
(
"CoProcMgr"
)
<<
"Finished coprocedure("
<<
coproc
->
mName
<<
")"
<<
" in pool
\"
"
<<
mPoolName
<<
"
\"
"
<<
LL_ENDL
;
mActiveCoprocs
.
erase
(
itActive
)
;
mActiveCoprocs
Count
--
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment