Related Profiles block I have two profile types teacher and students. They both have a taxonomy field “State”.

Below each teacher’s profile I want to show students from his State.

I have added two relationships:

1) User: Profile
2) Field: State (which is a taxonomy term field). 

Then added a contextual filter Taxonomy term: Term ID. Under "When the filter value is NOT available" have selected default value "Taxonomy term id from url".

But it doesn't displays any matching profiles. I have done similar functionality for content entity type and it works. I guess the problem is due to profile entity type or am I missing something?

Can you please tell where I am going wrong? Thanks!
I think the problem lies in your contextual filter.  Presumably the teacher's profile page does not contain the taxonomy term ID in the URL, it usually doesn't unless you've done something tricky to put it there.

So: the view is looking at yoursite/user/[uid] and it thinks that the [uid] is the taxonomy term id (because you told it so), so doesn't find any matches and returns a nil result.

I'm not sure how to fix that, but hopefully this will help you troubleshoot.