xmake icon indicating copy to clipboard operation
xmake copied to clipboard

远程编译 Scanning files .. coredump

Open kench1994 opened this issue 4 months ago • 9 comments

Xmake 版本

3.0.4

操作系统版本和架构

Centos7(Linux aioCloud 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux)

描述问题

尝试使用xmake远程编译功能,本地是centos7,远程是windows connect指令后马上崩溃:

xmake service --connect   
<remote_build_client>: connect 192.168.30.226:9691 ..
<remote_build_client>: connected!
<remote_build_client>: sync files in 192.168.30.226:9691 ..
Scanning files ..
[1]    48339 segmentation fault (core dumped)  xmake service --connect

期待的结果

not coredump

工程配置

sample

附加信息和错误日志

xmake service --connect

kench1994 avatar Oct 23 '25 06:10 kench1994

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


Xmake version

3.0.4

Operating system version and architecture

Centos7(Linux aioCloud 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux)

Describe the problem

Try to use the xmake remote compilation function. The local one is centos7 and the remote one is windows. Crash immediately after the connect command:

xmake service --connect
<remote_build_client>: connect 192.168.30.226:9691 ..
<remote_build_client>: connected!
<remote_build_client>: sync files in 192.168.30.226:9691 ..
Scanning files..
[1] 48339 segmentation fault (core dumped) xmake service --connect

Expected results

not coredump

Project configuration

sample

Additional information and error logs

xmake service --connect

Issues-translate-bot avatar Oct 23 '25 06:10 Issues-translate-bot

这边没法复现,你可以先源码编译 debug 版本 bin core 后,用 gdb 调下,给下对应的栈

waruqi avatar Oct 23 '25 07:10 waruqi

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


It cannot be reproduced here. You can adjust gdb first and download the corresponding stack.

Issues-translate-bot avatar Oct 23 '25 07:10 Issues-translate-bot

这边没法复现,你可以先源码编译 debug 版本 bin core 后,用 gdb 调下,给下对应的栈

(gdb) bt
#0  0x000000000041eafc in xm_path_translate (lua=0xb0ff48) at core/src/xmake/path/translate.c:63
#1  0x70552f796e612f79 in ?? ()
#2  0x676f4c6564617267 in ?? ()
#3  0x547c6d74682e2a2a in ?? ()
#4  0x7472615064726968 in ?? ()
#5  0x2a2a2f796e612f79 in ?? ()
#6  0x6968547c66646d2e in ?? ()
#7  0x2f79747261506472 in ?? ()
#8  0x6c2e2a2a2f796e61 in ?? ()
#9  0x64726968547c6664 in ?? ()
#10 0x6e612f7974726150 in ?? ()
#11 0x6c64722e2a2a2f79 in ?? ()
#12 0x68547c617461642e in ?? ()
#13 0x7974726150647269 in ?? ()
#14 0x2e2a2a2f796e612f in ?? ()
#15 0x6f79616c2e6d6962 in ?? ()
#16 0x64726968547c7475 in ?? ()
#17 0x6e612f7974726150 in ?? ()
#18 0x6d69622e2a2a2f79 in ?? ()
#19 0x747465732e2a2a5f in ?? ()
#20 0x6968547c73676e69 in ?? ()
#21 0x2f79747261506472 in ?? ()
#22 0x656b61462f796e61 in ?? ()
#23 0x6c626d6573734173 in ?? ()
#24 0x2e7c2a2a2f736569 in ?? ()
#25 0x2e7c2a2a2f746967 in ?? ()
#26 0x2a2a2f656b616d78 in ?? ()
#27 0x0000000000b0ff00 in ?? ()
#28 0x0000000000000002 in ?? ()
#29 0x0000000000000008 in ?? ()
#30 0x0000000000000000 in ?? ()
(gdb) l
58          tb_char_t data[TB_PATH_MAXN];
59          tb_size_t size = tb_path_translate_to(path, (tb_size_t)path_size, data, sizeof(data), normalize);
60          if (size) lua_pushlstring(lua, data, (size_t)size);
61          else lua_pushnil(lua);
62          return 1;
63      }
(gdb) pwd
Working directory /home/rhel/workspace/svn/TiprayDLPII_Server/bigLd/source/_trial/_personal/huangchao/SqlCvt.
(gdb) p data
$1 = "/home/rhel/workspace/svn/TiprayDLPII_Server/bigLd/source/_trial/_personal/huangchao/SqlCvt/**|ThirdParty/any/Testing/**|ThirdParty/any/CMakeFiles/**|ThirdParty/any/CMakeCache.txt|ThirdParty/any/CMakeC"...
(gdb) p data[4095]
$3 = 84 'T'

data溢出了? 没去看这个功能,具体原因就不清楚了

kench1994 avatar Oct 23 '25 07:10 kench1994

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


It cannot be reproduced here. You can first compile the debug version bin core from the source code, then use gdb to adjust it and download the corresponding stack.

(gdb) bt
#0 0x000000000041eafc in xm_path_translate (lua=0xb0ff48) at core/src/xmake/path/translate.c:63
#1 0x70552f796e612f79 in ?? ()
#2 0x676f4c6564617267 in ?? ()
#3 0x547c6d74682e2a2a in ?? ()
#4 0x7472615064726968 in ?? ()
#5 0x2a2a2f796e612f79 in ?? ()
#6 0x6968547c66646d2e in ?? ()
#7 0x2f79747261506472 in ?? ()
#8 0x6c2e2a2a2f796e61 in ?? ()
#9 0x64726968547c6664 in ?? ()
#10 0x6e612f7974726150 in ?? ()
#11 0x6c64722e2a2a2f79 in ?? ()
#12 0x68547c617461642e in ?? ()
#13 0x7974726150647269 in ?? ()
#14 0x2e2a2a2f796e612f in ?? ()
#15 0x6f79616c2e6d6962 in ?? ()
#16 0x64726968547c7475 in ?? ()
#17 0x6e612f7974726150 in ?? ()
#18 0x6d69622e2a2a2f79 in ?? ()
#19 0x747465732e2a2a5f in ?? ()
#20 0x6968547c73676e69 in ?? ()
#21 0x2f79747261506472 in ?? ()
#22 0x656b61462f796e61 in ?? ()
#23 0x6c626d6573734173 in ?? ()
#24 0x2e7c2a2a2f736569 in ?? ()
#25 0x2e7c2a2a2f746967 in ?? ()
#26 0x2a2a2f656b616d78 in ?? ()
#27 0x0000000000b0ff00 in ?? ()
#28 0x0000000000000002 in ?? ()
#29 0x0000000000000008 in ?? ()
#30 0x0000000000000000 in ?? ()
(gdb) l
58 tb_char_t data[TB_PATH_MAXN];
59 tb_size_t size = tb_path_translate_to(path, (tb_size_t)path_size, data, sizeof(data), normalize);
60 if (size) lua_pushlstring(lua, data, (size_t)size);
61 else lua_pushnil(lua);
62 return 1;
63}
(gdb) pwd
Working directory /home/rhel/workspace/svn/TiprayDLPII_Server/bigLd/source/_trial/_personal/huangchao/SqlCvt.

Issues-translate-bot avatar Oct 23 '25 07:10 Issues-translate-bot

你切到 debug 编译试试,看看能否看到完整栈。

./configure --mode=debug
make

waruqi avatar Oct 23 '25 08:10 waruqi

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


You can switch to debug compilation and try to see if you can see the complete stack.

./configure --mode=debug
make

Issues-translate-bot avatar Oct 23 '25 08:10 Issues-translate-bot

或者试下用 xmake 去编译带 asan 版本的 bin 看下。

cd core
xmake f -m debug --policies=build.sanitizer.address
xmake
./build/xmake -- binary file

waruqi avatar Oct 23 '25 08:10 waruqi

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


Or try using xmake to compile the bin with asan version and take a look.

cd core
xmake f -m debug --policies=build.sanitizer.address
xmake
./build/xmake --binary file

Issues-translate-bot avatar Oct 23 '25 08:10 Issues-translate-bot