[Bug]: ut TestReadDirSymlink fail
Is there an existing issue for the same bug?
- [x] I have checked the existing issues.
Branch Name
main
Commit ID
latest
Other Environment Information
- Hardware parameters:
- OS type:
- Others:
Actual Behavior
Expected Behavior
No response
Steps to Reproduce
https://github.com/matrixorigin/matrixone/actions/runs/15575649339/job/43859933662?pr=22007
Additional information
No response
https://github.com/matrixorigin/matrixone/commit/a448195621b1979b9fb2648e9b1027f8819c6079
这个commit增加了对symlink的验证,验证过程没有报错,但读取过程报错,很奇怪
怀疑底层的存储的问题,因为不是必现的,出现频率很低
Repro: https://github.com/matrixorigin/matrixone/actions/runs/16366996760/job/46246475558?pr=22200 出现频率还是比较高,几天就能出现一次
文件系统记录的测试目录是:2025-07-24T07:26:26.4625686Z {"Time":"2025-07-24T07:26:20.799898672Z","Action":"output","Package":"github.com/matrixorigin/matrixone/pkg/sql/colexec/external","Test":"TestReadDirSymlink","Output":" external_test.go:482: notify: notify.Create: "/tmp/TestReadDirSymlink4132713711/001/a"\n"}
但报错的目录是:2025-07-24T07:26:26.4635064Z {"Time":"2025-07-24T07:26:20.805625895Z","Action":"output","Package":"github.com/matrixorigin/matrixone/pkg/sql/colexec/external","Test":"TestReadDirSymlink","Output":" \tError: \tExpected nil, but got: \u0026fs.PathError{Op:"lstat", Path:"/tmp/TestString2885771069", Err:0x2}\n"}
TestReadDirSymlink 的测试,却用了 TestString 的目录,应该是因为并发跑测试时,用到了一些全局变量而导致。
不知道什么原因。先改成用系统的临时目录,不用 t.TempDir
close it and reopen if repro later
repro: https://github.com/matrixorigin/matrixone/actions/runs/16771896338/job/47488819589?pr=22310
TestReadDirSymlink 的测试,却报了 TestPrepare 的目录找不到。原因待查
repro: https://github.com/matrixorigin/matrixone/actions/runs/17230085440/job/48882066693?pr=22429
+-----------------------------------------------------------------------------------------------------------------------------+
| Failed UT Packages |
+------------------------------------------------------------+----------------------+----------------------+--------+---------+
| PACKAGE | START_TIME | END_TIME | RESULT | ELAPSED |
+------------------------------------------------------------+----------------------+----------------------+--------+---------+
| github.com/matrixorigin/matrixone/pkg/sql/colexec/external | 2025-08-26T06:47:08Z | 2025-08-26T06:47:08Z | fail | 0.13 |
+------------------------------------------------------------+----------------------+----------------------+--------+---------+
============================================
[TEST]: TestReadDirSymlink
[START_AT]: 2025-08-26T06:47:08Z
[END_AT]: 2025-08-26T06:47:08Z
[RESULT]: fail
[ELAPSED]: 0.01
[OUTPUTS]:
=== RUN TestReadDirSymlink
external_test.go:487: notify: notify.Create: "/tmp/3673856318/a"
external_test.go:554:
Error Trace: /home/runner/_work/matrixone/matrixone/matrixone/pkg/sql/colexec/external/external_test.go:554
Error: Expected nil, but got: &fs.PathError{Op:"lstat", Path:"/tmp/TestString[34](https://github.com/matrixorigin/matrixone/actions/runs/17230085440/job/48882066693?pr=22429#step:12:35)57504137", Err:0x2}
Test: TestReadDirSymlink
external_test.go:556:
Error Trace: /home/runner/_work/matrixone/matrixone/matrixone/pkg/sql/colexec/external/external_test.go:556
Error: Not equal:
expected: 1
actual : 0
Test: TestReadDirSymlink
--- FAIL: TestReadDirSymlink (0.01s)
panic: runtime error: index out of range [0] with length 0 [recovered]
panic: runtime error: index out of range [0] with length 0
goroutine 252 [running]:
testing.tRunner.func1.2({0x4383760, 0xc00348a7e0})
/home/runner/_work/_tool/go/1.24.3/x64/src/testing/testing.go:1734 +0x21c
testing.tRunner.func1()
/home/runner/_work/_tool/go/1.24.3/x64/src/testing/testing.go:1737 +0x[35](https://github.com/matrixorigin/matrixone/actions/runs/17230085440/job/48882066693?pr=22429#step:12:36)e
panic({0x4383760?, 0xc00348a7e0?})
/home/runner/_work/_tool/go/1.24.3/x64/src/runtime/panic.go:792 +0x132
github.com/matrixorigin/matrixone/pkg/sql/colexec/external.TestReadDirSymlink(0xc002f7ba40)
/home/runner/_work/matrixone/matrixone/matrixone/pkg/sql/colexec/external/external_test.go:557 +0x10ab
testing.tRunner(0xc002f7ba40, 0x475bd30)
/home/runner/_work/_tool/go/1.24.3/x64/src/testing/testing.go:1792 +0xf4
created by testing.(*T).Run in goroutine 1
/home/runner/_work/_tool/go/1.24.3/x64/src/testing/testing.go:1851 +0x413
steps.ut.conclusion:
FAIL_UT_CASES=TestReadDirSymlink,
https://github.com/matrixorigin/matrixone/actions/runs/17968099151/job/51104531726?pr=22550
+-----------------------------------------------------------------------------------------------------------------------------+
| Failed UT Packages |
+------------------------------------------------------------+----------------------+----------------------+--------+---------+
| PACKAGE | START_TIME | END_TIME | RESULT | ELAPSED |
+------------------------------------------------------------+----------------------+----------------------+--------+---------+
| github.com/matrixorigin/matrixone/pkg/sql/colexec/external | 2025-09-24T06:24:06Z | 2025-09-24T06:24:06Z | fail | 0.12 |
+------------------------------------------------------------+----------------------+----------------------+--------+---------+
============================================
[TEST]: TestReadDirSymlink
[START_AT]: 2025-09-24T06:24:06Z
[END_AT]: 2025-09-24T06:24:06Z
[RESULT]: fail
[ELAPSED]: 0.00
[OUTPUTS]:
=== RUN TestReadDirSymlink
external_test.go:410: notify: notify.Create: "/tmp/296677695/a"
external_test.go:464:
Error Trace: /home/runner/_work/matrixone/matrixone/matrixone/pkg/sql/colexec/external/external_test.go:464
Error: Expected nil, but got: &fs.PathError{Op:"lstat", Path:"/tmp/TestIssue18454435675278", Err:0x2}
Test: TestReadDirSymlink
external_test.go:465:
Error Trace: /home/runner/_work/matrixone/matrixone/matrixone/pkg/sql/colexec/external/external_test.go:465
Error: Not equal:
expected: 1
actual : 0
Test: TestReadDirSymlink
--- FAIL: TestReadDirSymlink (0.00s)
panic: runtime error: index out of range [0] with length 0 [recovered]
panic: runtime error: index out of range [0] with length 0
goroutine 237 [running]:
testing.tRunner.func1.2({0x454d1c0, 0xc000f42bd0})
/home/runner/_work/_tool/go/1.24.3/x64/src/testing/testing.go:17[34](https://github.com/matrixorigin/matrixone/actions/runs/17967683369/job/51103279390?pr=22550#step:12:35) +0x21c
testing.tRunner.func1()
/home/runner/_work/_tool/go/1.24.3/x64/src/testing/testing.go:1737 +0x[35](https://github.com/matrixorigin/matrixone/actions/runs/17967683369/job/51103279390?pr=22550#step:12:36)e
panic({0x454d1c0?, 0xc000f42bd0?})
/home/runner/_work/_tool/go/1.24.3/x64/src/runtime/panic.go:792 +0x132
github.com/matrixorigin/matrixone/pkg/sql/colexec/external.TestReadDirSymlink(0xc00140ca80)
/home/runner/_work/matrixone/matrixone/matrixone/pkg/sql/colexec/external/external_test.go:466 +0x10b5
testing.tRunner(0xc00140ca80, 0x49412d8)
/home/runner/_work/_tool/go/1.24.3/x64/src/testing/testing.go:1792 +0xf4
created by testing.(*T).Run in goroutine 1
/home/runner/_work/_tool/go/1.24.3/x64/src/testing/testing.go:1851 +0x413
steps.ut.conclusion:
FAIL_UT_CASES=TestReadDirSymlink,