Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jul 2016 11:38:22 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        Thomas Eberhardt <sneakywumpus@gmail.com>, freebsd-stable@FreeBSD.org
Cc:        Baptiste Daroussin <bapt@FreeBSD.org>
Subject:   Re: stable/11 Problems with Unicode character and ls(1) sorting
Message-ID:  <dbe39521-43cc-f5bf-342b-aef8b8fc773d@FreeBSD.org>
In-Reply-To: <A00985AB-C9B7-4D22-B5D1-DF485370D8BF@gmail.com>
References:  <A00985AB-C9B7-4D22-B5D1-DF485370D8BF@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--EHAhWNSRlEopsxoJ6afFHvVWNgr0dCtO9
Content-Type: multipart/mixed; boundary="fGi1SI2nssCwtSl8pmgd2W25sg5kBhp0b"
From: Jung-uk Kim <jkim@FreeBSD.org>
To: Thomas Eberhardt <sneakywumpus@gmail.com>, freebsd-stable@FreeBSD.org
Cc: Baptiste Daroussin <bapt@FreeBSD.org>
Message-ID: <dbe39521-43cc-f5bf-342b-aef8b8fc773d@FreeBSD.org>
Subject: Re: stable/11 Problems with Unicode character and ls(1) sorting
References: <A00985AB-C9B7-4D22-B5D1-DF485370D8BF@gmail.com>
In-Reply-To: <A00985AB-C9B7-4D22-B5D1-DF485370D8BF@gmail.com>

--fGi1SI2nssCwtSl8pmgd2W25sg5kBhp0b
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 07/15/16 09:55 AM, Thomas Eberhardt wrote:
> % uname -a
> FreeBSD clarence.ocp.lan 11.0-BETA1 FreeBSD 11.0-BETA1 #0 r302457: Sat =
Jul  9 10:41:40 CEST 2016     thomas@clarence.ocp.lan:/usr/obj/usr/src/sy=
s/GENERIC  amd64
>=20
> % locale
> LANG=3Den_US.UTF-8
> LC_CTYPE=3D"en_US.UTF-8"
> LC_COLLATE=3D"en_US.UTF-8"
> LC_TIME=3D"en_US.UTF-8"
> LC_NUMERIC=3D"en_US.UTF-8"
> LC_MONETARY=3D"en_US.UTF-8"
> LC_MESSAGES=3D"en_US.UTF-8"
> LC_ALL=3D
>=20
> % mkdir x
> % touch x/=C3=86on1
> % ls x
> =C3=86on1
> % touch x/=C3=86on2
> % ls -f x=20
> .     ..    =C3=86on1  =C3=86on2
> % ls -f x | hd
> 00000000  2e 0a 2e 2e 0a c3 86 6f  6e 31 0a c3 86 6f 6e 32  |.......on1=
=2E..on2|
> 00000010  0a                                                |.|
> 00000011
> % ls x
> [hangs and consumes 100% CPU]
> ^C
>=20
> % gdb /bin/ls
> [=E2=80=A6]
> (gdb) run x
> Starting program: /bin/ls x
> [hangs]
> ^C
> Program received signal SIGINT, Interrupt.
> 0x0000000800ffa9dd in _collate_lookup (table=3D<value optimized out>, t=
=3D<value optimized out>,=20
>     len=3D<value optimized out>, pri=3D<value optimized out>, which=3D<=
value optimized out>, state=3D<value optimized out>)
>     at /usr/src/lib/libc/locale/collate.c:340
> 340			*pri =3D table->char_pri_table[*t].pri[which];
> Current language:  auto; currently minimal
> (gdb) bt
> #0  0x0000000800ffa9dd in _collate_lookup (table=3D<value optimized out=
>, t=3D<value optimized out>,=20
>     len=3D<value optimized out>, pri=3D<value optimized out>, which=3D<=
value optimized out>, state=3D<value optimized out>)
>     at /usr/src/lib/libc/locale/collate.c:340
> #1  0x0000000800fdc38a in wcscoll_l (ws1=3D<value optimized out>, ws2=3D=
<value optimized out>,=20
>     locale=3D<value optimized out>) at /usr/src/lib/libc/string/wcscoll=
=2Ec:158
> #2  0x0000000800fd9071 in strcoll_l (s=3D<value optimized out>, s2=3D<v=
alue optimized out>, locale=3D0x80124f338)
>     at /usr/src/lib/libc/string/strcoll.c:101
> #3  0x0000000800fee253 in qsort (a=3D<value optimized out>, n=3D<value =
optimized out>, es=3D<value optimized out>,=20
>     cmp=3D0x800f28530 <fts_compar>) at /usr/src/lib/libc/stdlib/qsort.c=
:130
> #4  0x0000000800f27397 in fts_sort (sp=3D<value optimized out>, head=3D=
<value optimized out>, nitems=3D<value optimized out>)
>     at /usr/src/lib/libc/gen/fts.c:995
> #5  0x0000000800f2848e in fts_children (sp=3D<value optimized out>, ins=
tr=3DError accessing memory address 0x2: Bad address.
> ) at /usr/src/lib/libc/gen/fts.c:570
> #6  0x00000000004030df in traverse (argc=3D<value optimized out>, argv=3D=
<value optimized out>,=20
>     options=3D<value optimized out>) at /usr/src/bin/ls/ls.c:576
> #7  0x0000000000402eeb in main (argc=3D<value optimized out>, argv=3D<v=
alue optimized out>) at /usr/src/bin/ls/ls.c:498
> #8  0x00000000004020cf in _start ()
> #9  0x0000000800629000 in ?? ()
> #10 0x0000000000000000 in ?? ()
> (gdb) br strcoll.c:101
> Breakpoint 1 at 0x800fd9063: file /usr/src/lib/libc/string/strcoll.c, l=
ine 101.
> (gdb) run
> The program being debugged has been started already.
> Start it from the beginning? (y or n) y
> Starting program: /bin/ls x
> [=E2=80=A6]
>=20
> Breakpoint 1, strcoll_l (s=3D<value optimized out>, s2=3D<value optimiz=
ed out>, locale=3D0x80124f338)
>     at /usr/src/lib/libc/string/strcoll.c:101
> 101		ret =3D wcscoll_l(w1, w2, locale);
> (gdb) n
> [wcscoll_l never returns]
>=20
>=20
> Does anybody know what=E2=80=99s going on? This is on a ZFS filesystem =
if that matters.

Yes, it is a known problem and bapt is working on it.  If you're in
hurry, reverting r302324 will fix the regression for now.

https://svnweb.freebsd.org/changeset/base/302324

FYI, this problem is tracked as PR211135.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211135

Jung-uk Kim


--fGi1SI2nssCwtSl8pmgd2W25sg5kBhp0b--

--EHAhWNSRlEopsxoJ6afFHvVWNgr0dCtO9
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXiQNzAAoJEHyflib82/FGKcAH/jXYOsFMkhBzU1TW1O7yyQ1A
ZWtFXyUT7xtUfzI3bl+Sd89Qadby7BpJ8uFNks0vm53xRWrXlxlUC1BwtNgURHKm
KB7DNopZ5dzcBcJNCK2Ce1Hz0d7ZnuRZZ1vnnYBzHqx28ubZ5Vtbi4df7w9tGiSJ
UAnaaQChkFiV8nHbxvRPWYUMbiz+aDclLt3kySpU2SI0oTvVxpJm0Cbvwp4oDJmu
QNFPpHLm+2APnPS6KXgoYFt0Kkpp92jTOVfTFGkTS7gSf6f9n6oHr3UwGMRs43Ca
UxfGuRY5Za+gCuE3h3AkXOBp+BDg9rjosbz1Xhu5WFRzeLLl5N8fzZ35RxxSQq4=
=Wa/e
-----END PGP SIGNATURE-----

--EHAhWNSRlEopsxoJ6afFHvVWNgr0dCtO9--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?dbe39521-43cc-f5bf-342b-aef8b8fc773d>