Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

分布式构建报错 #4760

Closed
rooong opened this issue Feb 22, 2024 · 16 comments
Closed

分布式构建报错 #4760

rooong opened this issue Feb 22, 2024 · 16 comments
Labels
Milestone

Comments

@rooong
Copy link

rooong commented Feb 22, 2024

Xmake 版本

2.8.6

操作系统版本和架构

windows 7/windows server 2012

描述问题

本地windows 7,分布式服务器windows server 2012,构建工程报错
vs2013

期待的结果

正常构建

工程配置

client.conf配置:
{
connect_timeout = 10000,
distcc_build = {
hosts = {
{
connect = "127.0.0.1:9693",
token = "aee4d7a8875e4cfb2a421219cfb737bc"
},
{
connect = "10.0.0.57:9693",
token = "fef62d3bb81d39e08f38fbad770e9076"
}
}
},
recv_timeout = -1,
remote_build = {
connect = "127.0.0.1:9691",
token = "aee4d7a8875e4cfb2a421219cfb737bc"
},
remote_cache = {
connect = "127.0.0.1:9692",
token = "aee4d7a8875e4cfb2a421219cfb737bc"
},
send_timeout = -1
}

附加信息和错误日志

分布式构建异常log.txt

@rooong rooong added the bug label Feb 22, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: Distributed build error

Xmake version

2.8.6

Operating system version and architecture

windows 7/windows server 2012

Describe the problem

Local windows 7, distributed server windows server 2012, building project error
vs2013

Expected results

Build normally

Project configuration

client.conf configuration:
{
connect_timeout = 10000,
distcc_build = {
hosts = {
{
connect = "127.0.0.1:9693",
token = "aee4d7a8875e4cfb2a421219cfb737bc"
},
{
connect = "10.0.0.57:9693",
token = "fef62d3bb81d39e08f38fbad770e9076"
}
}
},
recv_timeout = -1,
remote_build = {
connect = "127.0.0.1:9691",
token = "aee4d7a8875e4cfb2a421219cfb737bc"
},
remote_cache = {
connect = "127.0.0.1:9692",
token = "aee4d7a8875e4cfb2a421219cfb737bc"
},
send_timeout = -1
}

Additional information and error logs

Distributed build exception log.txt

@waruqi
Copy link
Member

waruqi commented Feb 23, 2024

服务端也是相同版本么,按理 njob 不应该为 nil,你可以调下下面的位置

maxjobs = maxjobs + host.njob

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Is the server also the same version? Logically njob should not be nil. You can adjust the following position

maxjobs = maxjobs + host.njob

@rooong
Copy link
Author

rooong commented Feb 23, 2024

服务端也是相同版本么,按理 njob 不应该为 nil,你可以调下下面的位置

maxjobs = maxjobs + host.njob

版本一样的,同个安装包。
出现一次后,后面再试没再报错。但是连接上后,有时候分布式服务器有在一起编译构建,有时候没有。。。这个不知道什么情况(这期间分布式连接有开关操作)

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Is the server version also the same? Logically njob should not be nil. You can adjust the following position

maxjobs = maxjobs + host.njob

The same version, the same installation package.
After it occurred once, no error was reported again when I tried again. But after connecting, sometimes the distributed servers are compiled and built together, and sometimes they are not. . . I don’t know what’s going on with this (during this period, the distributed connection is switching on and off)

@waruqi
Copy link
Member

waruqi commented Feb 23, 2024

服务端也是相同版本么,按理 njob 不应该为 nil,你可以调下下面的位置

maxjobs = maxjobs + host.njob

版本一样的,同个安装包。 出现一次后,后面再试没再报错。但是连接上后,有时候分布式服务器有在一起编译构建,有时候没有。。。这个不知道什么情况(这期间分布式连接有开关操作)

除非有必现的问题,并且提供复现步骤和完整 logs ,不然我也没法看,你可以自己翻源码 调下。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Is the server version also the same? Logically njob should not be nil. You can adjust the following position

maxjobs = maxjobs + host.njob

The same version and the same installation package. After it occurred once, no error was reported again when I tried again. But after connecting, sometimes the distributed servers are compiled and built together, and sometimes they are not. . . I don’t know what’s going on with this (during this period, the distributed connection is switching on and off)

Unless there is a problem that must occur, and the reproduction steps and complete logs are provided, I can't read it. You can read the source code and adjust it yourself.

@rooong
Copy link
Author

rooong commented Feb 23, 2024

分布式构建异常log2.txt
分布式构建异常log2
连接时,有njob值,后面host.njob访问的时候,有一台机器没值

@waruqi
Copy link
Member

waruqi commented Feb 23, 2024

连接完有值,应该会序列化存到本地,加载时候应该也有值才对。。

status = io.load(statusfile)

你可以继续调下。然后提个 pr 过来

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


There is a value after the connection, it should be serialized and saved locally, and there should be a value when loading. .

status = io.load(statusfile)

You can continue to adjust it. Then submit a pr

@rooong
Copy link
Author

rooong commented Feb 23, 2024

看了工程目录下.xmake/.../status.txt内容,将原有的远程服务器信息删了,重新连接,就可以了
PS:忘了保存原有的服务器信息了,不确定有什么区别

另外,可以复现的一个问题是,在分布式编译过程中,打断编译,然后关闭连接再分布式编译,很容易出现连不上远程服务问题,且远程服务器上分布式编译进程还在,且占用一定的CPU

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


After reading the contents of .xmake/.../status.txt in the project directory, delete the original remote server information and reconnect, it will be fine.
PS: I forgot to save the original server information, not sure what the difference is.

In addition, a reproducible problem is that during the distributed compilation process, if you interrupt the compilation, then close the connection and then perform distributed compilation, it is easy to fail to connect to the remote service, and the distributed compilation process is still on the remote server. and takes up a certain amount of CPU

@waruqi
Copy link
Member

waruqi commented Feb 23, 2024

PS:忘了保存原有的服务器信息了,不确定有什么区别

等下次复现的时候,贴下 这个文件内容

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


PS: I forgot to save the original server information, not sure what the difference is.

When it happens next time, I'll post the content of this file.

waruqi added a commit that referenced this issue Sep 11, 2024
@waruqi
Copy link
Member

waruqi commented Sep 11, 2024

应该可以了,xmake update -s dev

@waruqi waruqi added this to the v2.9.5 milestone Sep 11, 2024
@waruqi waruqi closed this as completed Sep 11, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


It should be OK, xmake update -s dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants