From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eval EXEC Newsgroups: gmane.emacs.devel Subject: Re: [scratch/igc] 985247b6bee crash on Linux, KDE, Wayland Date: Fri, 06 Sep 2024 01:29:55 +0800 Message-ID: <874j6u1018.fsf@gmail.com> References: <8734mezkgo.fsf@gmail.com> <8634me447j.fsf@gnu.org> <861q1y437s.fsf@gnu.org> <86wmjq2mr2.fsf@gnu.org> <875xrars34.fsf@protonmail.com> <87h6aunilt.fsf@gmail.com> <87zfomqbgk.fsf@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10266"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Gerd =?utf-8?Q?M=C3=B6llmann?= , emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 05 19:42:21 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1smGUv-0002Re-3E for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Sep 2024 19:42:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smGTT-0004WZ-LK; Thu, 05 Sep 2024 13:40:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smGIz-0005cL-G0 for emacs-devel@gnu.org; Thu, 05 Sep 2024 13:30:01 -0400 Original-Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smGIx-0002VO-Kw; Thu, 05 Sep 2024 13:30:01 -0400 Original-Received: by mail-pl1-x642.google.com with SMTP id d9443c01a7336-204d391f53bso11035555ad.2; Thu, 05 Sep 2024 10:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725557398; x=1726162198; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=q6oj1X+C8+3i7BH0oLP5Xb7Xc6SaINzExwrDsBnM1Gk=; b=K9WZXeb08xWbIzIA8e+TfAVmVXdXFXu3/2JnTHKjUY4+7gqAuuhiB58WFVPFk9tro9 dygGOeMVOxH+vy4+L/H/Bc08MPIeBDCIKDEm73aNo/tT1fBC8x0G+OOd0R4hVcM4BOnc if3nluRKFAb9utB61XbxKKAOlYlOOm2+F/FhBFS+QcM9t4nkJe2dDE2fdZkUN0Lx2AKC 2zC9McHlBq2Sb9I+MTIifmoEMpkyQTI72VC9Rq7MXpj6ceiyeahhMw2eaIYKs0CkmrM+ BVkDFo9ajhdCCm12M+Hhh2tez1Ljr7cmUUi6ivpA+8UMDaSWtSAEnpR4TPTWAvtPHpPv Tigg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725557398; x=1726162198; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q6oj1X+C8+3i7BH0oLP5Xb7Xc6SaINzExwrDsBnM1Gk=; b=VwfM+BFK/GkCTidIDdm+uovdVJWgmqcv6MyhvKjP5qxc/cDlc1H3hMy6kO0px01IoC nDJBkpSWkIqeHVkdUCFLmFwW6qBdQJv0vYCYZbpi2+Cu9zHNWMOKYB8lHdkjxGR2DIHm eqKtQrbJ+h5SLRkxDtYYySXFWDrQpDLlY+W3YFoaY+b1yPKBD7OZWZqLBcBHjg0z0mzn 5kgwSU3LdMVf6i8Jjdk0U3IV7Qw2T7Pdg56L6ypGXI+cz7N1r/o9/C7hCUVel6f6IjXO 3HiPx3nlP23P059+AIMlpbU7V7UggYI+x+NrkmrS8YNf8kLDhheYrSh4XOcstLKFRxBm KaAQ== X-Forwarded-Encrypted: i=1; AJvYcCUd+UW2ytHF2Z9/gXxT92q/G9olB/W8wteYD/wjJzusupNdFR//gpMRFBEM744TIoUA1Xygc19p8JxaDA==@gnu.org X-Gm-Message-State: AOJu0YzsJvln/GEkKcROoXJKYvphujruFqwEhleJ2/pICCXxvbXZc1JF SuCqAifebX80QjuQFsfnSqx++xoDc4RdetKeVx4FWCAIF+R0TTPXUH+fhgTzMwJwkc8Z X-Google-Smtp-Source: AGHT+IGkTncrazvkN/jzqw0PiJQxZt8Twc4nQUPJFuBJsve6diY/1nXBohhhOUUq8QcQHPCuCpyp+w== X-Received: by 2002:a17:903:1cf:b0:205:4273:7d3e with SMTP id d9443c01a7336-20547c0daf6mr195394635ad.57.1725557397735; Thu, 05 Sep 2024 10:29:57 -0700 (PDT) Original-Received: from localhost (144.34.182.14.16clouds.com. [144.34.182.14]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-206aea67fc8sm30769345ad.269.2024.09.05.10.29.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2024 10:29:57 -0700 (PDT) In-Reply-To: <87zfomqbgk.fsf@protonmail.com> (Pip Cet's message of "Thu, 05 Sep 2024 17:03:59 +0000") Received-SPF: pass client-ip=2607:f8b0:4864:20::642; envelope-from=execvy@gmail.com; helo=mail-pl1-x642.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 05 Sep 2024 13:40:40 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323423 Archived-At: Pip Cet writes: > "Eval EXEC" writes: > >> Pip Cet writes: >> >>> "Eli Zaretskii" writes: >>> >>>>> From: Gerd M=C3=B6llmann >>>>> Cc: execvy@gmail.com, pipcet@protonmail.com, emacs-devel@gnu.org >>>>> Date: Thu, 05 Sep 2024 15:57:50 +0200 >>>>> >>>>> Eli Zaretskii writes: >>>>> >>>>> >> That means FRAME_OUTPUT_DATA can be null during the lifetime of a >>>>> >> frame. If that happens, we'll crash exactly in that way in the new= code >>>>> >> for window frames. >>>>> > >>>>> > We never test for FRAME_OUTPUT_DATA being non-NULL in the code, so I >>>>> > don't think I understand why igc.c is different. >>>>> >>>>> Our scan functions can run at arbitrary times, including when >>>>> FRAME_OUTPUT_DATA is still null. >>>> >>>> OK, but if you look at the backtrace, you will see that in this case >>>> the scan functions were run from within code called by >>>> redisplay_internal, so I very much doubt that FRAME_OUTPUT_DATA was >>>> NULL in this case. >>> >>> But the frame we crashed tracing wasn't the same frame that was being >>> redisplayed. It's possible it was a destroyed ("dead") frame, right? >>> Then frame destruction would have freed and subsequently zeroed its >>> FRAME_OUTPUT_DATA. >>> >>> However, debugging further is the only way to be sure. If the OP still >>> has the core dump + executable for this crash, that should contain the >>> necessary data, even without waiting for the crash to happen again. >>> >>> And it definitely looks like a different bug from the previous reports, >>> which all involved consing up a list in -O3 code using -march=3Dnative. >>> >>> Pip >> >> >> I reproduce the crash again: > > Thanks! I think we crash when scanning deleted frames, and I'll push a > tentative fix in a bit (but it would be good to be sure first, as Eli > had another viable theory for what might have happened). > >> Its build by -O2: >> ```bash >> #!/usr/bin/env bash >> set -ex >> >> make extraclean >> >> BRANCH_NAME=3D$(git branch --show-current | sed 's/\//_/g') >> COMMIT_ID=3D$(git rev-parse --short=3D8 HEAD) >> BUILD_DIR=3D${BRANCH_NAME}-commit-${COMMIT_ID} >> INSTALL_PREFIX=3D$(realpath ../emacs-build/${BUILD_DIR}) >> >> ./autogen.sh >> ./configure CFLAGS=3D'-g3 -ggdb -O2 -fno-omit-frame-pointer -mtune=3Dnat= ive -march=3Dnative' \ >> --prefix=3D${INSTALL_PREFIX} \ >> --with-mps=3Dyes \ >> --with-imagemagick \ >> --with-modules \ >> --without-compress-install \ >> --with-native-compilation --with-mailutils\ >> --enable-link-time-optimization \ >> --with-tree-sitter --with-xinput2 \ >> --with-dbus --with-native-compilation=3Daot \ >> --with-file-notification=3Dinotify\ >> && make -j30 install >> >> rm ../emacs-build/emacs >> ln -s ${INSTALL_PREFIX} ../emacs-build/emacs > > > >> #24 0x0000000000692cd8 in fix_frame (f=3D0x7fe4284bb270, >> ss=3D0x7ffd2708ff28) at >> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/igc.c:2068 >> hlinfo =3D >> _ss =3D 0x7ffd2708ff28 >> _mps_zs =3D >> _mps_ufs =3D 144115188176519176 >> _mps_wt =3D >> _mps_w =3D > > Can you run the commands Eli posted? They were: > >> (gdb) frame 24 >> (gdb) p f >> (gdb) p f->output_data >> (gdb) p f->output_data.x >> (gdb) p f->output_data.x->display_info >> (gdb) p f->output_data.x->display_info->mouse_highlight > > Thanks! > > Pip I created a video to show how the crash happen: https://youtu.be/baHyYHC39_U Thanks Eval Exec --=20