On 06.04.22 16:46, David Osborne wrote:
On Wed, 6 Apr 2022 at 14:53, Gustaf Neumann <neum...@wu.ac.at> wrote:
Hi David,
i will setup a VM for testing in your configuration, but first i
have to
understand, what pt1/pt2 means.
*
*
*Sorry that is just an abbreviation for "part1" and "part2" of a 2
part email.
*
ok, i thought there is a version called "Debian Buster pt1".... but
could not find insights via googling :)
*"tcl8.6" debian supplied package version 8.6.9+dfsg-2*
This seems to be a part of the problem. Tcl 8.6.9 was released in nov
2018 and has
probably some issues with UTF-8 which were fixed in later releases.
i have just now installed NaviServer on a fresh Debian Buster machine
using my usual install script [1] (using Tcl 8.6.11) and everything
looks ok. It is not unlikely that the problem with ns_strcoll is
related, since one has to translate the "internal" UTF-8 to the external
variant before calling "strcoll_l()", so, when this step is broken, then
there might be some invalid memory around.
For you, it would the best to use a newer version of Tcl. There are
newer Debian packages of Tcl around...
https://packages.debian.org/search?keywords=tcl
Is this an option for you?
Not sure, how NaviServer could address the problem. Deactivating the
ns_strcoll command in NaviServer when it is compiled with Tcl 8.6.9 or
older, is probably no good option, since the UTF-to-external conversion
is now all over the place and the problem will pop up at other places.
We can consider deactivating the UTF-to-external conversion altogether
for older Tcl version (requires several changes, including PostgreSQL
driver) ... but the many tests will fail as well, which have to be
deactivated as well.
What do you think?
-gn
# cat /etc/debian_version
10.12
...
[06/Apr/2022:17:06:44][23784.7fa1b0695800][-main:conf-] Notice: nsmain:
NaviServer/4.99.23 (tar-4.99.23) starting
...
all.tcl: Total 1860 Passed 1834 Skipped 26 Failed 0
Sourced 72 Test Files.
Number of tests skipped for each constraint:
20 !usingExternalToUtf
2 binaryMismatch
1 copyAliasBug
2 knownBug
1 stress
root@buster:/usr/local/src/naviserver-4.99.23# uname -a
Linux buster 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2 (2020-04-29) x86_64
GNU/Linux
root@buster:/usr/local/src/naviserver-4.99.23# ls -l
/lib/x86_64-linux-gnu/libc.so.6
lrwxrwxrwx 1 root root 12 Mar 15 22:48 /lib/x86_64-linux-gnu/libc.so.6 ->
libc-2.28.so
root@buster:/usr/local/src/naviserver-4.99.23# make memcheck TESTFLAGS="-verbose
start -file misc.test"
...
---- ns_trim-1.5 start
---- ns_trim-2.1 start
---- ns_trim-2.2 start
---- ns_quotehtml start
---- ns_strcoll-1.0.0 start
---- ns_strcoll-1.0.1 start
---- ns_strcoll-1.0.2 start
---- ns_strcoll-1.1 start
---- ns_strcoll-1.2 start
[1] https://github.com/gustafn/install-ns
The setup based on install-ns.sh [1] of the release was tested with:
macOS 11.6.2, Rocky Linux 8.5, Ubuntu 20.04, OpenBSD 6.9,
FreeBSD 13.1
The situation of strcoll is also platform dependent (depends on
version
of libc, e.g. the detail behavior is different on *BSD to the tested
Linux versions - but identical on the test cases). Maybe we have to
deactivate it for some platforms until these contain working versions.
all the best
-g
[1] https://github.com/gustafn/install-ns
On 06.04.22 13:24, David Osborne wrote:
> Hi there,
>
> We're trying to do a build of the official NaviServer v4.99.23
release
> (from the sourceforge tarball) on Debian Buster (10.12) but we're
> getting some failed tests.
>
> First one is encoding_ns_http-1.1
>
> Seems it's serving an Emoji but the expected content-length is
wrong
> upon receiving it.
> I see there's been some discussion about Emoji support since
4.99.23
> (which I don't fully understand) - not sure if that's relevant
here..
>
> * Test in question:
>
> test encoding_ns_http-1.1 {
> Send body with ns_return and charset utf-8
> } -constraints usingExternalToUtf -setup {
> ns_register_proc GET /encoding {
> ns_return 200 "text/plain; charset=utf-8" "äöü😃"
> }
> } -body {
> set result [ns_http run [ns_config test listenurl]/encoding]
> set headers [dict get $result headers]
> list [dict get $result status] \
> [ns_set iget $headers Content-Type] \
> [ns_set iget $headers Content-Length] \
> [dict get $result body]
> } -cleanup {
> ns_unregister_op GET /encoding
> } -result [list 200 "text/plain; charset=utf-8" 10 "äöü😃"]
>
>
> * Reproduction steps below.
>
> $ uname -a
> Linux ip-172-0-1-61 4.19.0-18-cloud-amd64 #1 SMP Debian 4.19.208-1
> (2021-09-29) x86_64 GNU/Linux
> $ cat /etc/debian_version
> 10.12
> $ locale
> LANG=C.UTF-8
> LANGUAGE=
> LC_CTYPE="C.UTF-8"
> LC_NUMERIC="C.UTF-8"
> LC_TIME="C.UTF-8"
> LC_COLLATE="C.UTF-8"
> LC_MONETARY="C.UTF-8"
> LC_MESSAGES="C.UTF-8"
> LC_PAPER="C.UTF-8"
> LC_NAME="C.UTF-8"
> LC_ADDRESS="C.UTF-8"
> LC_TELEPHONE="C.UTF-8"
> LC_MEASUREMENT="C.UTF-8"
> LC_IDENTIFICATION="C.UTF-8"
> LC_ALL=
>
> $ apt-get install build-essential git automake tcl8.6-dev libssl-dev
> $ cd naviserver-4.99.23
> $ ./autogen.sh --disable-ipv6 --with-tcl=/usr/lib/tcl8.6
> --enable-rpath --enable-threads --enable-symbols
> $ make
> $ make test
> <snip>
> ==== encoding_ns_http-1.1 Send body with ns_return and charset
utf-8
> FAILED
> ==== Contents of test case:
>
> set result [ns_http run [ns_config test listenurl]/encoding]
> set headers [dict get $result headers]
> list [dict get $result status] [ns_set iget $headers
> Content-Type] [ns_set iget $headers Content-Length] [dict get
> $result body]
>
> ---- Result was:
> 200 {text/plain; charset=utf-8} 14 äöü😃
> ---- Result should have been (exact matching):
> 200 {text/plain; charset=utf-8} 10 äöü😃
> ==== encoding_ns_http-1.1 FAILED
>
> Can anyone shed any light?
> Regards,
> --
> David
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel
--
David
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel
--
Univ.Prof. Dr. Gustaf Neumann
Head of the Institute of Information Systems and New Media
of Vienna University of Economics and Business
Program Director of MSc "Information Systems"
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel