empiredan opened a new issue, #2256:
URL: https://github.com/apache/incubator-pegasus/issues/2256

   
[TestMetaSession_MustQueryLeader](https://github.com/apache/incubator-pegasus/blob/master/go-client/session/meta_session_test.go#L57)
 failed due to data race as follows:
   
   ```
   === RUN   TestMetaSession_MustQueryLeader
   2025/05/22 20:54:18 create session with [0.0.0.0:34601(meta)]
   2025/05/22 20:54:18 create session with [0.0.0.0:34602(meta)]
   2025/05/22 20:54:18 create session with [0.0.0.0:34603(meta)]
   2025/05/22 20:54:18 querying configuration of table(temp) 
[metaList=[0.0.0.0:34601 0.0.0.0:34602 0.0.0.0:34603]]
   2025/05/22 20:54:18 querying configuration of table(temp) from 
[0.0.0.0:34601(meta)]
   2025/05/22 20:54:18 dial to [0.0.0.0:34601(meta)]
   2025/05/22 20:54:18 stop dialing for [0.0.0.0:34601(meta)], connection 
state: ConnStateReady
   2025/05/22 20:54:18 querying configuration of table(temp) from 
[0.0.0.0:34601(meta)]
   2025/05/22 20:54:18 close session [0.0.0.0:34601(meta)]
   2025/05/22 20:54:18 failed to read response from [0.0.0.0:34601(meta)]: read 
tcp 127.0.0.1:52124->127.0.0.1:34601: use of closed network connection
   2025/05/22 20:54:18 close session [0.0.0.0:34603(meta)]
   2025/05/22 20:54:18 close session [0.0.0.0:34602(meta)]
   2025/05/22 20:54:18 create session with [0.0.0.0:12345(meta)]
   2025/05/22 20:54:18 create session with [0.0.0.0:12346(meta)]
   2025/05/22 20:54:18 create session with [0.0.0.0:34601(meta)]
   2025/05/22 20:54:18 create session with [0.0.0.0:34602(meta)]
   2025/05/22 20:54:18 create session with [0.0.0.0:34603(meta)]
   2025/05/22 20:54:18 querying configuration of table(temp) 
[metaList=[0.0.0.0:12345 0.0.0.0:12346 0.0.0.0:34601 0.0.0.0:34602 
0.0.0.0:34603]]
   2025/05/22 20:54:18 querying configuration of table(temp) from 
[0.0.0.0:12345(meta)]
   2025/05/22 20:54:18 dial to [0.0.0.0:12345(meta)]
   2025/05/22 20:54:18 failed to dial [0.0.0.0:12345(meta)]: dial tcp 
0.0.0.0:12345: connect: connection refused
   2025/05/22 20:54:18 stop dialing for [0.0.0.0:12345(meta)], connection 
state: ConnStateTransientFailure
   2025/05/22 20:54:19 querying configuration of table(temp) from 
[0.0.0.0:12346(meta)]
   2025/05/22 20:54:19 dial to [0.0.0.0:12346(meta)]
   2025/05/22 20:54:19 querying configuration of table(temp) from 
[0.0.0.0:34601(meta)]
   2025/05/22 20:54:19 dial to [0.0.0.0:34601(meta)]
   2025/05/22 20:54:19 querying configuration of table(temp) from 
[0.0.0.0:34602(meta)]
   2025/05/22 20:54:19 querying configuration of table(temp) from 
[0.0.0.0:34603(meta)]
   2025/05/22 20:54:19 dial to [0.0.0.0:34602(meta)]
   2025/05/22 20:54:19 dial to [0.0.0.0:34603(meta)]
   2025/05/22 20:54:19 stop dialing for [0.0.0.0:34601(meta)], connection 
state: ConnStateReady
   2025/05/22 20:54:19 stop dialing for [0.0.0.0:34602(meta)], connection 
state: ConnStateReady
   2025/05/22 20:54:19 failed to dial [0.0.0.0:12346(meta)]: dial tcp 
0.0.0.0:12346: connect: connection refused
   2025/05/22 20:54:19 stop dialing for [0.0.0.0:12346(meta)], connection 
state: ConnStateTransientFailure
   2025/05/22 20:54:19 stop dialing for [0.0.0.0:34603(meta)], connection 
state: ConnStateReady
   2025/05/22 20:54:19 create session with [172.18.0.2:34601(meta)]
   2025/05/22 20:54:19 session [0.0.0.0:12345(meta)] is unable to connect (used 
1002ms), the context error: context canceled
   2025/05/22 20:54:19 failed to query configuration from 
[0.0.0.0:12345(meta)]: context canceled
   2025/05/22 20:54:19 failed to query configuration from 
[0.0.0.0:34603(meta)]: context canceled
   2025/05/22 20:54:19 session [0.0.0.0:12346(meta)] is unable to connect (used 
2ms), the context error: context canceled
   2025/05/22 20:54:19 failed to query configuration from 
[0.0.0.0:12346(meta)]: context canceled
   2025/05/22 20:54:19 add forward address 172.18.0.2:34601 as meta server
   2025/05/22 20:54:19 querying configuration of table(temp) from 
[172.18.0.2:34601(meta)]
   2025/05/22 20:54:19 session [172.18.0.2:34601(meta)] is unable to connect 
(used 0ms), the context error: context canceled
   2025/05/22 20:54:19 failed to query configuration from 
[172.18.0.2:34601(meta)]: context canceled
   ==================
   WARNING: DATA RACE
   Read at 0x00c000190340 by goroutine 30:
     github.com/apache/incubator-pegasus/go-client/session.(*MetaManager).call()
         
/__w/incubator-pegasus/incubator-pegasus/go-client/session/meta_session.go:101 
+0x172
     
github.com/apache/incubator-pegasus/go-client/session.(*MetaManager).QueryConfig()
         
/__w/incubator-pegasus/incubator-pegasus/go-client/session/meta_session.go:112 
+0x208
     
github.com/apache/incubator-pegasus/go-client/session.testMetaSessionMustQueryLeader()
         
/__w/incubator-pegasus/incubator-pegasus/go-client/session/meta_session_test.go:68
 +0x12e
     
github.com/apache/incubator-pegasus/go-client/session.TestMetaSession_MustQueryLeader()
         
/__w/incubator-pegasus/incubator-pegasus/go-client/session/meta_session_test.go:59
 +0x164
     testing.tRunner()
         
/__t/go/1.18.10/x64/src/testing/testing.go:[1439](https://github.com/apache/incubator-pegasus/actions/runs/15186588175/job/42709887308?pr=2255#step:8:1440)
 +0x213
     testing.(*T).Run.func1()
         /__t/go/1.18.10/x64/src/testing/testing.go:1486 +0x47
   
   Previous write at 0x00c000190340 by goroutine 53:
   2025/05/22 20:54:19 dial to [172.18.0.2:34601(meta)]
     
github.com/apache/incubator-pegasus/go-client/session.(*metaCall).issueSingleMeta()
         
/__w/incubator-pegasus/incubator-pegasus/go-client/session/meta_call.go:136 
+0x6a4
     
github.com/apache/incubator-pegasus/go-client/session.(*metaCall).issueBackupMetas.func1()
         
/__w/incubator-pegasus/incubator-pegasus/go-client/session/meta_call.go:167 
+0x67
     
github.com/apache/incubator-pegasus/go-client/session.(*metaCall).issueBackupMetas.func2()
         
/__w/incubator-pegasus/incubator-pegasus/go-client/session/meta_call.go:168 
+0x47
   
   Goroutine 30 (running) created at:
     testing.(*T).Run()
         /__t/go/1.18.10/x64/src/testing/testing.go:1486 +0x724
     testing.runTests.func1()
         /__t/go/1.18.10/x64/src/testing/testing.go:1839 +0x99
     testing.tRunner()
         /__t/go/1.18.10/x64/src/testing/testing.go:1439 +0x213
     testing.runTests()
         /__t/go/1.18.10/x64/src/testing/testing.go:1837 +0x7e4
     testing.(*M).Run()
         /__t/go/1.18.10/x64/src/testing/testing.go:1719 +0xa71
     github.com/apache/incubator-pegasus/go-client/session.TestMain()
         
/__w/incubator-pegasus/incubator-pegasus/go-client/session/main_test.go:31 +0x54
     main.main()
         _testmain.go:165 +0x3f7
   
   Goroutine 53 (running) created at:
     
github.com/apache/incubator-pegasus/go-client/session.(*metaCall).issueBackupMetas()
         
/__w/incubator-pegasus/incubator-pegasus/go-client/session/meta_call.go:166 
+0x205
     
github.com/apache/incubator-pegasus/go-client/session.(*metaCall).Run.func2()
         
/__w/incubator-pegasus/incubator-pegasus/go-client/session/meta_call.go:92 
+0x199
   ==================
   2025/05/22 20:54:19 querying configuration of table(temp) from 
[0.0.0.0:34601(meta)]
   2025/05/22 20:54:19 stop dialing for [172.18.0.2:34601(meta)], connection 
state: ConnStateReady
   2025/05/22 20:54:19 close session [0.0.0.0:12346(meta)]
   2025/05/22 20:54:19 close session [0.0.0.0:12345(meta)]
   2025/05/22 20:54:19 close session [0.0.0.0:34601(meta)]
   2025/05/22 20:54:19 failed to read response from [0.0.0.0:34601(meta)]: read 
tcp 127.0.0.1:52126->127.0.0.1:34601: use of closed network connection
   2025/05/22 20:54:19 close session [0.0.0.0:34602(meta)]
   2025/05/22 20:54:19 close session [0.0.0.0:34603(meta)]
   2025/05/22 20:54:19 close session [172.18.0.2:34601(meta)]
   2025/05/22 20:54:19 failed to read response from [0.0.0.0:34603(meta)]: read 
tcp 127.0.0.1:40006->127.0.0.1:34603: use of closed network connection
   2025/05/22 20:54:19 failed to read response from [0.0.0.0:34602(meta)]: read 
tcp 127.0.0.1:58328->127.0.0.1:34602: use of closed network connection
   2025/05/22 20:54:19 failed to read response from [172.18.0.2:34601(meta)]: 
read tcp 172.18.0.2:46772->172.18.0.2:34601: use of closed network connection
       testing.go:1312: race detected during execution of test
   --- FAIL: TestMetaSession_MustQueryLeader (1.01s)
   === CONT  
       testing.go:1312: race detected during execution of test
   FAIL
   coverage: 32.5% of statements
   FAIL github.com/apache/incubator-pegasus/go-client/session   1.217s
   FAIL
   make: *** [Makefile:46: ci] Error 1
   Error: Process completed with exit code 2.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to