This call came up during an event this weekend, and the staff was divided on the proper solution.
Player A casts
Path to Exile targeting one of N's creatures, holds priority, then casts
Shadow of Doubt. Can player N shuffle their library?
Searching the library is an impossible action due to Shadow of Doubt. However, the staff was divided on whether or not it is legal to say yes to the may part of Path to Exile, fail to search due to it impossible, then completing as many actions as possible (shuffling the library).