先上结论:不要使用Archlinux WSL
重要的事情说三遍:
- 不要使用Archlinux WSL
- 不要使用Archlinux WSL
- 不要使用Archlinux WSL
看看Archlinux on WSL? / Other Architectures / Arch Linux Forums中大伙的评论:
- It seems to be a set of initial unconfigured packages that you have to configure yourself.
- It isn’t Arch, and it isn’t supported by the community.
- Or is it maybe something unacceptable about it?
Correct, see http://archlinux.2023198.n4.nabble.com/ … l#a4718292
官方和社区都不支持,那还玩啥?
问题
下面给出一个我在使用ArchLinux WSL中遇到的问题:
当使用python运行一个使用了Cpython的脚本时,引发了segment fault
,显示保存信息极少。使用gdb python
然后run <script.py>
进行调试,然后backtrace
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
| Thread 1 "python" received signal SIGSEGV, Segmentation fault. 0x00007fffcc488f3a in std::basic_ostream<char, std::char_traits<char> >::sentry::sentry (this=0x7fffffffc980, __os=...) at /opt/conda/conda-bld/gcc-compiler_1654084175708/work/build/gcc-final/x86_64-conda-linux-gnu/libstdc++-v3/include/bits/ostream.tcc:51 51 /opt/conda/conda-bld/gcc-compiler_1654084175708/work/build/gcc-final/x86_64-conda-linux-gnu/libstdc++-v3/include/bits/ostream.tcc: No such file or directory. (gdb) run fill_time.py The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/jkup/.conda/envs/quant/bin/python fill_time.py [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7ffff45ff6c0 (LWP 3265)] [New Thread 0x7ffff1dfe6c0 (LWP 3266)] [New Thread 0x7fffef5fd6c0 (LWP 3267)] [New Thread 0x7fffecdfc6c0 (LWP 3268)] [New Thread 0x7fffec5fb6c0 (LWP 3269)] [New Thread 0x7fffe7dfa6c0 (LWP 3270)] [New Thread 0x7fffe55f96c0 (LWP 3271)] [New Thread 0x7fffe2df86c0 (LWP 3272)] [New Thread 0x7fffe05f76c0 (LWP 3273)] [New Thread 0x7fffdddf66c0 (LWP 3274)] [New Thread 0x7fffdb5f56c0 (LWP 3275)] [New Thread 0x7fffd8df46c0 (LWP 3276)] [New Thread 0x7fffd65f36c0 (LWP 3277)] [New Thread 0x7fffd3df26c0 (LWP 3278)] [New Thread 0x7fffd35f16c0 (LWP 3279)] Thread 1 "python" received signal SIGSEGV, Segmentation fault. 0x00007fffcc488f3a in std::basic_ostream<char, std::char_traits<char> >::sentry::sentry (this=0x7fffffffc980, __os=...) at /opt/conda/conda-bld/gcc-compiler_1654084175708/work/build/gcc-final/x86_64-conda-linux-gnu/libstdc++-v3/include/bits/ostream.tcc:51 51 /opt/conda/conda-bld/gcc-compiler_1654084175708/work/build/gcc-final/x86_64-conda-linux-gnu/libstdc++-v3/include/bits/ostream.tcc: No such file or directory. (gdb) backtrace
at /opt/conda/conda-bld/gcc-compiler_1654084175708/work/build/gcc-final/x86_64-conda-linux-gnu/libstdc++-v3/include/bits/ostream.tcc:51
at /opt/conda/conda-bld/gcc-compiler_1654084175708/work/build/gcc-final/x86_64-conda-linux-gnu/libstdc++-v3/include/bits/ostream_insert.h:83
at /usr/local/src/conda/python-3.10.13/Include/cpython/abstract.h:114
at /usr/local/src/conda/python-3.10.13/Python/ceval.c:5067
at /usr/local/src/conda/python-3.10.13/Python/pythonrun.c:1291
arena=arena@entry=0x7ffff78f7b90) at /usr/local/src/conda/python-3.10.13/Python/pythonrun.c:1312
flags=0x7fffffffd338) at /usr/local/src/conda/python-3.10.13/Python/pythonrun.c:1208
--Type <RET> for more, q to quit, c to continue without paging--
|
谷歌一圈,解决方案较少,并没有找到合适的解决方案。本来以为可能是使用yay
安装到/opt
下导致内存限制的问题。但重新在用户家目录下安装miniconda并未解决问题。
之前使用Archlinux也遇到过不少问题,但都可以在Arch Wiki下找到答案,而且很多是由于更新软件包时不看提示信息导致的,这次搜索没有看到明显的有效信息。
既然官方和社区都不支持Archlinux Wsl,那就卸了吧,继续使用“邪恶混沌”的Ubuntu。
(虽然之前在做CMU15-213的Bomblab还是AttackLab时,在Ubuntu时运行程序也有问题,在Debian下没有问题……不过WSL还是要比VMware用着方便,将就着用吧)