At startup, seems to happen when rebroadcasting wallet's transactions, running 0.15 rc3: (enable-debug)
2017-09-14 13:17:09 POTENTIAL DEADLOCK DETECTED
2017-09-14 13:17:09 Previous lock order was:
2017-09-14 13:17:09 cs_main wallet/wallet.cpp:1655
2017-09-14 13:17:09 cs_wallet wallet/wallet.cpp:1655
2017-09-14 13:17:09 (1) mempool.cs wallet/wallet.cpp:1677
2017-09-14 13:17:09 cs_main wallet/wallet.cpp:1233
2017-09-14 13:17:09 (2) cs_wallet wallet/wallet.cpp:1233
2017-09-14 13:17:09 Current lock order is:
2017-09-14 13:17:09 cs_main wallet/wallet.cpp:1655
2017-09-14 13:17:09 (2) cs_wallet wallet/wallet.cpp:1655
2017-09-14 13:17:09 (1) mempool.cs wallet/wallet.cpp:1677
Assertion failed!
Program: C:\Program Files\Bitcoin-0.15.0\bin\bitcoind.exe
~Tried with #11126 but no improvement.~ (I screwed up the deployement so I have not tried actually, but the error seems to be different lock path)
I am unsure if the problem is in the lock detection (obviously no deadlock possible here), or in the actual code using an unsafe construct.