Bug 1369369 - systemctl start xxx hung, strace -p pid show: recvmsg(4, 0x7fffd1450970, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
Summary: systemctl start xxx hung, strace -p pid show: recvmsg(4, 0x7fffd1450970, MSG_...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd-container
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-23 08:51 UTC by yzh
Modified: 2016-10-18 11:34 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-18 11:34:06 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description yzh 2016-08-23 08:51:56 UTC
Description of problem:
1、I have two service hung when systemctl start xxx(but this rarely happens ):
a、
/bin/bash -xe ./post_deploy.d/sso_proxy.sh
 \_ /bin/bash -xe ./resources/sso_proxy/install.sh
     \_ systemctl start hssoproxy
b、
/bin/hotplugusb
  \_sh -c systemctl start authorize_server
     \_systemctl start authorize_server

2、Two service didn't do anything else, except calling  daemon(), When systemctl start the service;

3、strace -p pid -s 1024 :
ppoll([{fd=4, events=POLLIN}], 1, NULL, NULL, 8) = 1 ([{fd=4, revents=POLLIN}])
recvmsg(4, {msg_name(0)=NULL, msg_iov(1)=[{"l\4\1\1I\0\0\0\233\245\1\0p\0\0\0\1\1o\0\31\0\0\0", 24}], msg_controllen=32, {cmsg_len=28, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS{pid=1, uid=0, gid=0}}, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = 24
..........................
recvmsg(4, 0x7fffd1450970, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)

ppoll([{fd=4, events=POLLIN}], 1, NULL, NULL, 8) = 1 ([{fd=4, revents=POLLIN}])
...........
recvmsg(4, 0x7fffd1450970, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)

Two services are like this, as the above has been circulating.

Version-Release number of selected component (if applicable):


How reproducible:
This situation rarely occurs, the phenomenon is difficult to reproduce

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

yzh 2016-08-22 07:00:11 EDT
(In reply to Lukáš Nykrýn from comment #2)
> It is better to use --no-block when you are calling systemctl from script.
> Especially when tehere is a chance that that script will be called from
> systemd service.

I don't understander the means what's you said. What is the reason for this service to hung?  What can I do to solve this problem,or to avoid the problem? I think this a bug of systemd, because of i didn't do anything, except call daemon(), And I think other service also have the problem when systemctl start xxx .

-----------------------------------------------------------------------------------

yzh 2016-08-23 03:58:41 EDT
Hi, 
  There is a lot of service hung when systemctl start xxx today. The services also didn't do anything, except call daemon(). 
  I find the process of the service socket with pid = 1(/usr/lib/systemd/systemd --switched-root),so the log of strace is systemctl Internal socket communication. 
  You give advice to use --no-block, I think it is no use, because of my service is xxxx.service , no xxxx.socket.  
  I need your help, and now this problem has affected the normal work. I hope you can give me some advice to avoid the problem. Had better be able to find the cause of the problem, I also look at the code here to find way to solve the problem.
  Thank you very much.

Comment 2 Jan Synacek 2016-10-18 11:34:06 UTC
This is not a valid bug report. Also, systemd-container is not present in RHEL-7 anymore.


Note You need to log in before you can comment on or make changes to this bug.