admin管理员组文章数量:1396763
I have build.xml trigger from Java application. it contains exec
task similar to below to call osgi based Java service
<exec dir="${dir}" executable="${root}/rrb"
failonerror="true" resultproperty="exit.code">
<arg value="${build.id}:${build.id}"/>
<arg value="-buildFile" />
<arg value="${shareFile}" />
<arg value="-buildFile" />
<arg value="${propertyFile}" />
</exec>
These services are running using RHEL 8.10.
In case of successful completion with exit code 0 everything working fine and both the process successfully terminate from the server while in case of failure (exit code 1) these processes remain active even after completion of process execution.
Below is the output of strace
command for child process. It looks to me that output stream is blocked between parent (ant) and child (osgi service) and they are waiting for indefinite time
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}], 3, 0) = 0 (Timeout)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=6, events=POLLIN}], 3, -1
When I do netstat
of child process found below:
unix 3 [ ] STREAM CONNECTED 1498769 79243/rrb
unix 3 [ ] STREAM CONNECTED 1498768 79243/rrb
unix 3 [ ] STREAM CONNECTED 1498765 79243/rrb
Can you please help me to understand why this is happening?
本文标签: linuxOSGi based java process blocked when called using apache ant based exec taskStack Overflow
版权声明:本文标题:linux - OSGi based java process blocked when called using apache ant based exec task - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744145224a2592804.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论