krb5 ccache of MEMORY type
Greg Hudson
ghudson at mit.edu
Fri Jun 29 15:54:15 EDT 2018
On 06/29/2018 03:46 PM, Greg Hudson wrote:
>> Everything works fine while krb5 FILE type of ccache is in use. ow I want to improve performance and switch to MEMORY type of ccache. And I start getting my app crashed intermittently.
>
> I'm not currently aware of a memory ccache bug which would account for this.
Of course, as soon as I sent this I thought to search the bug database
and found this (my own bug report, which I had forgotten about):
http://krbdev.mit.edu/rt/Ticket/Display.html?id=8202
which is "memory ccache cursors are invalidated by initialize". Since
using a ccache to get tickets implicitly iterates over it, that bug
would account for the crashes you are seeing. Destroying a memory
ccache also breaks other threads iterating over it.
You can possibly work around this bug by generating a new memory ccache
(with krb5_cc_new_unique()) each time you want to initialize one, and
keeping track of the current ccache name or handle yourself. You would
have to be careful about destroying old ones when another thread might
still be using them, so this might be more trouble than it's worth.
More information about the Kerberos
mailing list