From owner-freebsd-hackers@freebsd.org Sun Apr 18 20:06:58 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 A6A6F5F36D8 for ; Sun, 18 Apr 2021 20:06:58 +0000 (UTC) (envelope-from rollingbits@gmail.com) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FNgvj6njHz4TrS for ; Sun, 18 Apr 2021 20:06:57 +0000 (UTC) (envelope-from rollingbits@gmail.com) Received: by mail-qt1-x831.google.com with SMTP id m16so24055041qtx.9 for ; Sun, 18 Apr 2021 13:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:in-reply-to:to; bh=BFL+0RPZtMq8mOm4NrRshzGuhm6jGk5EtLHRsjmhG9k=; b=BIiikExlKRg911V9oTPfUqUcaRizqdAEjuLYqKsWJDlRqFe6+Te7CYcxYrRqzAb/MI ueievYJKyo4dxAlnb+54HtbYRGmu0YrJzbZcpa/s/z2jds8tRjOUsF7ndpKnmwCyuhyI jnU8f0J7x/OWFqLlnRx8sO4WX2EgrGc6slYm84hVMFEtCj1FDWP8sP7knzMv6metHx+c 3rLlyuR1sdwkLVbpdXtMxG2/2R76fYr3N8mR+1ZG9mv1v5bIOiCuVsa9SCtE421JXftg 9UBrLWw1oVFDvc21QA1VxseLJxMSkeHQjOKAyiHQM9PMUWeXxZ1M1cIKcAfR2IKVsi5J 5jng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:in-reply-to:to; bh=BFL+0RPZtMq8mOm4NrRshzGuhm6jGk5EtLHRsjmhG9k=; b=lcjlWFJz64zyXNR7PhSeGMlywRWP3iUdYsy0T46zEjH/YbHG8d3BsxPYOEVcaTzYAE SdXwIoZBO6XGtum7aC/BnaaJb/1rRrSgf90Q5NmA1hu1zFFp/+QH1qLY0OEZowOodttb /7pZxwiW2yGvJUaBOVVeK4a5WmTnwqzYFhmaF2StY5yUj12IiM1QKcrbrVkxbnyPgC0H e6f8d2eXZGWxnuNbPWtOab1ZM0/VcY4sYXzDi6gL9v4zwWj48jxj4zx45Kj/Ny+na7yS d91g/rOCThX/Rs60wc+7tSCV9s3rgNIOShetVDVUUvOHfNY4q8waTKkReSzeIjwXa1IG 7XZQ== X-Gm-Message-State: AOAM532fXOSdFDsSSgV0oJbrXUxXywHqAL0PZJE0EYX4JdanZuNSsVdD NZRSkSsbwIVtTi2G6gskh4lfjpUJ278= X-Google-Smtp-Source: ABdhPJzOuePzKr9yID6o04oQECylu3TM2oEre3HL4+2JezR1jaiAVPXUf6obu2JNl05cMDhrCn01WA== X-Received: by 2002:a05:622a:486:: with SMTP id p6mr8872776qtx.98.1618776416741; Sun, 18 Apr 2021 13:06:56 -0700 (PDT) Received: from ?IPv6:2804:389:1059:2519:10e0:67ed:2490:5874? ([2804:389:1059:2519:10e0:67ed:2490:5874]) by smtp.gmail.com with ESMTPSA id i10sm7988708qko.114.2021.04.18.13.06.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Apr 2021 13:06:56 -0700 (PDT) From: =?utf-8?Q?Lucas_Nali_de_Magalh=C3=A3es?= Mime-Version: 1.0 (1.0) Subject: Re: Debugging signal 11 Date: Sun, 18 Apr 2021 17:06:54 -0300 Message-Id: References: <9d3b5c0cc7051f410fd04ff9ffba8aa0b5b32167.camel@freebsd.org> In-Reply-To: <9d3b5c0cc7051f410fd04ff9ffba8aa0b5b32167.camel@freebsd.org> To: freebsd-hackers@freebsd.org X-Mailer: iPhone Mail (18D70) X-Rspamd-Queue-Id: 4FNgvj6njHz4TrS X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=BIiikExl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rollingbits@gmail.com designates 2607:f8b0:4864:20::831 as permitted sender) smtp.mailfrom=rollingbits@gmail.com X-Spamd-Result: default: False [-2.75 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.87)[-0.875]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_MIXED_CHARSET(0.62)[subject]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::831:from]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::831:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::831:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 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 20:06:58 -0000 On Apr 18, 2021, at 4:18 PM, Ian Lepore wrote: >=20 > =EF=BB=BFOn Sun, 2021-04-18 at 15:53 -0300, Lucas Nali de Magalh=C3=A3es w= rote: >> 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. >=20 > 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. First the OP was able to modify init. Then it was asked the command to do a stack trace. Thus the OP clearly hasn't the full knowledge of the procedure and the risks. Besides this, kgdb is based on gdb. I thought they should know. --=20 rollingbits =E2=80=94 =F0=9F=93=A7 rollingbits@icloud.com =F0=9F=93=A7 rolli= ngbits@gmail.com =F0=9F=93=A7 rollingbits@yahoo.com =F0=9F=93=A7 rollingbits= @terra.com.br =F0=9F=93=A7 rollingbits@globo.com