Bug 229396 - x11-toolkits/wxgtk3[01]: TLS is broken on armv6/7 (ftp/filezilla dumps core)
Summary: x11-toolkits/wxgtk3[01]: TLS is broken on armv6/7 (ftp/filezilla dumps core)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Some People
Assignee: Yuri Victorovich
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2018-06-28 20:07 UTC by Ulrich Grey
Modified: 2018-08-20 07:40 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (portmaster)
yuri: maintainer-feedback+
koobs: merge-quarterly?


Attachments
patch (521 bytes, patch)
2018-07-05 19:23 UTC, Mikael Urankar
no flags Details | Diff
patch (584 bytes, patch)
2018-07-05 19:24 UTC, Mikael Urankar
no flags Details | Diff
patch (1.23 KB, patch)
2018-07-07 14:58 UTC, Mikael Urankar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Grey 2018-06-28 20:07:20 UTC
ftp/filezilla was built on a wandboard-quad running:
FreeBSD 12.0-CURRENT #0 r333645

If I start the program, I get a runtime error:

freebsd@wqtest:~ % filezilla
Reading locale option from /home/freebsd/.config/filezilla/filezilla.xml
./src/common/cmdline.cpp(96): assert "GetLongOptionName(lng.begin(), lng.end()).Len() == lng.Len()" failed in wxCmdLineOption(): Long option contains invalid characters
Trace/BPT trap (core dumped)

Please see the poudriere build log:
http://ulrich-grey.de/dl/FreeBSD/filezilla-3.24.0_2.log
Comment 1 Mikael Urankar freebsd_committer freebsd_triage 2018-07-05 19:23:20 UTC
Created attachment 194902 [details]
patch

The problem is in x11-toolkits/wxgtk30
I did a bit of debugging and it seems wxUSE_STRING_POS_CACHE is broken when wxUSE_COMPILER_TLS is defined.
I don't have the skills to debug it further but the attached patch fixes the problem for me.
You'll probably have to rebuild filezilla.
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2018-07-05 19:24:35 UTC
Created attachment 194903 [details]
patch
Comment 3 Ulrich Grey 2018-07-07 04:14:28 UTC
(In reply to mikael.urankar from comment #1)
Thank you for the patch.
I rebuilt x11-toolkits/wxgtk30 and ftp/filezilla.

ftp/filezilla needs some minutes to start, dbus is running.

(gdb) run
Starting program: /usr/local/bin/filezilla 
(no debugging symbols found)...[New LWP 100332]
Reading locale option from /home/freebsd/.config/filezilla/filezilla.xml
[New Thread 212fc000 (LWP 100332/filezilla)]
wxD-Bus: Signal from /org/freedesktop/DBus, member NameAcquired
wxD-Bus: Reply with serial 2
wxD-Bus: Signal: Error: The name org.gnome.SessionManager was not provided by any .service files
[New Thread 212fc600 (LWP 100424/filezilla)]

Program exited normally.
Current language:  auto; currently minimal
(gdb) 

As far as I have tested it (login via server manager, browsing through the file system, upload a file to the server, changing the file name on the server, deleting a file on the server), it works for me.
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2018-07-07 14:58:55 UTC
Created attachment 194931 [details]
patch

the issue is also present in wxgtk31.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2018-08-06 09:54:21 UTC
Update summary to reflect where the issue is (and where the patch applies).

Request maintainer feedback from both port maintainers.

Since Yuri is a committer, assign accordingly
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-08-19 23:37:26 UTC
A commit references this bug:

Author: yuri
Date: Sun Aug 19 23:37:07 UTC 2018
New revision: 477608
URL: https://svnweb.freebsd.org/changeset/ports/477608

Log:
  x11-toolkits/wxgtk30 and x11-toolkits/wxgtk31: Fix the problem that TLS is broken on armv6/7

  ftp/filezilla was dumping core

  PR:		229396
  Submitted by:	Ulrich Grey <usenet@ulrich-grey.de>
  Approved by:	portmaster@bsdforge.com (maintainer's timeout on x11-toolkits/wxgtk30; ~50 days)
  MFH:		2018Q3

Changes:
  head/x11-toolkits/wxgtk30/Makefile
  head/x11-toolkits/wxgtk31/Makefile
Comment 7 commit-hook freebsd_committer freebsd_triage 2018-08-20 05:01:34 UTC
A commit references this bug:

Author: yuri
Date: Mon Aug 20 05:01:26 UTC 2018
New revision: 477626
URL: https://svnweb.freebsd.org/changeset/ports/477626

Log:
  MFH: r477608

  x11-toolkits/wxgtk30 and x11-toolkits/wxgtk31: Fix the problem that TLS is broken on armv6/7

  ftp/filezilla was dumping core

  PR:		229396
  Submitted by:	Ulrich Grey <usenet@ulrich-grey.de>
  Approved by:	ports-secteam (miwi@FreeBSD.org)

Changes:
_U  branches/2018Q3/
  branches/2018Q3/x11-toolkits/wxgtk30/Makefile
  branches/2018Q3/x11-toolkits/wxgtk31/Makefile
Comment 8 Yuri Victorovich freebsd_committer freebsd_triage 2018-08-20 05:03:18 UTC
Thanks for submitting the patch, Ulrich!
Comment 9 Mikael Urankar freebsd_committer freebsd_triage 2018-08-20 07:36:33 UTC
(In reply to Yuri Victorovich from comment #8)
Actually it was me. Thanks anyway for committing the patch.
Comment 10 Yuri Victorovich freebsd_committer freebsd_triage 2018-08-20 07:40:44 UTC
(In reply to mikael.urankar from comment #9)

Sorry for the confusion. Thank you for submitting the patch!