From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id g1q9D2wQAWI3MAAAWB0awg (envelope-from ) for ; Mon, 07 Feb 2022 07:28:28 -0500 Received: by simark.ca (Postfix, from userid 112) id 303681F3C6; Mon, 7 Feb 2022 07:28:28 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B4B431EE1A for ; Mon, 7 Feb 2022 07:28:27 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 265523858425 for ; Mon, 7 Feb 2022 12:28:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 265523858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644236907; bh=nLFuEPShypHqJqhs1EYPdSi46cdIU15ZQfPn2XckZRw=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=V84RZ97Qwrij+3ddiQF6m2C0gorl2C45+pbwCvBPDdBG5yQzTMflLKh/cb3u8d/uW woOepT6D0b/sElOvs5jCo/5107DiNUZjW3WADWWX6eI9SNmug6oFzmqG51axcetTO7 OtedF6TtgRAY4F7+psZh6cR5tKr3VM9+Y/MnXd6I= 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 92EAE3858D20 for ; Mon, 7 Feb 2022 12:28:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 92EAE3858D20 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-333-KP76mpUHPdKA1uxuqcZmuA-1; Mon, 07 Feb 2022 07:27:58 -0500 X-MC-Unique: KP76mpUHPdKA1uxuqcZmuA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CB3251091DA0; Mon, 7 Feb 2022 12:27:57 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.205]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED2247D93D; Mon, 7 Feb 2022 12:27:56 +0000 (UTC) To: Jacob Kroon Subject: Re: Debugging ld.so in gdb References: <29e0ef71-4706-9b0f-2a68-e12c54120d8e@gmail.com> <8735kypwcd.fsf@oldenburg.str.redhat.com> <87y22qognw.fsf@oldenburg.str.redhat.com> <87h79eobq1.fsf@oldenburg.str.redhat.com> <87czk2o967.fsf@oldenburg.str.redhat.com> <06f726f4-855e-239b-fd2c-8d0d57f45131@gmail.com> <878ruqo8o2.fsf@oldenburg.str.redhat.com> <8d9d02de-1a59-1f4d-dbcf-050b65abef29@gmail.com> <93cd41d6-e333-f31e-96bb-2f34a88f164f@gmail.com> <875ypqc2ma.fsf@oldenburg.str.redhat.com> <3e08e7c7-05f5-16f2-50cb-036687386997@gmail.com> Date: Mon, 07 Feb 2022 13:27:54 +0100 In-Reply-To: <3e08e7c7-05f5-16f2-50cb-036687386997@gmail.com> (Jacob Kroon's message of "Mon, 7 Feb 2022 13:15:28 +0100") Message-ID: <87wni6amk5.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Florian Weimer via Gdb Reply-To: Florian Weimer Cc: Jacob Kroon via Gdb Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" * Jacob Kroon: >> What I find really confusing is that this is not the result of a dlopen >> call. I definitely would expect that the maps array contains *all* >> objects that are being loaded. Clearly this is not the case here. >> Somehow certain objects are missing, and then they get written into the >> rpo array. >> >> Please try to find libjvm.so among the l_initfini arrays of the objects. > > I do find libjvm.so in a couple of the maps[]->l_initfini[]->l_name > arrays, yes. Okay, and of course there is an assumption that those make it to the maps. No wonder we run off the array. >> It must be present somewhere. I assume it's also on the main list, >> which starts off at _rtld_global._dl_ns[0]._ns_loaded. > > Hmm how do I iterate over that data structure ? > > See below: >> (gdb) print _rtld_global._dl_ns[0]._ns_loaded[0]->l_name >> $186 = 0x7ffff7ff1d97 "" >> (gdb) print _rtld_global._dl_ns[0]._ns_loaded[1]->l_name >> $187 = 0x0 >> (gdb) print _rtld_global._dl_ns[0]._ns_loaded[2]->l_name >> $188 = 0x0 >> (gdb) print _rtld_global._dl_ns[0]._ns_loaded->l_name >> $189 = 0x7ffff7ff1d97 "" >> (gdb) print _rtld_global._dl_ns[1]._ns_loaded->l_name >> Cannot access memory at address 0x8 >> (gdb) print _rtld_global._dl_ns[2]._ns_loaded->l_name >> Cannot access memory at address 0x8 It's a list chained by l_prev/l_next. Thanks, Florian