Bug 267253 - security/putty crashes after update
Summary: security/putty crashes after update
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Matthias Andree
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-21 11:54 UTC by Oldno7
Modified: 2022-10-30 08:43 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (mandree)


Attachments
results of a script putty.debug gdb /usr/local/bin/putty putty.core (17.80 KB, text/plain)
2022-10-23 08:24 UTC, Oldno7
no flags Details
results of a fc-list (80.08 KB, text/plain)
2022-10-23 12:32 UTC, Oldno7
no flags Details
results of a pango-list (8.11 KB, text/plain)
2022-10-23 12:33 UTC, Oldno7
no flags Details
results of a script putty-after-reinst.debug gdb /usr/local/bin/putty putty.core (17.73 KB, text/plain)
2022-10-23 12:48 UTC, Oldno7
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oldno7 2022-10-21 11:54:37 UTC
root@Orion:~ # pkg info security/putty
putty-0.78~pre20220922_1
Name           : putty
Version        : 0.78~pre20220922_1
Installed on   : Fri Oct 21 12:37:34 2022 CEST
Origin         : security/putty
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : security
Licenses       : MIT
Maintainer     : mandree@FreeBSD.org
WWW            : https://www.chiark.greenend.org.uk/~sgtatham/putty/
Comment        : Secure shell and telnet client including xterm emulator
Options        :
	GSSAPI_BASE    : on
	GSSAPI_HEIMDAL : off
	GSSAPI_MIT     : off
	GSSAPI_NONE    : off
	GTK3           : on
Shared Libs required:
	libpangocairo-1.0.so.0
	libpango-1.0.so.0
	libgtk-3.so.0
	libgobject-2.0.so.0
	libglib-2.0.so.0
	libgdk_pixbuf-2.0.so.0
	libgdk-3.so.0
	libcairo.so.2
	libX11.so.6
Annotations    :
	FreeBSD_version: 1301000
	cpe            : cpe:2.3:a:putty:putty:0.78~pre20220922:::::freebsd13:x64:1
	repo_type      : binary
	repository     : Poudriere

Error showed:
After update today, /usr/local/bin/putty crashes as showed below. Either making a pkg from a poudriere repo or compiling it directly from ports.

Oldno7@Orion:~ putty
Assertion failed: (uc->entry != NULL), function dlg_fontsel_set, file /wrkdirs/usr/ports/security/putty/work/putty-0.78~pre20220922.9fcfd67/unix/dialog.c, line 942.
Abort trap (`core' generado)
Comment 1 Matthias Andree freebsd_committer freebsd_triage 2022-10-22 08:18:06 UTC
Buenos dias Guillermo,

"not for me", else I would not have committed this.

Do other GTK3 applications work properly for you?


Please rebuild from port with debug information (make clean && make WITH_DEBUG=yes all reinstall), reproduce the bug, and then install gdb (pkg install gdb should do and get you GDB 12), and provide a backtrace with a standard procedure:

% script putty.debug gdb /usr/local/bin/putty putty.core

Then, inside gdb:

(gdb) set pagination off
(gdb) thread apply all backtrace full

Press Ctrl+D to exit gdb, and again to exit script, and attach the putty.debug

Please provide fruther information (especially configuration and settings), possibly a truss trace, and see here for more:

https://www.chiark.greenend.org.uk/~sgtatham/bugs.html

Thanks in advance.
Comment 2 Matthias Andree freebsd_committer freebsd_triage 2022-10-22 08:18:55 UTC
Regarding configuration, please see $HOME/.putty for the files and be sure to mask passwords if there are any.
Comment 3 Oldno7 2022-10-23 08:24:54 UTC
Created attachment 237550 [details]
results of a script putty.debug gdb /usr/local/bin/putty putty.core

Following advice form the maintainer
Comment 4 Oldno7 2022-10-23 08:44:03 UTC
(In reply to Matthias Andree from comment #1)
Good morning Mathias. 
First of all, thanks for your response. Sorry if I make some mistakes as it's the first time I do this line of bug report (I'm from the send-pr era). 
The answer to your questions are
"Do other GTK3 applications work properly for you?"
Yes. I tried some of them: firefox, thunderbird, audacity, inkscape... all of them are working flawlessly. I was pretty sure about the two first, but I tested more following a "pkg shlib libgtk-3.so.0"

I did the make install from ports with the WITH_DEBUG=yes as you asked.

I attached the gdb results as you said.

For the config files, I moved the .putty user dir out and obtained the same error. Is not clear for me how to send these files and not breaking info out

By the way: I changed the "only afects me" parameter of the bug report because I have the same results in another installation. But its the same version of SO and practically the same machine and thought it was meaningless report the same.


I hope this can easy the way to find a solution. I can access other systems via normal ssh from a xterm terminal, but PuTTY has the huge comodity of offering translation for older systems (PC850 keymaps, for example). 

Thanks again for your work.
Comment 5 Matthias Andree freebsd_committer freebsd_triage 2022-10-23 09:37:05 UTC
Guillermo,

no worries, seems all good now. 

So we have two important pieces of information:

1. putty crashes before any configuration is made

2. we have a useful backtrace.

So, can you start putty from console and see if there is any console output before it crashes? Gtk/Gdk logging, warnings, criticals?  If so, please paste them here.
Comment 6 Matthias Andree freebsd_committer freebsd_triage 2022-10-23 09:39:15 UTC
Or Pango issues?

Can you also attach the output of these commands:

 fc-list 

 pango-list

(These are longer outputs, so you may want to fc-list | tee fc-list.txt and pango-list | tee pango-list.txt).

Thank you.
Comment 7 commit-hook freebsd_committer freebsd_triage 2022-10-23 10:28:18 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=765de7a6ce543a53566a43544c07db2e2686e0df

commit 765de7a6ce543a53566a43544c07db2e2686e0df
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2022-10-23 10:25:24 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2022-10-23 10:25:24 +0000

    security/putty: update to snapshot 20221023

    FreeBSD-relevant changes since previous snapshot:
    * 75ac4443 2022-10-22 | Document subdomain matching of cert expr wildcards. [Jacob Nevins]
    * 500568d2 2022-10-22 | Docs: fix trivial typo from 6472f7fc77. [Jacob Nevins]
    * 5f3b743e 2022-10-21 | Tweak certified-host-key prompt. [Jacob Nevins]
    * bb1ebc9b 2022-10-21 | Docs: tweak certified-host-key warning responses. [Jacob Nevins]
    * 5716c638 2022-10-21 | Docs: cross-reference host-key warning sections. [Jacob Nevins]
    * 8c534c26 2022-10-21 | Docs: note "wrong host key" warning is stronger. [Jacob Nevins]
    * 1d1d81d6 2022-10-21 | Fix regressions in Gtk host key "More info". [Jacob Nevins]
    * dc9ab5e0 2022-10-21 | Rename NTRU Prime / Curve25519 kex in UI. [Jacob Nevins]
    * 6472f7fc 2022-10-21 | Docs: update Pageant key list description. [Jacob Nevins]
    * 5d5a6a8f 2022-10-21 | Docs: MD5 is forced for SSH-1 key fingerprints. [Jacob Nevins]
    * d4298308 2022-10-21 | Docs: prime generation defaults are usually fine. [Jacob Nevins]
    * 2b5b7b5c 2022-10-21 | Docs: note warning about <2048-bit RSA/DSA keys. [Jacob Nevins]
    * 617bf732 2022-10-21 | Docs: PuTTYgen: fix gratuitous exclusion of PSFTP. [Jacob Nevins]
    * 11950739 2022-10-21 | Docs: add index alias for "ECDSA". [Jacob Nevins]
    * 4af8a585 2022-10-20 | cmdgen: Fix docs and usage messages. [Jacob Nevins]
    * 68c97fb2 2022-10-19 | Fix installing man pages from our tarballs. [Jacob Nevins]
    * 2222cd10 2022-10-12 | AES-GCM NEON: cope with missing vaddq_p128. [Simon Tatham]

    While here, fix PORTVERSION->DISTVERSION to get rid of the tilde
    that confuses pkg(8).

    And while it may not fix the issue, I still want this commit log
    to appear in
    PR:             267253

 security/putty/Makefile                      | 28 ++++++------
 security/putty/distinfo                      |  6 +--
 security/putty/files/patch-vaddq_p128 (gone) | 65 ----------------------------
 3 files changed, 17 insertions(+), 82 deletions(-)
Comment 8 Matthias Andree freebsd_committer freebsd_triage 2022-10-23 10:35:22 UTC
Guillermo,

1. I could not reach you by mail, so I am posting this here

Reporting-MTA: dns; mx2.freebsd.org
X-Postfix-Queue-ID: 4MwD5840ZGz3vWp
X-Postfix-Sender: rfc822; mandree@FreeBSD.org
Arrival-Date: Sun, 23 Oct 2022 09:52:12 +0000 (UTC)

Final-Recipient: rfc822; guillermo@QuerySoft.es
Original-Recipient: rfc822;guillermo@QuerySoft.es
Action: failed
Status: 5.7.1
Remote-MTA: dns; mercurio.QuerySoft.es
Diagnostic-Code: smtp; 550 5.7.1 Su IP figura listada en Spamhaus - Por favor
    revise http://www.spamhaus.org/query/bl?ip=+96.47.72.81

but the relevant IP (mx2.freebsd.org) is not listed there... 


2. while I do not believe this improves the situation, please update the ports tree and try to build and run the new 0.78.p20221023 just so we know the issue is still present in the upstream maintainers' current Git version.

Thank you.
Comment 9 Oldno7 2022-10-23 12:30:18 UTC
(In reply to Matthias Andree from comment #5)
"can you start putty from console and see if there is any console output before it crashes? Gtk/Gdk logging, warnings, criticals?  If so, please paste them here."

Hi, Matthias: No, from console there is no other error message but what I pasted before:

Oldno7@Orion:~ putty
Assertion failed: (uc->entry != NULL), function dlg_fontsel_set, file /wrkdirs/usr/ports/security/putty/work/putty-0.78~pre20220922.9fcfd67/unix/dialog.c, line 942.
Abort trap
Comment 10 Oldno7 2022-10-23 12:32:44 UTC
Created attachment 237558 [details]
results of a fc-list
Comment 11 Oldno7 2022-10-23 12:33:18 UTC
Created attachment 237559 [details]
results of a pango-list
Comment 12 Oldno7 2022-10-23 12:34:04 UTC
(In reply to Matthias Andree from comment #6)
Done. You have them in the attach list
Comment 13 Oldno7 2022-10-23 12:45:04 UTC
(In reply to Matthias Andree from comment #8)
I've updated the ports tree with a portsnap, and did a WITH_DEBUG=yes all reinstall
The result was the same error (as you expected). I will attach the new debug file from the core.
The error shows:
Oldno7@Orion:~ rm *core
Oldno7@Orion:~ putty
Assertion failed: (uc->entry != NULL), function dlg_fontsel_set, file /usr/ports/security/putty/work/putty-0.78~pre20221023.0c59d49/unix/dialog.c, line 942.
Abort trap (`core' generado)

the pkg info now says:

root@Orion:/usr/ports/security/putty # pkg info putty
putty-0.78.p20221023
Name           : putty
Version        : 0.78.p20221023
Installed on   : Sun Oct 23 14:39:19 2022 CEST
Origin         : security/putty
Architecture   : FreeBSD:13:amd64
Prefix         : /usr/local
Categories     : security
Licenses       : MIT
Maintainer     : mandree@FreeBSD.org
WWW            : https://www.chiark.greenend.org.uk/~sgtatham/putty/
Comment        : Secure shell and telnet client including xterm emulator
Options        :
	GSSAPI_BASE    : on
	GSSAPI_HEIMDAL : off
	GSSAPI_MIT     : off
	GSSAPI_NONE    : off
	GTK3           : on
Shared Libs required:
	libpangocairo-1.0.so.0
	libpango-1.0.so.0
	libgtk-3.so.0
	libgobject-2.0.so.0
	libglib-2.0.so.0
	libgdk_pixbuf-2.0.so.0
	libgdk-3.so.0
	libcairo.so.2
	libX11.so.6
Annotations    :
	FreeBSD_version: 1301000
	cpe            : cpe:2.3:a:putty:putty:0.78.p20221023:::::freebsd13:x64
Flat size      : 17.7MiB
Comment 14 Oldno7 2022-10-23 12:48:47 UTC
Created attachment 237560 [details]
results of a script putty-after-reinst.debug gdb /usr/local/bin/putty putty.core

New debug file to examine by Matthias, the maintainer.
Comment 15 Matthias Andree freebsd_committer freebsd_triage 2022-10-29 19:20:31 UTC
This is supposed to be fixed by PuTTY 0.78, if not, please reopen this report.
Comment 16 commit-hook freebsd_committer freebsd_triage 2022-10-29 19:20:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a4d049c425af9241685bdc1ccae7f5aa29c42e85

commit a4d049c425af9241685bdc1ccae7f5aa29c42e85
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2022-10-29 19:13:28 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2022-10-29 19:15:35 +0000

    security/putty: update to 0.78 release

    FreeBSD relevant changes since 20221023 snapshot:

    * f9a8213d 2022-10-29 | Docs: add a 'pdf' cmake target. (origin/main, origin/HEAD) [Jacob Nevins]
    * 4ff82ab2 2022-10-28 | Update version number for 0.78 release. (tag: 0.78) [Simon Tatham]
    * 475c2387 2022-10-28 | Unix: stop accessing ctrl->fileselect for font selectors. [Simon Tatham]
    * 329a4cdd 2022-10-24 | authplugin-example.py: Flush stderr. [Jacob Nevins]
    * 538c8fd2 2022-10-24 | authplugin-example.py: Mention documentation. [Jacob Nevins]
    * a7106d8e 2022-10-23 | Add missing initialisation of term->osc_strlen. [Simon Tatham]
    * bdb3ac9f 2022-10-23 | Restrict -pwfile / -pw to apply to server prompts only. [Simon Tatham]
    * 2fbb9284 2022-10-23 | Fix outdated comment relating to -pw. [Jacob Nevins]
    * f7e86ca2 2022-10-22 | README: remove mention of doc/Makefile. [Jacob Nevins]
    * f229aab2 2022-10-23 | Rewrap a paragraph in README. [Jacob Nevins]

    MFH:            2022Q4 (after 10 days)

    According to Simon, he caught this assertion error in the act,
    and 475c2387 should fix
    PR:             267253

 security/putty/Makefile | 10 +++++-----
 security/putty/distinfo |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)
Comment 17 Oldno7 2022-10-30 08:43:02 UTC
(In reply to commit-hook from comment #16)
After doing a make reinstall in security/putty it works now flawlessly. 
Good job & thanks.