当我调试CI服务器上的单元测试之一时,发生了有趣的事情(实际上是Maven Build)。我通过 strace -ff -e trace=network -p [pid] 追踪构建过程的网络活动。这就是我看到的:

Process 26324 attached
Process 26325 attached (waiting for parent)
Process 26325 resumed (parent 26312 ready)
Process 26325 detached
Process 26324 detached
Process 26320 detached
Process 26317 detached
Process 26308 resumed
[pid 26308] --- SIGCHLD (Child exited) @ 0 (0) ---
Process 26307 resumed
Process 26308 detached
[pid 26310] --- SIGCHLD (Child exited) @ 0 (0) ---
Process 26310 detached
[pid 25551] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 26309 detached
Process 26307 detached
[pid 25717] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
[pid 25715] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
[pid 25713] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
[pid 25551] socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 163
[pid 25551] setsockopt(163, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
[pid 25551] bind(163, {sa_family=AF_INET, sin_port=htons(6590), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
Process 26471 attached (waiting for parent)
Process 26471 resumed (parent 25551 ready)
[pid 25551] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
[pid 25551] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
[pid 26471] recvfrom(163,  <unfinished ...>
[pid 25551] socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 164
[pid 25551] setsockopt(164, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
[pid 25551] bind(164, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
[pid 25551] getsockname(164, {sa_family=AF_INET, sin_port=htons(45728), sin_addr=inet_addr("0.0.0.0")},[16]) = 0
[pid 25551] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
[pid 26471] <... recvfrom resumed> 0x8e80618, 65536, 0, 0x6ef6aea0, 0x6ef6ae9c) = ? ERESTARTSYS (To be restarted)
[pid 26471] --- SIGRT_29 (Real-time signal 27) @ 0 (0) ---
Process 26471 detached
Process 26472 attached (waiting for parent)
Process 26472 resumed (parent 25551 ready)
Process 26473 attached (waiting for parent)
Process 26473 resumed (parent 25551 ready)

因此,我们有一些网络活动(这是我实际搜索的),还有很多 SIGSEGV 信号。

正确构建完成(仅一个损坏的测试)。情况可以一遍又一遍地确定和复制。这是什么意思?

有帮助吗?

解决方案

由于这是Java,这意味着您的JVM正在使用Sigsegvs作为某物。常见用途包括

  • NULL指针删除 - JVM捕获SIGSEGV地址为0并将其转换为NullPoInterExceptions

  • 垃圾收集写入障碍 - 仅读取更改的页面,而SEGVS捕捉给他们写信。这样一来,垃圾收集器就不必始终恢复所有记忆。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top