From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 50EE43898C6A for ; Mon, 5 Dec 2022 12:04:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 50EE43898C6A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670241894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3wZu0MOVL/HWGNubB7ylZkcxXNCE89jXhnP0IGddsws=; b=hPoXKvg+51BX1b31WdUIMJJnK+e/Zu9IhKKz7iP8x+oI5gVgdHqvRos17wdJ0vp+jcH2K5 aN4Yo0SmelN2VcHV+IGgk7hPawi+Dau1ksHbh5wrmuc0UITm6arlvbnX6zBxoDXdzAIFJR 1DWAHKOMbBBByg06cPmwNy1OlQFXD4s= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-661-v9Kyuzz9OiCZ14dkrUOwng-1; Mon, 05 Dec 2022 07:04:53 -0500 X-MC-Unique: v9Kyuzz9OiCZ14dkrUOwng-1 Received: by mail-wm1-f70.google.com with SMTP id s24-20020a7bc398000000b003d087485a9aso3063339wmj.1 for ; Mon, 05 Dec 2022 04:04:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3wZu0MOVL/HWGNubB7ylZkcxXNCE89jXhnP0IGddsws=; b=QWGZbKaD9PFQ/i5LeogPneozwXXmtMOFH/FyDPUPFwRGbDQo0cmBNkBh0UFQFO2+eX OUIloWQWVMT7ek+eH7cczDwCEPiCJWkYMi3qZ+vhXJPq1B/Lj6xd0F53qF+k1TN5TrEu xuZDpvt0P5zQEVPSCQh5sJip+5ElXcAdtNuyJ2sDj7Ym3hf2Wc91tIO1lpDiH1DneJXO IHVW/Ral+SjBHGmcKMwX0ut/3micZpTXDdMTek219+3HF+nMTkIA6sxs/oL031rSoBe/ agh+Ybh1Zz6ZtAk2V4GtSO/lET9fwppihcXCyyT/fOFFWwMDU7ketLYBLpCPzzab5NmV ykOA== X-Gm-Message-State: ANoB5pnwjPiJt4LEEfvws/ynYJIXNfZZdC/xLwGmoL05Ho9xpUS3uk9C t3kJqJkA2x+1UTV9RSmtJ54S/IlhdoFFD2tRHR4w3cydLWpf2yqacPBgyG6gP3iDXrUDczc9v8j 23DTRCEgkx7jtjQER1skidw== X-Received: by 2002:a05:6000:149:b0:242:6b35:598e with SMTP id r9-20020a056000014900b002426b35598emr1303375wrx.47.1670241892657; Mon, 05 Dec 2022 04:04:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf5YflyDtM1YXS7vr5S/61r19QHnxv+4VcV8O85anIjI0SpXce7hpPZOJE1ddm96Fx7b0GJDuQ== X-Received: by 2002:a05:6000:149:b0:242:6b35:598e with SMTP id r9-20020a056000014900b002426b35598emr1303363wrx.47.1670241892375; Mon, 05 Dec 2022 04:04:52 -0800 (PST) Received: from localhost ([31.111.84.238]) by smtp.gmail.com with ESMTPSA id o3-20020a1c7503000000b003b476cabf1csm7033065wmc.26.2022.12.05.04.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Dec 2022 04:04:52 -0800 (PST) From: Andrew Burgess To: Luis Machado , Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: relax requirement for the map_failed stap probe to be present In-Reply-To: <9135877b-0e37-6fd2-8c69-e9d0376b75e7@arm.com> References: <9b1fe2f9-b4a9-17a8-1175-a1a776db1afc@simark.ca> <87y1s03a0a.fsf@redhat.com> <87sfi30zgy.fsf@redhat.com> <610ebe6b-64d0-d0c9-f9da-9e1445d53d73@arm.com> <87mt8240w8.fsf@redhat.com> <9135877b-0e37-6fd2-8c69-e9d0376b75e7@arm.com> Date: Mon, 05 Dec 2022 12:04:50 +0000 Message-ID: <87k0363vkt.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Luis Machado writes: > On 12/5/22 10:09, Andrew Burgess wrote: >> Luis Machado writes: >> >>> On 11/29/22 08:27, Luis Machado wrote: >>>> Hi Andrew, >>>> >>>> This seems to have broken armhf on Ubuntu 22.04. >>>> >>>> https://builder.sourceware.org/buildbot/#/builders/169/builds/1163 >>>> >>> >>> I haven't investigated this. I only spotted it in the sourceware buildbot page. But I'd guess it is something to do >>> with thumb mode detection early in the startup. >>> >>> Ubuntu has moved to not stripping ld.so for armhf because the probe mechanism is not capable of conveying the thumb mode >>> information, so gdb has to rely on symbols instead. If the changes have touched this fragile area, it may have broken the >>> delicate balance. >> >> I somehow missed this last week. I'll take a look today. >> >> Sorry for the breakage. > > No problem. For the record, I haven't managed to reproduce this on my Ubuntu 20.04/22.04 setup. I'll have to give it a try on the > buildbot machine. > > Just a heads-up in case this doesn't reproduce for you either. I don't have immediate access to a suitable ARM machine. I'm trying to set something up that might work, but given what you report, I'm not too hopeful. My guess for what is happening though is this: - Previously, when Ubuntu was using glibc 2.35 / 2.36, one of the shared library probes was missing. As a result GDB would fall back to use the symbol/breakpoint approach. This worked out just fine for the ARM case as is appears we shouldn't be using the probes anyway. - After my patch GDB no longer cares about the missing probe, and so started trying to use the probes based interface, as this is the preferred strategy. Unfortunately for ARM this doesn't work :/ I guess the ideal solution would be that glibc didn't include probe information if those probes can't then be used for some reason. I guess that will need someone who understands the problem to either raise a glibc bug, or propose a glibc fix. Until then we probably need to consider GDB based solutions. Currently we don't have anyway to avoid particular probes on a per-architecture basis, this will probably need a new gdbarch hook adding. I'll see if I can write something like this and test it on the buildbot. Thanks, Andrew