Since I got the Marshmallow update on my Note 4, every month or so I will go to unlock my phone using the same pattern I have used for over a year and it tells me I am entering the incorrect pattern. My backup PIN also does not work, and the "unlock with Google" option does not accept my Google password. The first time this happened I thought for sure I was messing something up. Now, after some googling and having it happen a two more times, I believe this is a bug introduced with the Marshmallow update. Here is how I am coping (writing this down for my own sake and figured I would share):
(1) Remove the option to factory reset after 10 incorrect entries. Having this on is just asking for trouble with this kind of bug. The first two times I lost some important data stored locally on the phone.
(2) Under settings/security, make sure Find My Mobile/Remote Controls is set to on. This will allow you to go to findmymobile.samsung.com to unlock the phone (some help, but see note at bottom for limitations). While you're at it, make sure you have a Samsung account and the it is set up on the phone (Settings/Accounts?) and that the user name and password are ones you will remember.
(3) Under settings/system/safety assistance, select your wife, friend, dog as emergency contacts. This will allow you to call them from your locked phone and instruct them to go to websites, etc to help you unlock in case you are not near a PC.
(4) Install a 3rd party app like Where’s My Droid (that is the one I use). Configure it as needed, including setting it as a device administrator and setting up your attention words. One quirk is that you need to go and set you lock screen to Lock Automatically (settings>lock screen>lock automatically) for the remote lock to work fully.
(5) When the phone inevitably locks up, hope and pray you are near a PC. If not, see (3) above. If you are near a PC, go to https://commander.wheresmydroid.com/login.html (or google Where’s My Droid), log in and click on Lock My Device. Set a PIN, click Lock and your phone will be locked with your new PIN. Unlock it. Immediately go to Settings>Lock Screen and set up a new screen lock using the same pattern or pin as you have always used. Done (until it happens again).
Google Device Administrator is worthless for this issue as when you log on and go to lock your phone, you will be notified that the phone is already locked and thus your new PIN/password is not needed (thanks for nothing, Google).
Note also that Samsung findmymobile is only of limited help. If you are near a PC when you are locked out of your phone, you can go to findmymobile.samsung.com, log in and click on Lock My Device. Click on Lock, set a PIN and your phone will be locked with your new PIN. Unlock it and then you are at least back in your phone. But even though you've unlocked with your new PIN, the phone still has the old, apparently corrupted PIN/pattern and you can't change it (go ahead and try, but you can't).