From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: [scratch/igc] 985247b6bee crash on Linux, KDE, Wayland Date: Thu, 05 Sep 2024 17:03:59 +0000 Message-ID: <87zfomqbgk.fsf@protonmail.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> 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="4641"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , =?utf-8?Q?Gerd_M=C3=B6llmann?= , emacs-devel@gnu.org To: Eval EXEC Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 05 19:41:16 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 1smGTr-0000vJ-FP for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Sep 2024 19:41:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smGTL-0004VM-FY; Thu, 05 Sep 2024 13:40:43 -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 1smFtu-0003uR-Ap for emacs-devel@gnu.org; Thu, 05 Sep 2024 13:04:06 -0400 Original-Received: from mail-40133.protonmail.ch ([185.70.40.133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smFts-0006O9-AJ for emacs-devel@gnu.org; Thu, 05 Sep 2024 13:04:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1725555841; x=1725815041; bh=2sai2JU5pv+VOyBe5R2Myvi6qKOkchGVukIAtzGDwII=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=FEIuQBOdOZNdwC6jS+StzSE3d27K9yeRNpVnaDHtvf8hpf0HJuNKT20xXNMd9AMfE tVF9Tv222KmyFNPpvuTXsjTtuDZ4rYAFQP7+bGwC0J5WPVySDo9mb3kPuFyfH3rsnw ozQ0OCTuiDXrsfxZ2ci8WgeYjFiELD6kMDeSqtMTiLi+0bay4Z6EloaAXuVDFLjVu1 1/b5yQQ7iIHdF8/W6sW/xXjk+8dFbWCZMq92op6nrBPNsrfRLyRjgNW0qfnalmn7go hD68tC8/6Qkp8AQ9iFYllyglW+EwSGddkAiNLV9V603zRnyrj3zGHzDxBPWvl/p94w P+lMCxJvpZz/g== In-Reply-To: <87h6aunilt.fsf@gmail.com> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: d6ef81cc501c5fb0169b6646e849eebf770e0fbe Received-SPF: pass client-ip=185.70.40.133; envelope-from=pipcet@protonmail.com; helo=mail-40133.protonmail.ch 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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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:39 -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:323417 Archived-At: "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=3Dnati= ve -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=3D0x7ffd2708f= f28) 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