Yes, I found the processes sending the messages, but the methodology we used is not fit for production, unless you don’t mind killing a machine with all the logging or slowing it down considerably.
There are many ways of finding out which process is receiving an unhandled message, but there is no straight way. I have compiled a list of all the relevant posts I created regarding this topic for your convenience, should you ever venture this far into message passing:
- Show all messages in process mailbox assert_receive
- Find out how many unhandled messages a process received - #3 by Fl4m3Ph03n1x
- How to detect wich process is getting unexpected messages? - #7 by sasajuric
- Tracing all calls to handle_info in all processes using recon_trace - #9 by Fl4m3Ph03n1x
- Error when using function in recon_trace.calls
- How to use recon_trace.calls properly?
- Can't get recon_trace to work with anon function - #4 by NobbZ
- Is it possible to use Rexbug to trace messages send/received by processes? - #8 by Fl4m3Ph03n1x
Still, if you follow the recommendations for Task.async and Task.await, you will (hopefully) never need this information, unless you are using a 3rd party library that doesn’t follow the conventions (as was our case).