質問

CIサーバーでユニットテストの1つをデバッグしている間に興味深いものが発生しました(実際にはMavenビルド)。 Javaプロセスに接続します 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 信号。

ビルドは正しく終了します(1つの壊れたテストのみ)。状況を決定し、何度も何度も再現します。これは何を意味するのでしょうか?

役に立ちましたか?

解決

これはJavaであるため、JVMがSigsegvsを何かに使用していることを意味します。一般的な用途には含まれます

  • Null Pointerの控除-JVMはSigseGVをキャッチして0に対処し、それらをNullPointerExceptionsに変換します

  • ガベージコレクションの書き込み障壁 - めったに変更されていないページは、読み取り専用とマークされており、SEGVS Catchはそれらに書き込みをします。このようにして、ゴミコレクターは常にメモリをすべて再実行する必要はありません。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top