You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the Oracle.ManagedDataAccess.Core package version 23.6.1 (though this problem seems to be present in older versions as well) and trying to connect to a v.19c database with an old time zones file (v.14) from a system set to the UTC time zone. The first attempt to connect always fails with a "connection timeout", while subsequent attempts succeed.
It fails at first because the "Etc/UTC" zone isn't available in the database. Now, I have the UseHourOffsetForUnsupportedTimezone option enabled, so it then retries using the hour offset, but that fails due to a NullReferenceException inside the package code, and then the attempt to get a connection from the pool eventually times out.
Of course, we could try to update the database's time zone file, but this seems to be a potential bug in the package, so I'd like to discuss this first.
Here are some relevant parts from the trace log:
2024-12-18 19:08:23.947031 TID:12 (PRI) (TTC) (CID1) timezone_file version client: 43, server : 14
2024-12-18 19:08:23.947482 TID:12 (PRI) (SVC) (EXT) (CID1) OracleConnectionImpl.DoDataTypeNegotiation()
2024-12-18 19:08:23.954282 TID:12 (PRI) (SVC) (ENT) (CID1) OracleConnectionImpl.DoAuthentication()
2024-12-18 19:08:23.958324 TID:12 (PRI) (SVC) (ENT) (CID1) OracleGlobalizationImpl.GetLocaleSpecificNLSValues() Connecting with session time zone as :Etc/UTC
2024-12-18 19:08:23.958847 TID:12 (PRI) (TTC) (ENT) (CID1) TTCAuthenticate.WriteOSessKeyMessage()
2024-12-18 19:08:24.002061 TID:12 (PRI) (SVC) (ERR) (CID1) OracleException.HandleError() from OracleConnectionImpl.DoAuthentication()(txnid=n/a) Oracle.ManagedDataAccess.Client.OracleException (0x80004005): ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found
https://docs.oracle.com/error-help/db/ora-00604/
at OracleInternal.ServiceObjects.OracleConnectionImpl.CheckForAnyErrorFromDB(TTCError ttcOER, Object traceObj)
at OracleInternal.ServiceObjects.OracleConnectionImpl.DoAuthentication(OracleConnection connRefForCriteria, String userId, OracleOpaqueString opaquePassw, String proxyUserId, OracleOpaqueString opaqueProxyPassw, OracleOpaqueString opaqueNewPassw, Boolean bDoExternalAuth, OracleAccessToken accessToken, Boolean bOpenEndUserSession, Boolean bAsync, Boolean bUsingFastConnect)
2024-12-18 19:08:24.002500 TID:12 (PRI) (SVC) (EXT) (CID1) OracleConnectionImpl.Connect() (oper=open) (aff=n/a) (inst=) (affmatch=n/a) (pr.service=) (pr.pdb=) (pr.edition=) (sessid=-1:-1) (F;F;F;;N) (pmid=49068367)
2024-12-18 19:08:24.002545 TID:12 (PRI) (CP) PoolManager.CreateNewPRThreadFunc() Connection creation failed. (bMaxSemObtained = True) (m_bReconnectForReplay = None)
2024-12-18 19:08:24.002594 TID:12 (PRI) (CP) PoolManager.CreateNewPRThreadFunc() [MAX:REL:18] PM.CreateNewPRThreadFunc() : Max Sempahore count=99
2024-12-18 19:08:24.002619 TID:12 (PRI) (CP) PoolManager.CreateNewPRThreadFunc() [INCR:REL:2] PM.CreateNewPRThreadFunc() : Incr Sempahore count=4
2024-12-18 19:08:24.002672 TID:4 (PRI) (CP) PoolManager.CreateNewPR() New connection is available
2024-12-18 19:08:24.002701 TID:4 (PRI) (ENT) (CP) PoolManager.CreateNewPR() (TIMEOUT) (G)
2024-12-18 19:08:24.002738 TID:4 (PRI) (ENT) (CP) PoolManager.CreateNewPR() ORA-01882: timezone region not found 49068367
2024-12-18 19:08:24.002746 TID:4 (PRI) (ENT) (CP) PoolManager.CreateNewPR() UseHourOffsetForUnsupportedTimezone is true. Try Connecting with session time zone as the hour offset
2024-12-18 19:08:24.002741 TID:12 (PRI) (EXT) (CP) PoolManager.CreateNewPRThreadFunc()
2024-12-18 19:08:24.002751 TID:4 (PRI) (ENT) (CP) PoolManager.CreateNewPR() Connecting with session time zone as the hour offset
2024-12-18 19:08:24.002789 TID:4 (PRI) (CP) PoolManager.CreateNewPR() Waiting for idle connection to be available or new connection to be created
Finally, here's where it starts to retry the connection using the hour offset, which fails:
2024-12-18 19:08:24.703764 TID:7 (PRI) (SVC) (ENT) (CID1) OracleGlobalizationImpl.GetLocaleSpecificNLSValues() Connecting with session time zone as :+00:00
2024-12-18 19:08:24.703913 TID:7 (PRI) (ENT) (CID1) OracleException.HandleError() from OracleConnectionImpl.Connect()
2024-12-18 19:08:24.704144 TID:7 (PRI) (SVC) (ERR) (CID1) OracleException.HandleError() from OracleConnectionImpl.Connect()(txnid=n/a) System.NullReferenceException: Object reference not set to an instance of an object.
at OracleInternal.TTC.TTCAuthenticate.ReInit(MarshallingEngine marshallingEngine, Int32 lcid, Boolean b_setUseHourOffset)
at OracleInternal.ServiceObjects.OracleConnectionImpl.Connect(ConnectionString cs, Boolean bOpenEndUserSession, OracleConnection connRefForCriteria, String instanceName, Boolean bAsync)
2024-12-18 19:08:24.704173 TID:7 (PRI) (EXT) (CID1) OracleException.HandleError() from OracleConnectionImpl.Connect()
2024-12-18 19:08:24.704233 TID:7 (PRI) (SVC) (ENT) OracleConnectionImpl.get_ServiceName() (CONNECTION_OPTION:SERVICE_NAME=) (ISNULL=FALSE)
2024-12-18 19:08:24.704260 TID:7 (PRI) (SVC) (EXT) (CID1) OracleConnectionImpl.Connect() (oper=open) (aff=n/a) (inst=) (affmatch=n/a) (pr.service=) (pr.pdb=) (pr.edition=) (sessid=-1:-1) (F;F;F;;N) (pmid=49068367)
2024-12-18 19:08:24.704280 TID:7 (PRI) (CP) PoolManager.CreateNewPRThreadFunc() Connection creation failed. (bMaxSemObtained = True) (m_bReconnectForReplay = None)
2024-12-18 19:08:24.704596 TID:7 (PRI) (ENT) OracleException.HandleError() from PoolManager.CreateNewPRThreadFunc()
2024-12-18 19:08:24.704728 TID:7 (PRI) (ERR) (CP) OracleException.HandleError() from PoolManager.CreateNewPRThreadFunc()(txnid=n/a) System.Exception: m_semIncrPoolSize.Release() threw exception with count = 4
at OracleInternal.ConnectionPool.PoolManager`3.CreateNewPRThreadFunc(Object state)
2024-12-18 19:08:24.704749 TID:7 (PRI) (EXT) OracleException.HandleError() from PoolManager.CreateNewPRThreadFunc()
2024-12-18 19:08:24.704765 TID:7 (PRI) (EXT) (CP) PoolManager.CreateNewPRThreadFunc()
2024-12-18 19:09:09.002089 TID:4 (PRI) (ENT) (CP) PoolManager.CreateNewPR() (TIMEOUT) (G)
Note the NullReferenceException deep in TTCAuthenticate. This seems to be out of my control. Note also that the final (TIMEOUT) log line is from 45 seconds later; I have the connection timeout set to 45 seconds.
The text was updated successfully, but these errors were encountered:
Thanks, and sorry for the delay. I went on a long vacation just before you responded. I meant to check in on this occasionally, but I got caught up in the festivities and forgot about it.
I have emailed a full log, since it contains data that I'd rather not make public.
Come to think of it, I believe we encountered the same problem in the Oracle.ManagedDataAccess package for .NET Framework, in versions 21.x.x and up, which is why we're still using the 19.x.x one. Back then, I didn't dig into the trace logs, but it had the same symptom of the first connection often timing out.
I'm using the
Oracle.ManagedDataAccess.Core
package version 23.6.1 (though this problem seems to be present in older versions as well) and trying to connect to a v.19c database with an old time zones file (v.14) from a system set to the UTC time zone. The first attempt to connect always fails with a "connection timeout", while subsequent attempts succeed.It fails at first because the "Etc/UTC" zone isn't available in the database. Now, I have the
UseHourOffsetForUnsupportedTimezone
option enabled, so it then retries using the hour offset, but that fails due to aNullReferenceException
inside the package code, and then the attempt to get a connection from the pool eventually times out.Of course, we could try to update the database's time zone file, but this seems to be a potential bug in the package, so I'd like to discuss this first.
Here are some relevant parts from the trace log:
Finally, here's where it starts to retry the connection using the hour offset, which fails:
Note the
NullReferenceException
deep inTTCAuthenticate
. This seems to be out of my control. Note also that the final (TIMEOUT) log line is from 45 seconds later; I have the connection timeout set to 45 seconds.The text was updated successfully, but these errors were encountered: