Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LockRecursionException in ThreadSafeList when disconnecting #25

Open
ianrandell-sh opened this issue Jun 2, 2021 · 5 comments
Open

Comments

@ianrandell-sh
Copy link

Hi there - first of all thanks for these brilliant libraries.

I'm getting the following exception when disconnecting as part of handling a connection error (a 403:denied_by_security_policy:create_denied in my case since the channel doesn't exist):

System.Threading.LockRecursionException

"Recursive read lock acquisitions not allowed in this mode"

at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout)
at System.Collections.Generic.ThreadSafeList`1.<GetEnumerator>d__18.MoveNext() in C:\projects\cometd-netcore\src\CometD.NetCore\Internal\ThreadSafeList.cs:line 201
at CometD.NetCore.Common.AbstractClientSession.ExtendSend(IMutableMessage message) in C:\projects\cometd-netcore\src\CometD.NetCore\Common\AbstractClientSession.cs:line 214
at CometD.NetCore.Client.BayeuxClient.BayeuxClientState.Send(ITransportListener listener, IList`1 messages, Int32 clientTimeout) in C:\projects\cometd-netcore\src\CometD.NetCore\Client\BayeuxClient.cs:line 1003
at CometD.NetCore.Client.BayeuxClient.BayeuxClientState.Send(ITransportListener listener, IMutableMessage message, Int32 clientTimeout) in C:\projects\cometd-netcore\src\CometD.NetCore\Client\BayeuxClient.cs:line 987
at CometD.NetCore.Client.BayeuxClient.DisconnectingState.Execute() in C:\projects\cometd-netcore\src\CometD.NetCore\Client\BayeuxClient.cs:line 1245
at CometD.NetCore.Client.BayeuxClient.UpdateBayeuxClientState(BayeuxClientStateUpdater_createDelegate create, BayeuxClientStateUpdater_postCreateDelegate postCreate) in C:\projects\cometd-netcore\src\CometD.NetCore\Client\BayeuxClient.cs:line 727
at CometD.NetCore.Client.BayeuxClient.UpdateBayeuxClientState(BayeuxClientStateUpdater_createDelegate create) in C:\projects\cometd-netcore\src\CometD.NetCore\Client\BayeuxClient.cs:line 690
at CometD.NetCore.Client.BayeuxClient.Disconnect() in C:\projects\cometd-netcore\src\CometD.NetCore\Client\BayeuxClient.cs:line 143

What I'm using:

  • a slightly modified version of ResilientStreamingClient from your CometD.NetCore.Salesforce repo
  • version 2.0.6 of this nuget (v2.0.7 looks like no code changes)
  • .net core 3.1 on Windows 10

My Disconnect() method in my ResilientStreamingClient is unchanged from your repo version.

Any help appreciated. I'll continue troubleshooting

@feresg
Copy link

feresg commented Sep 17, 2021

Hello @ianrandell-sh , did you find a fix for the issue above?

@ianrandell-sh
Copy link
Author

Hello @ianrandell-sh , did you find a fix for the issue above?

Hmm.. this was a while ago but from memory I rewrote some of the code myself. Sorry I cant be more specific. I don't remember there being a very simple fix.

@nud-teeraworamongkol
Copy link

Hello @feresg , have you found a fix about this issue?

@toojannarong
Copy link

toojannarong commented Jun 16, 2022

@mrrobdlon
Copy link

The problem can be fixed by enabling the READ permission in Salesforce, on the user profile name for which you want to assign permissions.

https://docs.informatica.com/integration-cloud/cloud-application-integration/current-version/salesforce-connector-guide/introduction-to-salesforce-connector/administration-of-salesforce-connector/assigning-object-permissions-to-the-salesforce-user-for-the-cust.html

Thanks @toojannarong that solved the problem for me but I think the behaviour in this scenario is less than ideal, definitely room to improve how it's handled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants