Segfault in parsing of `/proc/cpuinfo` on high core count machines running on VMWare with 1 core per socket
We changed our VMWare configuration to have more cores and began observing crashes in initialization of SVT-AV1. The core count is now 96, where before it was 64. Here is a stack trace, and the locals, from gdb: ``` #0 0x00007fffebdd21fd in init_thread_management_params () at /tmp/build/3c52d0c9/ci-common/scripts/29127/.conan/data/svt-av1/1.8.0/_/_/build/f05d2aef7b809bcc526ee53ba09762f0462defd5/source/Source/Lib/Encoder/Globals/EbEncHandle.c:221 #1 0x00007fffebdd913b in svt_enc_handle_ctor (enc_handle_ptr=0x555557d0ede0, ebHandlePtr=0x55555956c9e0) at /tmp/build/3c52d0c9/ci-common/scripts/29127/.conan/data/svt-av1/1.8.0/_/_/build/f05d2aef7b809bcc526ee53ba09762f0462defd5/source/Source/Lib/Encoder/Globals/EbEncHandle.c:1127 #2 0x00007fffebded31b in init_svt_av1_encoder_handle (hComponent=0x55555956c9e0) at /tmp/build/3c52d0c9/ci-common/scripts/29127/.conan/data/svt-av1/1.8.0/_/_/build/f05d2aef7b809bcc526ee53ba09762f0462defd5/source/Source/Lib/Encoder/Globals/EbEncHandle.c:5652 #3 0x00007fffebde44c8 in svt_av1_enc_init_handle (p_handle=0x55556da25320, p_app_data=0x55556da24f30, config_ptr=0x55556da25328) at /tmp/build/3c52d0c9/ci-common/scripts/29127/.conan/data/svt-av1/1.8.0/_/_/build/f05d2aef7b809bcc526ee53ba09762f0462defd5/source/Source/Lib/Encoder/Globals/EbEncHandle.c:2470 ``` And the locals: ``` (gdb) info locals p = 0x7fffffffd42e "66\n" socket_id = 66 processor_id = 33 maxSize = 128 line = "physical id\t: 66\n\000B\n\000\n\000\065\064\063 32-Core Processor\n\000ual\n\000e_v1 spectre_v2 spec_store_bypass srso\n\000x fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_"... fin = 0x5555559effa0 (gdb) p lp_group[socket_id] $1 = {num = 2778964384, group = {2913708455, 3048452527, 3183196599, 3317940671, 3452684743, 3587428815, 3722172887, 3856916959, 3991661031, 4126405103, 4261149175, 84082944, 218827015, 353571087, 488315159, 623059231, 757803303, 892547375, 1027291447, 1162035519, 1296779591, 1431523663, 1566267735, 1701011807, 1835755879, 1970499951, 2105244023, 2239988095, 2374732167, 2509476239, 2644220311, 2778964383, 2913708455, 3048452527, 3183196599, 3317940671, 3452684743, 3452816845, 3452816845, 3452816845, 3452816845, 3452816845, 3452816845, 3452816845, 3452816845, 1364283729, 1364283729, 1364283729, 1364283729, 1364283729, 1364283729, 1364283729, 1364283729, 1465209681, 1599953753, 1734697825, 1869441897, 2004185969, 2138930041, 2273674113, 2408418185, 2543162257, 2677906329, 2812650401, 2947394473, 3082138545, 3216882617, 3351626689, 3486370761, 3621114833, 3755858905, 3890602977, 4025347049, 4160091121, 16645113, 117768961, 252513033, 387257105, 522001177, 656745249, 791489321, 926233393, 1060977465, 1195721537, 1330465609, 1465209681, 1599953753, 1734697825, 1869441897, 2004185969, 2138930041, 2273674113, 2408418185, 2543162257, 2677906329, 2812650401, 2947394473, 3082138545, 3216882617, 3351626689, 3486370761, 3621114833, 3755858905, 3890602977, 4025347049, 4160091121, 16645113, 117768961, 252513033, 387257105, 522001177, 656745249, 791489321, 926233393, 1060977465, 1195721537, 1330465609, 1465209681, 1599953753, 1734697825, 1869441897, 2004185969, 2138930041, 2273674113, 2408418185, 2543162257, 2677906329, 2812650401, 2947394473, 3082138545, 3216882617, 3351626689, 3486370761, 3486502863, 3486502863, 3486502863, 3486502863, 3486502863, 3486502863, 3486502863, 3486502863, 1397969747, 1397969747, 1397969747, 1397969747, 1397969747, 1397969747, 1397969747, 1397969747, 1498895699, 1633639771, 1768383843, 1903127915, 2037871987, 2172616059, 2307360131, 2442104203, 2576848275, 2711592347, 2846336419, 2981080491, 3115824563, 3250568635, 3385312707, 3520056779, 3654800851, 3789544923, 3924288995, 4059033067, 4193777139, 16842235, 151454979, 286199051, 420943123, 555687195, 690431267, 825175339, 959919411, 1094663483, 1229407555, 1364151627, 1498895699, 1633639771, 1768383843, 1903127915, 2037871987, 2172616059, 2307360131, 2442104203, 2576848275, 2711592347, 2846336419, 2981080491, 3115824563, 3250568635, 3385312707, 3520056779, 3654800851, 3789544923, 3924288995...}} ``` I have also attached the `/proc/cpuinfo` in question. You can see that there is a unique `physical id` per core, and they step up in increments of 2. This is the CPU topology that's provided for us by VMWare. [cpuinfo](/uploads/8f266170e2463a43d43f179a04623e20/cpuinfo)
issue