-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Mongo shell shutdown calls ls. The shell's implementation of ls calls listFiles, which calls file_size on every file in the directory, which throws a boost filesystem exception on symlinks, which are immediately caught.
SERVER-98918 overwrote __cxa_throw with a custom implementation to print a stack trace which appears to be slower than original. Engineers may have many symlinks in their mongo/ directory due to use of db-contrib-tool. This results in shell shutdown when running resmoke locally taking a long time and printing this error:
[js_test:profile_count:ValidateCollections] {"t":{"$date":"2025-02-06T21:16:20.449Z"},"s":"W", "c":"CONTROL", "id":9891800, "ctx":"main","msg":"Threw exception","attr":{"type":"N5boost10filesystem16filesystem_errorE"}}
many times on shutdown.
The boost docs indicate that file_size should only be called on files which exist and are regular files.
- is related to
-
SERVER-97251 Shell should clean up core dumps from intentional test crashes
-
- Closed
-
- related to
-
SERVER-98918 Ensure correct size parameter for array new operator
-
- Closed
-
-
SERVER-100564 Avoid linking //src/mongo/db:throw_hook_impl in mongo shell
-
- Closed
-