Possible reasons:
You tried to assign a role to itself.
You tried to assign role definitions cyclically.
Check for typing errors. If you do not find any, check whether the roles that would result in the cycle can be combined into one role.