在 Solaris 上使用 Python3.6 调查 "Bad System Call" 的 shutil 调用
Investigate "Bad System Call" on shutil calls with Python3.6 on Solaris
我们在 Solaris 环境中从 Python3.3 迁移到 Python3.6,现在我在 Solaris 设置中遇到此错误:
$uname -a
SunOS ... 5.10 Generic_118833-33 sun4u sparc SUNW,A70
$mkdir -p test/a/b
$echo "test " >> test/a/b/toto
$python3.6
Python 3.6.3 (default, Oct 29 2019, 18:43:57)
[GCC 4.9.4 20151030 (for GNAT Pro 7.4.2 20160527)] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import shutil
>>> shutil.copytree("test", "gabuzo")
Bad System Call # The interpreter exits !!!
$echo $?
140
$tree meuh/
meuh/
`-- a
`-- b
`-- toto
2 directories, 1 file
解释器退出(在显然正确地复制了树之后),我找不到深入研究这个问题的方法(可能有 shutil 调用的回溯)
在某些系统上(我不是管理员),已配置核心转储,此 Bad System Call
生成一个我可以 pstack
pmap
。这足以进一步调查问题(连同 shutil 的源代码)并找出是什么系统调用产生了这个 Bad System Call
。我终于可以用 C 编写一个 MWE 来重现问题,以显示在这些设置上安装 libc 时出现的问题。
我们在 Solaris 环境中从 Python3.3 迁移到 Python3.6,现在我在 Solaris 设置中遇到此错误:
$uname -a
SunOS ... 5.10 Generic_118833-33 sun4u sparc SUNW,A70
$mkdir -p test/a/b
$echo "test " >> test/a/b/toto
$python3.6
Python 3.6.3 (default, Oct 29 2019, 18:43:57)
[GCC 4.9.4 20151030 (for GNAT Pro 7.4.2 20160527)] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import shutil
>>> shutil.copytree("test", "gabuzo")
Bad System Call # The interpreter exits !!!
$echo $?
140
$tree meuh/
meuh/
`-- a
`-- b
`-- toto
2 directories, 1 file
解释器退出(在显然正确地复制了树之后),我找不到深入研究这个问题的方法(可能有 shutil 调用的回溯)
在某些系统上(我不是管理员),已配置核心转储,此 Bad System Call
生成一个我可以 pstack
pmap
。这足以进一步调查问题(连同 shutil 的源代码)并找出是什么系统调用产生了这个 Bad System Call
。我终于可以用 C 编写一个 MWE 来重现问题,以显示在这些设置上安装 libc 时出现的问题。