Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 934067 Details for
Bug 1136836
dhcp: DHCP client exits abnormally when journald is restarted
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[PATCH] RHEL7 patch fixing the issue
0001-dhcp-prevent-DHCP-client-from-being-killed-by-SIGPIP.patch (text/plain), 6.83 KB, created by
Jirka Klimes
on 2014-09-03 12:17:51 UTC
(
hide
)
Description:
[PATCH] RHEL7 patch fixing the issue
Filename:
MIME Type:
Creator:
Jirka Klimes
Created:
2014-09-03 12:17:51 UTC
Size:
6.83 KB
patch
obsolete
>From d1f442344f3f63ff5e625d50a9047a41965ff379 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com> >Date: Wed, 3 Sep 2014 13:09:20 +0200 >Subject: [PATCH] dhcp: prevent DHCP client from being killed by SIGPIPE (rh > #1136836) >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Resolves: #1136836 > >Signed-off-by: JiÅà KlimeÅ¡ <jklimes@redhat.com> >--- > 0034-rh1136836-dhcp-sigpipe.patch | 117 ++++++++++++++++++++++++++++++++++++++ > NetworkManager.spec | 7 ++- > 2 files changed, 123 insertions(+), 1 deletion(-) > create mode 100644 0034-rh1136836-dhcp-sigpipe.patch > >diff --git a/0034-rh1136836-dhcp-sigpipe.patch b/0034-rh1136836-dhcp-sigpipe.patch >new file mode 100644 >index 0000000..eded114 >--- /dev/null >+++ b/0034-rh1136836-dhcp-sigpipe.patch >@@ -0,0 +1,117 @@ >+From faf91592216dfa9862e8c1d15e29a5364f014ccf Mon Sep 17 00:00:00 2001 >+From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com> >+Date: Wed, 3 Sep 2014 12:45:58 +0200 >+Subject: [PATCH] dhcp: prevent DHCP client from being killed by SIGPIPE (bgo >+ #) >+MIME-Version: 1.0 >+Content-Type: text/plain; charset=UTF-8 >+Content-Transfer-Encoding: 8bit >+ >+DHCP client may be killed by SIGPIPE when attempting to write to a broken pipe. >+This can be observed, for example, when journald is restarted. >+Fix that by ignoring SIGPIPE in the DHCP client. Actually, systemd also ignores >+SIGPIPE for its services, by default: >+http://cgit.freedesktop.org/systemd/systemd/commit/?id=353e12c2f4a9e96a47eb80b80d2ffb7bc1d44a1b >+ >+Testcase: >+- start a NetworkManager service by systemd >+- activate an DHCP ethernet connection >+- sudo systemctl restart systemd-journald.service >+- reactive the ethernet connection (nmcli con up <my-eth>) >+- DHCP client is killed by SIGPIPE right after its startup: >+ <info> (enp0s25): DHCPv4 client pid 13959 exited with status -1 >+ <warn> DHCP client died abnormally >+ >+Signed-off-by: JiÅà KlimeÅ¡ <jklimes@redhat.com> >+(cherry picked from commit faf91592216dfa9862e8c1d15e29a5364f014ccf) >+ >+Edited to apply to RHEL 7 cleanly. >+--- >+ src/dhcp-manager/nm-dhcp-client.c | 35 ++++++++++++++++++++++------------- >+ src/dhcp-manager/nm-dhcp-dhclient.c | 5 +++++ >+ src/dhcp-manager/nm-dhcp-dhcpcd.c | 5 +++++ >+ 3 files changed, 32 insertions(+), 13 deletions(-) >+ >+diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c >+index dc23490..a3ee03f 100644 >+--- a/src/dhcp-manager/nm-dhcp-client.c >++++ b/src/dhcp-manager/nm-dhcp-client.c >+@@ -306,21 +306,30 @@ daemon_watch_cb (GPid pid, gint status, gpointer user_data) >+ NMDHCPClient *self = NM_DHCP_CLIENT (user_data); >+ NMDHCPClientPrivate *priv = NM_DHCP_CLIENT_GET_PRIVATE (self); >+ NMDHCPState new_state; >++ guint64 log_domain; >++ guint ip_ver; >++ >++ log_domain = priv->ipv6 ? LOGD_DHCP6 : LOGD_DHCP4; >++ ip_ver = priv->ipv6 ? 6 : 4; >++ >++ if (WIFEXITED (status)) >++ nm_log_info (log_domain, "(%s): DHCPv%d client pid %d exited with status %d", >++ priv->iface, ip_ver, pid, WEXITSTATUS (status)); >++ else if (WIFSIGNALED (status)) >++ nm_log_info (log_domain, "(%s): DHCPv%d client pid %d killed by signal %d", >++ priv->iface, ip_ver, pid, WTERMSIG (status)); >++ else if (WIFSTOPPED(status)) >++ nm_log_info (log_domain, "(%s): DHCPv%d client pid %d stopped by signal %d", >++ priv->iface, ip_ver, pid, WSTOPSIG (status)); >++ else if (WIFCONTINUED (status)) >++ nm_log_info (log_domain, "(%s): DHCPv%d client pid %d resumed (by SIGCONT)", >++ priv->iface, ip_ver, pid); >++ else >++ nm_log_warn (LOGD_DHCP, "DHCP client died abnormally"); >+ >+- if (priv->ipv6) { >+- nm_log_info (LOGD_DHCP6, "(%s): DHCPv6 client pid %d exited with status %d", >+- priv->iface, pid, >+- WIFEXITED (status) ? WEXITSTATUS (status) : -1); >+- } else { >+- nm_log_info (LOGD_DHCP4, "(%s): DHCPv4 client pid %d exited with status %d", >+- priv->iface, pid, >+- WIFEXITED (status) ? WEXITSTATUS (status) : -1); >+- } >+- >+- if (!WIFEXITED (status)) { >++ if (!WIFEXITED (status)) >+ new_state = DHC_ABEND; >+- nm_log_warn (LOGD_DHCP, "DHCP client died abnormally"); >+- } else >++ else >+ new_state = DHC_END; >+ >+ watch_cleanup (self); >+diff --git a/src/dhcp-manager/nm-dhcp-dhclient.c b/src/dhcp-manager/nm-dhcp-dhclient.c >+index f2fe290..8b8cd3c 100644 >+--- a/src/dhcp-manager/nm-dhcp-dhclient.c >++++ b/src/dhcp-manager/nm-dhcp-dhclient.c >+@@ -322,6 +322,11 @@ dhclient_child_setup (gpointer user_data G_GNUC_UNUSED) >+ * mask for dhclient here so that it can receive signals. >+ */ >+ nm_unblock_posix_signals (NULL); >++ >++ /* Ignore SIGPIPE. >++ * Otherwise dhclient can be killed with it (when journald is restarted, for example). >++ */ >++ signal (SIGPIPE, SIG_IGN); >+ } >+ >+ static GPid >+diff --git a/src/dhcp-manager/nm-dhcp-dhcpcd.c b/src/dhcp-manager/nm-dhcp-dhcpcd.c >+index fa2bcaf..bd9774d 100644 >+--- a/src/dhcp-manager/nm-dhcp-dhcpcd.c >++++ b/src/dhcp-manager/nm-dhcp-dhcpcd.c >+@@ -84,6 +84,11 @@ dhcpcd_child_setup (gpointer user_data G_GNUC_UNUSED) >+ * mask for dhcpcd here so that it can receive signals. >+ */ >+ nm_unblock_posix_signals (NULL); >++ >++ /* Ignore SIGPIPE. >++ * Otherwise dhcpcd can be killed with it (when journald is restarted, for example). >++ */ >++ signal (SIGPIPE, SIG_IGN); >+ } >+ >+ static GPid >+-- >+1.7.11.7 >+ >diff --git a/NetworkManager.spec b/NetworkManager.spec >index 6216706..b164fd1 100644 >--- a/NetworkManager.spec >+++ b/NetworkManager.spec >@@ -28,7 +28,7 @@ Name: NetworkManager > Summary: Network connection manager and user applications > Epoch: 1 > Version: %{realversion} >-Release: 31%{snapshot}%{?git_sha}%{?dist} >+Release: 31t%{snapshot}%{?git_sha}%{?dist} > Group: System Environment/Base > License: GPLv2+ > URL: http://www.gnome.org/projects/NetworkManager/ >@@ -70,6 +70,7 @@ Patch30: 0030-rh1105770-ifcfg-rh-GATEWAY.patch > Patch31: 0031-rh1094296-nmcli-secondaries.patch > Patch32: 0032-rh1034150-delete-sw-device.patch > Patch33: 0033-rh1007365-nmcli-readline.patch >+Patch34: 0034-rh1136836-dhcp-sigpipe.patch > > BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) > >@@ -254,6 +255,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment. > %patch31 -p1 -b .0031-rh1094296-nmcli-secondaries.orig > %patch32 -p1 -b .0032-rh1034150-delete-sw-device.orig > %patch33 -p1 -b .0033-rh1007365-nmcli-readline.orig >+%patch34 -p1 -b .0034-rh1136836-dhcp-sigpipe.orig > > %build > >@@ -474,6 +476,9 @@ fi > %endif > > %changelog >+* Wed Sep 3 2014 JiÅà KlimeÅ¡ <jklimes@redhat.com> - 1:0.9.9.1-31t.git20140326 >+- dhcp: prevent DHCP client from being killed by SIGPIPE (rh #1136836) >+ > * Thu Aug 21 2014 JiÅà KlimeÅ¡ <jklimes@redhat.com> - 1:0.9.9.1-31.git20140326 > - core, cli: D-Bus Delete() call; 'nmcli device delete <ifname>' for SW devices (rh #1034150) > - cli: use readline library throughout nmcli when asking for input (rh #1007365) >-- >1.7.11.7 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1136836
: 934067