- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我对我的代码进行了大扫除,将其拆分为多个 Go 包,主要是为了提高可重用性(每个“构建 block ”都在自己的包中)。
修复导入错误后,我发现我的程序突然无法构建。运行“go build”会返回 nosplit stack overflow 错误。
robot main.init: nosplit stack overflow
120 guaranteed after split check in main.init
112 on entry to robot/web.init
104 on entry to robot/controller.init
96 on entry to robot/slam.init
88 on entry to robot/slam/hector.init
80 on entry to hectormapping/map/mapimages.init
72 on entry to hectormapping/map/maprep.init
64 on entry to hectormapping/map/mapproccontainer.init
56 on entry to hectormapping/scanmatcher.init
48 on entry to hectormapping/map/gridmap/occbase.init
40 on entry to hectormapping/map/gridmap/base.init
32 on entry to hectormapping/map/gridmap.init
24 on entry to github.com/skelterjohn/go%2ematrix.init
16 on entry to math.init
8 on entry to math.init┬À1
0 on entry to runtime.panicindex
-8 on entry to runtime.morestack00runtime.main: nosplit stack overflow
120 guaranteed after split check in runtime.main
128 after runtime.main uses -8
120 on entry to main.init
112 on entry to robot/web.init
104 on entry to robot/controller.init
96 on entry to robot/slam.init
88 on entry to robot/slam/hector.init
80 on entry to hectormapping/map/mapimages.init
72 on entry to hectormapping/map/maprep.init
64 on entry to hectormapping/map/mapproccontainer.init
56 on entry to hectormapping/scanmatcher.init
48 on entry to hectormapping/map/gridmap/occbase.init
40 on entry to hectormapping/map/gridmap/base.init
32 on entry to hectormapping/map/gridmap.init
24 on entry to github.com/skelterjohn/go%2ematrix.init
16 on entry to math.init
8 on entry to math.init┬À1
0 on entry to runtime.panicindex
-8 on entry to runtime.morestack00
有人知道这是怎么回事吗?我找不到太多关于可能导致它的文档,除了在某些情况下这是 a bug that supposedly is fixed .
部分代码被拆分到“src”文件夹中的一个新文件夹中,所以现在的文件结构是:
src/robot/main.go (main() lives here)
src/robot/(...) (application-specific packages)
src/hectormapping/(...) (stand-alone package used in "robot")
我在 Windows 7 (x64) 上使用 Go 1.0.3。
最佳答案
这似乎与描述的 here 相同据说是固定在尖端的。可以查看相应的修复 here .
总结一下我看到的问题: Split stacking用于增长堆栈而不是传统的固定内存区域。这样做的好处是可以生成更多线程,因为实际上只保留了所需的堆栈内存。这里的问题似乎是链接器将不使用拆分堆栈上的内存的函数意外标记为“nosplit”,因为它没有找到拆分堆栈序言。这会导致链接器计算错误的堆栈限制,进而让链接器认为没有空间并向您抛出错误消息。
遗憾的是,获得尖端版本的唯一方法是自己编译。正如 Nick Craig-Wood 已经提到的,您可以找到说明 here .如果您真的无法升级,您可以尝试通过在 init
函数中分配一些任意局部变量来解决此问题。但这当然很困惑。
关于go - 构建 Go 项目时出现 "nosplit stack overflow"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15544601/
我部署了一个kubernetes集群,并尝试使用一个简单的bash pod对其进行测试,如下所示 kubectl运行my-shell --rm -i --tty --image ubuntu-bash
我对我的代码进行了大扫除,将其拆分为多个 Go 包,主要是为了提高可重用性(每个“构建 block ”都在自己的包中)。 修复导入错误后,我发现我的程序突然无法构建。运行“go build”会返回 n
我的主机位于公司代理后面并运行 Windows 7。我有一个 ubuntu 16.04 VM (NAT),我正在尝试执行 apt-get update . 更新引发错误 Failed to fetch
每当我这样做: sudo apt-get update 我收到以下错误: W: GPG error: http://ppa.launchpad.net/rael-gc/rvm/ubuntu xenia
当我运行 sudo apt update 表明 :- E: 获取失败 http://packages.microsoft.com/repos/code/dists/stable/InRelease C
我是一名优秀的程序员,十分优秀!