-
Notifications
You must be signed in to change notification settings - Fork 339
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
MPD crash (boost assertion failure) #691
Comments
It looks like an assertion somewhere deep inside Boost. I don't see I only recently started using the input cache feature. I have no indication that is the cause though. |
Not sure if the Boost version matters, but here it is:
|
At this point I don't even know how to reproduce this. But this failed assertion suggests there is a bug somewhere, and now we have an issue to talk about it. |
The bstree is used by the intrusive |
Very wild guess: Line 53 in b449627
(Meaning, I'm looking at the cache on a hunch, and this comment looks interesting. I don't know what is actually going on here.) |
Again, guessing, throwing random pieces of information together. The assertion talks about I'm not sure if I'm looking at the right documentation here: https://www.boost.org/doc/libs/1_50_0/doc/html/boost/intrusive/rbtree.html#id1197749-bb Anyway, I see:
And in the cache manager I see |
And in between insert_check and insert_commit I see EvictOldestUnused which maybe removes values? |
So I previously posted the wrong documentation link (intrusive/bstree instead of intrusive/set) but I see the same requirement in intrusive/set: https://www.boost.org/doc/libs/1_70_0/doc/html/boost/intrusive/set.html#idm45307364153120-bb
|
@MaxKellermann this all makes me suspect #691 (comment) is the problem. |
I think you're right. |
Then this would be a fix? diff --git a/src/input/cache/Manager.cxx b/src/input/cache/Manager.cxx
index 3ff51d88e..38e661064 100644
--- a/src/input/cache/Manager.cxx
+++ b/src/input/cache/Manager.cxx
@@ -112,7 +112,7 @@ InputCacheManager::Get(const char *uri, bool create)
while (total_size > max_total_size && EvictOldestUnused()) {}
auto *item = new InputCacheItem(std::move(is));
- items_by_uri.insert_commit(*item, hint);
+ items_by_uri.insert(*item);
items_by_time.push_back(*item);
return InputCacheLease(*item); |
Or, move the |
Bug report
Describe the bug
Crash while listening to music.
Expected Behavior
Not crashing
Actual Behavior
A crash
Version
Log
The text was updated successfully, but these errors were encountered: