From owner-freebsd-stable@freebsd.org Thu Aug 27 18:54:25 2015 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44EB59C37EF for ; Thu, 27 Aug 2015 18:54:25 +0000 (UTC) (envelope-from boland37@xs4all.nl) Received: from lb1-smtp-cloud2.xs4all.net (lb1-smtp-cloud2.xs4all.net [194.109.24.21]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "*.xs4all.nl", Issuer "GlobalSign Domain Validation CA - SHA256 - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D6CB0394 for ; Thu, 27 Aug 2015 18:54:24 +0000 (UTC) (envelope-from boland37@xs4all.nl) Received: from charlemagne.a43.boland.org ([62.194.208.247]) by smtp-cloud2.xs4all.net with ESMTP id 9ut91r00N5LoPm601utAW9; Thu, 27 Aug 2015 20:53:11 +0200 Subject: Re: Latest stable (r287104) bash leaves zombies on exit To: Konstantin Belousov , Mark Martinec References: <63a84f64baf8768a551fc6464e8e9526@mailbox.ijs.si> <20150827162602.GJ2072@kib.kiev.ua> Cc: freebsd-stable@freebsd.org From: Michiel Boland Message-ID: <55DF5C95.90502@xs4all.nl> Date: Thu, 27 Aug 2015 20:53:09 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150827162602.GJ2072@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2015 18:54:25 -0000 The xterm program has a SIGCHLD signal handler that calls wait(). If the handler is invoked while xterm is exiting, a deadlock occurs in rtld. Cheers Michiel #0 _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:37 #1 0x000000080305a2b0 in __thr_rwlock_rdlock (rwlock=0x803272980, flags=, tsp=) at /usr/src/lib/libthr/thread/thr_umtx.c:277 #2 0x000000080306179c in _thr_rtld_rlock_acquire (lock=0x803272980) at thr_umtx.h:196 #3 0x00000008006a72c2 in rlock_acquire (lock=0x8008ba860, lockstate=0x7fffffffd5b8) at /usr/src/libexec/rtld-elf/rtld_lock.c:201 #4 0x00000008006a0c8d in _rtld_bind (obj=0x8006bc000, reloff=6840) at /usr/src/libexec/rtld-elf/rtld.c:701 #5 0x000000080069e46d in _rtld_bind_start () at /usr/src/libexec/rtld-elf/amd64/rtld_start.S:121 #6 0x0000000000445d34 in reapchild (n=20) at main.c:5177 #7 #8 objlist_call_fini () at /usr/src/libexec/rtld-elf/rtld.c:769 #9 0x00000008006a0c2b in rtld_exit () at /usr/src/libexec/rtld-elf/rtld.c:2710 #10 0x00000008024e5406 in __cxa_finalize (dso=0x0) at /usr/src/lib/libc/stdlib/atexit.c:200 #11 0x000000080248692c in exit (status=0) at /usr/src/lib/libc/stdlib/exit.c:67 #12 0x0000000000445f35 in Exit (n=0) at main.c:5078 #13 0x0000000000456020 in Cleanup (code=0) at misc.c:5238 #14 0x000000000044da49 in NormalExit () at misc.c:5222 #15 0x000000000045a616 in readPtyData (xw=0x804cdc000, select_mask=0x6add80, data=0x804d64000) at ptydata.c:221 #16 0x0000000000421c48 in in_put (xw=0x804cdc000) at charproc.c:4700 #17 0x0000000000421b6a in doinput () at charproc.c:4856 #18 0x000000000041d992 in VTparse (xw=0x804cdc000) at charproc.c:4382 #19 0x000000000041d87a in VTRun (xw=0x804cdc000) at charproc.c:6997 #20 0x0000000000442c01 in main (argc=3, argv=0x7fffffffe6d0) at main.c:2607 #6 0x0000000000445d34 in reapchild (n=20) at main.c:5177 5177 pid = wait(NULL); Current language: auto; currently minimal (gdb) l 5172 int olderrno = errno; 5173 int pid; 5174 5175 DEBUG_MSG("handle:reapchild\n"); 5176 5177 pid = wait(NULL); 5178