krb5 ccache of MEMORY type

Roman Semenov rasemenov at yahoo.com
Fri Jun 29 23:11:39 EDT 2018


Hello Greg,
Thank you so much for the response and the link to the existing bug 
report. Now it makes sense.
Thanks again,
Roman

On 06/29/2018 12:54 PM, Greg Hudson wrote:
> 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