I'll start by saying that I don't know if this relates to https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24132 or not. To replicate, you'll need more than one library in Administration | Libraries. Setup a patron category with a Library Limitation, so that one library is excluded (by not selecting it). Create a patron with a common surname in your borrowers table and assign to that category. While the logged in branch is set to one of the libraries that are not excluded for that category you created above, search for patrons with the surname of your test patron. You should get results as expected. Change the logged in branch name to the excluded library. Conduct the same search. A processing message appears and just spins. I'm not sure whether the desired result should be to exclude the patron in question from the search results or whether it should display but with some restriction on the Patron Category.
Still valid in master? I don't recreate. If you do can you provide what you have in the console and eventually the Koha log if you got a 500?
Is this a duplicate of bug 34145?