Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CB1B8200C17 for ; Fri, 10 Feb 2017 15:07:46 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C9A71160B5C; Fri, 10 Feb 2017 14:07:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E8F58160B5B for ; Fri, 10 Feb 2017 15:07:45 +0100 (CET) Received: (qmail 63060 invoked by uid 500); 10 Feb 2017 14:07:45 -0000 Mailing-List: contact issues-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list issues@mesos.apache.org Received: (qmail 63051 invoked by uid 99); 10 Feb 2017 14:07:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2017 14:07:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id AB500C3ABA for ; Fri, 10 Feb 2017 14:07:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id p-ELSvUJsfBl for ; Fri, 10 Feb 2017 14:07:43 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 4780E60F39 for ; Fri, 10 Feb 2017 14:07:43 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 80403E05E9 for ; Fri, 10 Feb 2017 14:07:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id DD86A21D6D for ; Fri, 10 Feb 2017 14:07:41 +0000 (UTC) Date: Fri, 10 Feb 2017 14:07:41 +0000 (UTC) From: "Bruce Merry (JIRA)" To: issues@mesos.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MESOS-2369) Segfault when mesos-slave tries to clean up docker containers on startup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 10 Feb 2017 14:07:47 -0000 [ https://issues.apache.org/jira/browse/MESOS-2369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15861315#comment-15861315 ] Bruce Merry commented on MESOS-2369: ------------------------------------ Confirmed on another machine, this time running Ubuntu 16.04, again with Mesos 1.1.0 from the Mesosphere PPA. To reproduce (as root): 1. for i in {1..4000}; do docker run ubuntu:xenial-20161010 /bin/true; done 2. service mesos-slave stop 3. MESOS_RECOVER=cleanup mesos-init-wrapper slave I found that 3000 wasn't enough to trigger the segfault, but 4000 was. If I run "ulimit -s 32768" first, then the segfault does not occur, so it is presumably a stack overflow. I'm not sure if this is related to MESOS_RECOVER=cleanup at all; I included it since that where I first encountered the issue. > Segfault when mesos-slave tries to clean up docker containers on startup > ------------------------------------------------------------------------ > > Key: MESOS-2369 > URL: https://issues.apache.org/jira/browse/MESOS-2369 > Project: Mesos > Issue Type: Bug > Components: docker > Affects Versions: 0.21.1 > Environment: Debian Jessie, mesos package 0.21.1-1.2.debian77 > docker 1.3.2 build 39fa2fa > Reporter: Pas > > I did a gdb backtrace, it seems like a stack overflow due to a bit too much recursion. > The interesting aspect is that after running mesos-slave with strace -f -b execve it successfully proceeded with the docker cleanup. However, there were a few strace sessions (on other slaves) where I was able to observe the SIGSEGV, and it was around (or a bit before) the "docker ps -a" call, because docker got a broken pipe shortly, then got killed by the propagating SIGSEGV signal. > {code} > .... > #59296 0x00007ffff6e7cd98 in process::Future process::Future::then(std::tr1::function (unsigned long const&)> const&) const () from /usr/local/lib/libmesos-0.21.1.so > #59297 0x00007ffff6e4f5d3 in process::io::internal::_read(int, std::tr1::shared_ptr const&, boost::shared_array const&, unsigned long) () from /usr/local/lib/libmesos-0.21.1.so > #59298 0x00007ffff6e5012c in process::io::internal::__read(unsigned long, int, std::tr1::shared_ptr const&, boost::shared_array const&, unsigned long) () from /usr/local/lib/libmesos-0.21.1.so > #59299 0x00007ffff6e53000 in std::tr1::_Function_handler (unsigned long const&), std::tr1::_Bind (*(std::tr1::_Placeholder<1>, int, std::tr1::shared_ptr, boost::shared_array, unsigned long))(unsigned long, int, std::tr1::shared_ptr const&, boost::shared_array const&, unsigned long)> >::_M_invoke(std::tr1::_Any_data const&, unsigned long const&) () from /usr/local/lib/libmesos-0.21.1.so > #59300 0x00007ffff6e7d23b in void process::internal::thenf(std::tr1::shared_ptr > const&, std::tr1::function (unsigned long const&)> const&, process::Future const&) () > from /usr/local/lib/libmesos-0.21.1.so > #59301 0x00007ffff689ee60 in process::Future::onAny(std::tr1::function const&)> const&) const () from /usr/local/lib/libmesos-0.21.1.so > #59302 0x00007ffff6e7cd98 in process::Future process::Future::then(std::tr1::function (unsigned long const&)> const&) const () from /usr/local/lib/libmesos-0.21.1.so > #59303 0x00007ffff6e4f5d3 in process::io::internal::_read(int, std::tr1::shared_ptr const&, boost::shared_array const&, unsigned long) () from /usr/local/lib/libmesos-0.21.1.so > #59304 0x00007ffff6e5012c in process::io::internal::__read(unsigned long, int, std::tr1::shared_ptr const&, boost::shared_array const&, unsigned long) () from /usr/local/lib/libmesos-0.21.1.so > #59305 0x00007ffff6e53000 in std::tr1::_Function_handler (unsigned long const&), std::tr1::_Bind (*(std::tr1::_Placeholder<1>, int, std::tr1::shared_ptr, boost::shared_array, unsigned long))(unsigned long, int, std::tr1::shared_ptr const&, boost::shared_array const&, unsigned long)> >::_M_invoke(std::tr1::_Any_data const&, unsigned long const&) () from /usr/local/lib/libmesos-0.21.1.so > #59306 0x00007ffff6e7d23b in void process::internal::thenf(std::tr1::shared_ptr > const&, std::tr1::function (unsigned long const&)> const&, process::Future const&) () > from /usr/local/lib/libmesos-0.21.1.so > #59307 0x00007ffff689ee60 in process::Future::onAny(std::tr1::function const&)> const&) const () from /usr/local/lib/libmesos-0.21.1.so > #59308 0x00007ffff6e7cd98 in process::Future process::Future::then(std::tr1::function (unsigned long const&)> const&) const () from /usr/local/lib/libmesos-0.21.1.so > #59309 0x00007ffff6e4f5d3 in process::io::internal::_read(int, std::tr1::shared_ptr const&, boost::shared_array const&, unsigned long) () from /usr/local/lib/libmesos-0.21.1.so > #59310 0x00007ffff6e5012c in process::io::internal::__read(unsigned long, int, std::tr1::shared_ptr const&, boost::shared_array const&, unsigned long) () from /usr/local/lib/libmesos-0.21.1.so > #59311 0x00007ffff6e53000 in std::tr1::_Function_handler (unsigned long const&), std::tr1::_Bind (*(std::tr1::_Placeholder<1>, int, std::tr1::shared_ptr, boost::shared_array, unsigned long))(unsigned long, int, std::tr1::shared_ptr const&, boost::shared_array const&, unsigned long)> >::_M_invoke(std::tr1::_Any_data const&, unsigned long const&) () from /usr/local/lib/libmesos-0.21.1.so > #59312 0x00007ffff6e7d23b in void process::internal::thenf(std::tr1::shared_ptr > const&, std::tr1::function (unsigned long const&)> const&, process::Future const&) () > from /usr/local/lib/libmesos-0.21.1.so > #59313 0x00007ffff689ee60 in process::Future::onAny(std::tr1::function const&)> const&) const () from /usr/local/lib/libmesos-0.21.1.so > #59314 0x00007ffff6e7cd98 in process::Future process::Future::then(std::tr1::function (unsigned long const&)> const&) const () from /usr/local/lib/libmesos-0.21.1.so > #59315 0x00007ffff6e4f5d3 in process::io::internal::_read(int, std::tr1::shared_ptr const&, boost::shared_array const&, unsigned long) () from /usr/local/lib/libmesos-0.21.1.so > #59316 0x00007ffff6e5012c in process::io::internal::__read(unsigned long, int, std::tr1::shared_ptr const&, boost::shared_array const&, unsigned long) () from /usr/local/lib/libmesos-0.21.1.so > #59317 0x00007ffff6e53000 in std::tr1::_Function_handler (unsigned long const&), std::tr1::_Bind (*(std::tr1::_Placeholder<1>, int, std::tr1::shared_ptr, boost::shared_array, unsigned long))(unsigned long, int, std::tr1::shared_ptr const&, boost::shared_array const&, unsigned long)> >::_M_invoke(std::tr1::_Any_data const&, unsigned long const&) () from /usr/local/lib/libmesos-0.21.1.so > #59318 0x00007ffff6e7d23b in void process::internal::thenf(std::tr1::shared_ptr > const&, std::tr1::function (unsigned long const&)> const&, process::Future const&) () > from /usr/local/lib/libmesos-0.21.1.so > #59319 0x00007ffff6c0f138 in process::Future::set(unsigned long const&) () from /usr/local/lib/libmesos-0.21.1.so > #59320 0x00007ffff6e46a64 in process::io::internal::read(int, void*, unsigned long, std::tr1::shared_ptr > const&, process::Future const&) () from /usr/local/lib/libmesos-0.21.1.so > #59321 0x00007ffff6e59508 in process::Future::set(short const&) () from /usr/local/lib/libmesos-0.21.1.so > #59322 0x00007ffff6e59469 in process::Future::set(short const&) () from /usr/local/lib/libmesos-0.21.1.so > #59323 0x00007ffff6e3422e in process::polled(ev_loop*, ev_io*, int) () from /usr/local/lib/libmesos-0.21.1.so > #59324 0x00007ffff6ead365 in ev_invoke_pending (loop=0x7ffff7ddb460 ) at ev.c:2994 > #59325 0x00007ffff6eb03c5 in ev_run (loop=0x7ffff7ddb460 , flags=) at ev.c:3394 > #59326 0x00007ffff6e3235b in process::serve(void*) () from /usr/local/lib/libmesos-0.21.1.so > #59327 0x00007ffff474d0a4 in start_thread (arg=0x7fffebe27700) at pthread_create.c:309 > #59328 0x00007ffff4481ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)