-
Notifications
You must be signed in to change notification settings - Fork 428
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
Muc light loop fix #1147
Muc light loop fix #1147
Conversation
0d5d0f4
to
b0d543a
Compare
@@ -16,6 +16,7 @@ | |||
{exml, ".*", {git, "git://github.com/esl/exml.git", "2.4.0"}}, | |||
{lager, ".*", {git, "git://github.com/basho/lager.git", "3.2.4"}}, | |||
{lager_syslog, ".*", {git, "git://github.com/basho/lager_syslog.git", "3.0.3"}}, | |||
{ranch, ".*", {git, "https://github.com/ninenines/ranch.git", "1.3.0"}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently needs a rebase. Got polluted with ranch update PR. :)
[SessionRecPid] = rpc(ets, tab2list, [session]), | ||
{session, {_, Pid}, _, _, _, _} = SessionRecPid, | ||
%% maybe throws exception | ||
check_process_memory_growing(Pid, 0, 2), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be called assert_process_memory_not_growing
, because right now it looks like the test expects the process to grow.
b0d543a
to
3fbbca2
Compare
Even though there are no conflicts, |
Agree, we used to do rebase for small changes. |
tests measures memory consumed by c2s process of user, who sent wrongly prepared affiliation change stanza. If memory grows, test fails
the loop is triggered when someone sends special affiliation change stanza. When someone tries to invite a user to a room and the user is wrongly named in the invitation stanza (muclight.localhost domain instead of localhost), the infinite loop of ejabberd_router:route/3 fun will be called.
3fbbca2
to
3fc33e0
Compare
sorry guys, I had broken master locally so rebasing wasn't working correctly. Anyway should be fine now |
It is, thanks. |
one thing needs refactoring; having in mind that sessions can be kept in the redis, |
That's why we have so many jobs on travis-ci. |
When can we expect a fix for Redis job? :) |
Host = lbin(escalus_users:get_host(Config, alice)), | ||
Resource = <<"res1">>, | ||
SessionRecPid = rpc(ejabberd_sm, get_session, [AUsername, Host, Resource]), | ||
{{AUsername, Host, Resource},{_, Pid}, _, _} = SessionRecPid, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Elvis:
Missing space right "," on line 737
now its more generic and should work with other session backends
c6b3321
to
2d93eb7
Compare
Thanks! |
This PR fixes infinite route loop triggered by muc_light.
Essentially, when someone tried to invite a user who contained domain reserved for the muclight service in his JID (by default its "muclight.HOST"), there was triggered infinite loop of function
ejabberd_router:route/3
. This was happening because muc_light processing didn't ignore error messageProposed changes include:
mod_muc_light