From owner-freebsd-hackers@freebsd.org Sun Apr 18 19:18:04 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA3215F1F45 for ; Sun, 18 Apr 2021 19:18:04 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound5c.ore.mailhop.org (outbound5c.ore.mailhop.org [54.244.192.240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FNfqJ1H63z4RhK for ; Sun, 18 Apr 2021 19:18:03 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1618773483; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=MJc/Va5xdL2ZsZFriNSzFe4fvIUymmG87sTICKKssbBGklegvxDFs/eT3sZ/5j33FWLM94mEBW1vJ MCMlpZypU+OD1U0zLcjEr3uCL5dqaW5GMs0hw7d53A7tronJRPk8OcFxDg4VN2JarKrhYk8F6TZg/0 zoROZfswZDh0cJF0HH9k7CSeM3d7t8DHqcr9L3/xsSuReHisWwvRGK3chnLxJUTC97leMEvt/2pmLw CYoxLFNJyk/AasQUab5a6ZyEhrWHSZX3aQ3T2RD+hJQTOGkma/iRjh7DSguEDZ958EJ+AIG1VhGCGt eIQrcPK2kYmQzEWJKzzSQ6zAEOaL05w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=5TonFhlQAE37qSM/rJm5tddBGrmOCkiAgIamAXTGP4Q=; b=gSAsHz8r/eAdAQfSBkS2ukuRbvUD2eeu7aTDdQEXd174ojr7mLMw0lXK2BtA5xAA+xFZ2CacV+YZ1 0qJEkvccdzbhHXLxEzIXBHa4dhCv6bDtPnWZd3Dc9nwPV/ZxRET6fmJJzRApIyxntUHpi/LMov14jU peXpo9iZqpzuOEDDQrtoacZ+90d7On1VLRbyQ2/+KJkLi0KEo688W0U5fQ8uf6CB9GB8bh89Fx+Jyx CuS4q/btJiEJPx8Z+1bcE4uxgJ2RNgBm6DPRHVnS+dqQB8QLC6vfeYp9Pk/B1CGu9K2nND6CioD8U4 3UDp/UhLm3I6aZI/Cd9Ef8vAYo1efdg== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=5TonFhlQAE37qSM/rJm5tddBGrmOCkiAgIamAXTGP4Q=; b=IJwjaIgNMAN+cHb+Z+Z5PKzE0R2Ds4CEuqVaZNhahA/WptCdUui7cD1mIRv+tXK6JS3vhQSbcIPQN KmeLbX4zXGWJO66a0Rd5Kpy8wyE6uEnxqnM7tUksf3F/xZQ2GeT9fdTajyBpYUmBtnMgw5HsFkU14o im2+PkLBl/spkqEBmN3x7g+Bl2UbGq4Q9VOMr2fbHybrN2Il8TL7nIiYr6q8qvdyK4a8ouuwR1vpcJ umjLgn43yNrqYO05mIv15XzWYkwjjDpCAj3epe3qOODIh96/VJ96CF32h2pBhI2NKAg0xwdessBjWg bPYJ31b58IogH439egEEf2nVdIU7InA== X-Originating-IP: 67.177.211.60 X-MHO-RoutePath: aGlwcGll X-MHO-User: ca52ff16-a07a-11eb-bcab-bf9d68d023b6 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id ca52ff16-a07a-11eb-bcab-bf9d68d023b6; Sun, 18 Apr 2021 19:18:01 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 13IJI0DX040501; Sun, 18 Apr 2021 13:18:00 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <9d3b5c0cc7051f410fd04ff9ffba8aa0b5b32167.camel@freebsd.org> Subject: Re: Debugging signal 11 From: Ian Lepore To: Lucas Nali de =?ISO-8859-1?Q?Magalh=E3es?= , freebsd-hackers@freebsd.org Date: Sun, 18 Apr 2021 13:18:00 -0600 In-Reply-To: <4AF3D639-FB07-46B5-9058-114576BD4EDB@gmail.com> References: <4AF3D639-FB07-46B5-9058-114576BD4EDB@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4FNfqJ1H63z4RhK X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:54.244.128.0/17, country:US] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 19:18:04 -0000 On Sun, 2021-04-18 at 15:53 -0300, Lucas Nali de Magalhães wrote: > This also isn't the usual. Debugging a running process is possible but > the process you used is the wrong one. Debugging init, OTOH, is a > completely different story: init is the first process and is the most > important process of any unix. The actual command varies from > debugger to debugger but in gdb, "attach pid" may do the trick for > you. You will need to be extra cautious because of you are aiming init. > Ideally, init is the process supposed to catch the signals and keep > the system running. So a break into it may cause your system to crash. Given that it is init that is segfaulting, how to you propose that the OP lauch gdb in order to do an attach to init? In other words: there is a reason the OP is trying to use the kernel debugger to examine what's going on here. -- Ian