Bug 281959 - www/wt: update to 4.11.0
Summary: www/wt: update to 4.11.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Zsolt Udvari
URL: https://webtoolkit.eu/wt/doc/referenc...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-09 14:29 UTC by Mamadou Babaei
Modified: 2024-10-22 18:00 UTC (History)
1 user (show)

See Also:
info: maintainer-feedback+
info: maintainer-feedback+


Attachments
www/wt update to v4.11.0 (2.32 KB, patch)
2024-10-09 14:29 UTC, Mamadou Babaei
info: maintainer-approval+
Details | Diff
new patch (2.88 KB, patch)
2024-10-19 21:56 UTC, Mamadou Babaei
no flags Details | Diff
a new patch passing all tests (2.32 KB, patch)
2024-10-21 15:14 UTC, Mamadou Babaei
info: maintainer-approval+
Details | Diff
patch that passes all tests (4.46 KB, patch)
2024-10-21 15:28 UTC, Mamadou Babaei
info: maintainer-approval+
Details | Diff
patch with only test_depends (4.34 KB, patch)
2024-10-21 16:13 UTC, Mamadou Babaei
info: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mamadou Babaei 2024-10-09 14:29:38 UTC
Created attachment 254110 [details]
www/wt update to v4.11.0

This patch updates www/wt to v4.11.0 and also fixes the recent build issues with FreeBSD ports boost libraries version bump.
Comment 1 Zsolt Udvari freebsd_committer freebsd_triage 2024-10-10 09:45:43 UTC
The "make test" fails:
===>  Testing for wt-4.11.0
/bin/sh: /wrkdirs/usr/ports/www/wt/work/.build/test/test.wt: not found
*** Error code 127

Could you please check it?
Comment 2 Mamadou Babaei 2024-10-10 17:46:42 UTC
(In reply to Zsolt Udvari from comment #1)

I believe it's because of this:

CMAKE_OFF=	BUILD_EXAMPLES BUILD_TESTS ENABLE_MYSQLSERVER \
		ENABLE_QT4 ENABLE_QT5 ENABLE_QT6
CMAKE_TESTING_ON=	BUILD_TESTS

If I remove BUILD_TESTS it's going to build many more files but indeed performs the test.

However the tests themselves fail:

===>  Testing for wt-4.11.0
Running 310 test cases...
bcrypted password: $2y$07$SCXqPUnXb1fqbVbAQFnOKOu7ZdVwvDZ4qjqMsswSfI2uIUUciXxLS
verify() took: 5.786ms
unknown location(0): fatal error: in "chart_test_WDateTimeChartMinutes": memory access violation at address: 0x18: no mapping at fault address
/home/mamadou/www/wt/work/wt-4.11.0/test/chart/WChartTest.C(72): last checkpoint: "chart_test_WDateTimeChartMinutes" test entry

*** 1 failure is detected in the test module "Master Test Suite"
__cxa_thread_call_dtors: dtr 0x827afeef0 from unloaded dso, skipping
Illegal instruction (core dumped)
*** Error code 132

Stop.
make: stopped in /home/mamadou/www/wt

So, not very sure what's the best approach here. Should I remove the tests altogether?
Comment 3 Mamadou Babaei 2024-10-10 17:47:58 UTC
Just for the clarification, since I did not mention from which line. I mean removing BUILD_TESTS from CMAKE_OFF

CMAKE_OFF=	BUILD_EXAMPLES ENABLE_MYSQLSERVER \
		ENABLE_QT4 ENABLE_QT5 ENABLE_QT6
CMAKE_TESTING_ON=	BUILD_TESTS
Comment 4 Zsolt Udvari freebsd_committer freebsd_triage 2024-10-11 05:07:44 UTC
(In reply to Mamadou Babaei from comment #2)
I would suggest the tests and if you can correct would be nice.

I've found similar error:https://stackoverflow.com/questions/14662956/boost-test-and-async-io-memory-access-violation-at-address-no-mapping-at-fau and an old bug report: https://redmine.emweb.be/boards/2/topics/5643?r=5757#message-5757
And maybe check various linuxes and BSDs about patches.
Comment 5 Mamadou Babaei 2024-10-16 04:23:30 UTC
Thank you! I reported it upstream to get their input: https://redmine.emweb.be/issues/13112
Comment 6 Mamadou Babaei 2024-10-17 09:36:15 UTC
I've got a response from the upstream and they found the root cause:

https://redmine.emweb.be/issues/13112#note-4

> I have been able to reproduce the issue. It is cause by the absence of any fonts on the system at all.
> Now I think this should obviously be handled cleaner by Wt (i.e. an exception/assert).

> But that would still lead to a failing test, which can be caught, but I think that's against the spirit of the test itself.

> So I suppose it's probably better to ensure that at least one font is installed as a dependency then.

I see two approaches now, as suggested we make a dependency on a default set of fons from Ports and install them. Or, patch it to disable that specific test.

What's your idea?
Comment 7 Mamadou Babaei 2024-10-17 09:37:42 UTC
Bad formatting sorry, here's the quoted reply:

> I have been able to reproduce the issue. It is cause by the absence
> of any fonts on the system at all.
> Now I think this should obviously be handled cleaner by Wt
> (i.e. an exception/assert).
>
> But that would still lead to a failing test, which can be caught,
> but I think that's against the spirit of the test itself.
>
> So I suppose it's probably better to ensure that at least one
> font is installed as a dependency then.
Comment 8 Zsolt Udvari freebsd_committer freebsd_triage 2024-10-17 18:39:14 UTC
(In reply to Mamadou Babaei from comment #6)
The better solution is install the tests dependencies and pass every test.
If you can't find which font is needed can disable (eg. with patch) failed tests. Or a last resort can set TESTING_UNSAFE variable (https://cgit.freebsd.org/ports/tree/Mk/Features/testing.mk#n7).
Comment 9 Mamadou Babaei 2024-10-19 21:56:55 UTC
Created attachment 254375 [details]
new patch

Managed to pass the failing test by adding a test dependency on roboto-fonts-ttf. But, there are other failures now.

Will reach out to upstream once more.


/home/mamadou/www/wt/work/wt-4.11.0/test/auth/PasswordServiceTest.C(140): fatal error: in "throttle_enabled_failure_with_last_attempt_offset_test": critical check f.myPasswordService_->delayForNextAttempt(user) == attemptResults[failures] has failed
Dbo.backend.Sqlite3: begin transaction
Dbo.backend.Sqlite3: drop table "auth_token"
Dbo.backend.Sqlite3: drop table "auth_identity"
Dbo.backend.Sqlite3: drop table "auth_info"
Dbo.backend.Sqlite3: drop table "user"
Dbo.backend.Sqlite3: commit transaction
Field: '1'
Field: 'a'
Field: 'b'
Field: 'a'
Field: 'b'
Field: ''1''
Field: ''1''
Field: ''Barts'' car''
Field: ''Barts'', car''
Field: 'bike'
Field: 'cast(round(number, 2) as text) AS column_number'
Field: 'region'
Field: 'product'
Field: 'SUM(quantity) AS product_units'
Field: 'SUM(amount) AS product_sales'
Field: 'a'
Field: 'b'
Field: 'c'
Field: 'from_a'
Field: 'from_b'
Field: 'a_from'
Field: 'b_from'
Field: 'from_a'
Field: 'from_b'
Field: 'a_from'
Field: 'b_from'
Field: 'from_a'
Field: 'SUM(SELECT from_b from table)'
Dbo.backend.Sqlite3: begin transaction
Dbo.backend.Sqlite3: create table "a" (
  "id" integer primary key autoincrement,
  "version" integer not null,
  "date" text,
  "date_time" text,
  "time_point" text
)
Dbo.backend.Sqlite3: commit transaction
Dbo.backend.Sqlite3: begin transaction
Dbo.backend.Sqlite3: insert into "a" ("version", "date", "date_time", "time_point") values (?, ?, ?, ?)
Dbo.backend.Sqlite3: commit transaction
Dbo.backend.Sqlite3: begin transaction
Dbo.backend.Sqlite3: SELECT date as col0, date_time as col1, time_point as col2 FROM a limit ?
Dbo.backend.Sqlite3: commit transaction
Dbo.backend.Sqlite3: begin transaction
Dbo.backend.Sqlite3: select "id", "version", "date", "date_time", "time_point" from "a"  limit ?
Dbo.backend.Sqlite3: commit transaction
Dbo.backend.Sqlite3: begin transaction
Dbo.backend.Sqlite3: create table "a" (
  "id" integer primary key autoincrement,
  "version" integer not null,
  "date" real,
  "date_time" real,
  "time_point" real
)
Dbo.backend.Sqlite3: commit transaction
Dbo.backend.Sqlite3: begin transaction
Dbo.backend.Sqlite3: insert into "a" ("version", "date", "date_time", "time_point") values (?, ?, ?, ?)
Dbo.backend.Sqlite3: commit transaction
Dbo.backend.Sqlite3: begin transaction
Dbo.backend.Sqlite3: 
          SELECT
            strftime('%Y-%m-%d', date) as col0,
            strftime('%Y-%m-%dT%H:%M:%f', date_time) as col1,
            strftime('%Y-%m-%dT%H:%M:%f', time_point) as col2
          FROM a
         limit ?
Dbo.backend.Sqlite3: 
          SELECT
            date as col0,
            julianday('1950-03-12') as col1,
            date_time as col2,
            julianday('1948-10-02T03:05:12.009') as col3,
            time_point as col4,
            julianday('1990-02-14T01:50:05.012') as col5
          FROM a
         limit ?
Dbo.backend.Sqlite3: commit transaction
Dbo.backend.Sqlite3: begin transaction
Dbo.backend.Sqlite3: select "id", "version", "date", "date_time", "time_point" from "a"  limit ?
Dbo.backend.Sqlite3: commit transaction
Dbo.backend.Sqlite3: begin transaction
Dbo.backend.Sqlite3: create table "a" (
  "id" integer primary key autoincrement,
  "version" integer not null,
  "date" integer,
  "date_time" integer,
  "time_point" integer
)
Dbo.backend.Sqlite3: commit transaction
Dbo.backend.Sqlite3: begin transaction
Dbo.backend.Sqlite3: insert into "a" ("version", "date", "date_time", "time_point") values (?, ?, ?, ?)
Dbo.backend.Sqlite3: commit transaction
Dbo.backend.Sqlite3: begin transaction
Dbo.backend.Sqlite3: 
          SELECT
            date as col0,
            strftime('%s', '1950-03-12') as col1,
            date_time as col2,
            strftime('%s', '1948-10-02T03:05:12') as col3,
            time_point as col4,
            strftime('%s', '1990-02-14T01:50:05') as col5
          FROM a
         limit ?
Dbo.backend.Sqlite3: commit transaction
Dbo.backend.Sqlite3: begin transaction
Dbo.backend.Sqlite3: select "id", "version", "date", "date_time", "time_point" from "a"  limit ?
Dbo.backend.Sqlite3: commit transaction

*** 1 failure is detected in the test module "Master Test Suite"
__cxa_thread_call_dtors: dtr 0x828e5bef0 from unloaded dso, skipping
*** Error code 201

Stop.
make: stopped in /home/mamadou/www/wt
root@fbsd-ports:/home/mamadou/www/wt #
Comment 10 Zsolt Udvari freebsd_committer freebsd_triage 2024-10-21 14:22:25 UTC
(In reply to Mamadou Babaei from comment #9)
For me works fine. I did `poudriere bulk -i -j JAILNAME www/wt', install the roboto-fonts-ttf, and in this jail run 'make test' (from /usr/ports/www/wt).

How did you run `make test'?
Comment 11 Mamadou Babaei 2024-10-21 14:54:48 UTC
(In reply to Zsolt Udvari from comment #10)

For maintaining ports I do have a Virtual Machine specifically for that purpose and I'm not using any jails.

I just modified it with:

TEST_RUN_DEPENDS=	roboto-fonts-ttf>=0:x11-fonts/roboto-fonts-ttf

And ran:

$ make test

But, I will investigate it later if it still fails for you.
Comment 12 Mamadou Babaei 2024-10-21 14:56:38 UTC
BTW, on the other DBO test failure from https://redmine.emweb.be/issues/13112#change-65705

> this is an issue I am aware of, and something that not all platforms seem to
> handle in the same way. It results from the usage of an 
> std::this_thread::sleep_for to verify authentication throttling functionality.
> Annoyingly this works fine most of the time, but since it depends on the
> scheduler, is not guaranteed. That's not good for a test obviously.
> 
> Ticket #13130 tracks it removal, and is part of 4.11.1. Making it part of
> 4.11.0 would be difficult now, as people have already started using it, and
> changing that release will lead to issues.
Comment 13 Mamadou Babaei 2024-10-21 14:57:03 UTC
I believe we need to patch it for that one.
Comment 14 Mamadou Babaei 2024-10-21 15:14:36 UTC
Created attachment 254423 [details]
a new patch passing all tests

This patch disabled the Wt/DBO test which is scheduled to be part of the next release v4.11.1 by upstream addressed in this commit: https://github.com/emweb/wt/commit/c1e6550451672f8c4e2a1f24caec6473261298f2

For me, it also passes the other failing test with the addition of the Roboto font.
Comment 15 Mamadou Babaei 2024-10-21 15:15:39 UTC
This is the output of make test:

*** No errors detected
__cxa_thread_call_dtors: dtr 0x8279b9ef0 from unloaded dso, skipping

I can remove the Roboto font and test again to see if it fails.
Comment 16 Mamadou Babaei 2024-10-21 15:23:43 UTC
So, just pkg removed roboto and removed the test dependency on the robot and again it fails for me:

====> Compressing man pages (compress-man)
===>  Testing for wt-4.11.0
Running 310 test cases...
bcrypted password: $2y$07$LRTxTSbyPhTMQkrtKTSxTuUtgylJiWkKSUzsZed.c42.Z/W3uTnBa
verify() took: 5.839ms
unknown location(0): fatal error: in "chart_test_WDateTimeChartMinutes": memory access violation at address: 0x18: no mapping at fault address
/home/mamadou/www/wt/work/wt-4.11.0/test/chart/WChartTest.C(72): last checkpoint: "chart_test_WDateTimeChartMinutes" test entry

*** 1 failure is detected in the test module "Master Test Suite"
__cxa_thread_call_dtors: dtr 0x828e58ef0 from unloaded dso, skipping
Illegal instruction (core dumped)
*** Error code 132

Stop.
make: stopped in /home/mamadou/www/wt


Re-added:

TEST_RUN_DEPENDS=	webfonts>=0:x11-fonts/webfonts

And then:

$ make test

However:

pkg info | grep roboto

Returned nothing. Which means ports is not installing it.

But, I added the following:

RUN_DEPENDS=	roboto-fonts-ttf>=0:x11-fonts/roboto-fonts-ttf
TEST_RUN_DEPENDS=	roboto-fonts-ttf>=0:x11-fonts/roboto-fonts-ttf

And then:

$ make test

Passes with flying colors.

I'll submit another patch.
Comment 17 Mamadou Babaei 2024-10-21 15:28:08 UTC
Created attachment 254426 [details]
patch that passes all tests

Passed all tests
Comment 18 Zsolt Udvari freebsd_committer freebsd_triage 2024-10-21 15:42:58 UTC
Sorry, I forgot to mention I rewrite TEST_RUN_DEPENDS to TEST_DEPENDS - IMHO there isn't exist TEST_RUN_DEPENDS variable. If you try it I hope your test will pass too :)
Comment 19 Mamadou Babaei 2024-10-21 16:04:49 UTC
Thank you for mentioning that, but I remember I saw it on some ports (as I usually look at other ports). Example:

https://lists.freebsd.org/archives/dev-commits-ports-all/2023-March/055699.html

I'll submit another patch then. Maybe it has been removed?
Comment 20 Mamadou Babaei 2024-10-21 16:13:28 UTC
Created attachment 254428 [details]
patch with only test_depends

This patch removes TEST_RUN_DEPENDS and RUN_DEPENDS and replaces it with TEST_DEPENDS.
Comment 21 Zsolt Udvari freebsd_committer freebsd_triage 2024-10-21 18:32:28 UTC
(In reply to Mamadou Babaei from comment #19)
I don't know. I think now it doesn't exist: if I try run 'make test' with TEST_RUN_DEPENDS the port system doesn't want install it - but with TEST_DEPENDS yes.
Here is the list of *_DEPENDS: https://cgit.freebsd.org/ports/tree/Mk/bsd.port.mk#n303
And if I `grep -r TEST /usr/ports/Mk/*' I couldn't find nothing about TEST_RUN_DEPENDS.

I'll ask it on mailing list because there are 8 ports which set TEST_RUN_DEPENDS.
Comment 22 Mamadou Babaei 2024-10-21 21:07:51 UTC
Thank you! Do not bother with it.

The last patch is with TEST_DEPENDS and withoutTEST_RUN_DEPENDS and it works fine
Comment 23 Zsolt Udvari freebsd_committer freebsd_triage 2024-10-22 18:00:08 UTC
Committed, thanks!
Comment 24 commit-hook freebsd_committer freebsd_triage 2024-10-22 18:00:29 UTC
A commit in branch main references this bug:

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

commit ca9312dc96c81093926046227427d0c1ccd9676f
Author:     Mamadou Babaei <info@babaei.net>
AuthorDate: 2024-10-22 17:55:40 +0000
Commit:     Zsolt Udvari <uzsolt@FreeBSD.org>
CommitDate: 2024-10-22 17:57:53 +0000

    www/wt: Update to 4.11.0

    Add TEST_DEPENDS
    Pet portfmt.

    Changelog: https://webtoolkit.eu/wt/doc/reference/html/Releasenotes.html

    PR:             281959
    Approved by:    submitter is maintainer

 www/wt/Makefile                                    | 83 +++++++++++-----------
 www/wt/distinfo                                    |  6 +-
 www/wt/files/patch-src_web_FileUtils.C (gone)      | 10 ---
 .../patch-test_auth_PasswordServiceTest.C (new)    | 31 ++++++++
 www/wt/pkg-plist                                   |  7 ++
 5 files changed, 83 insertions(+), 54 deletions(-)