From owner-freebsd-stable@freebsd.org Fri Jul 15 23:10:34 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90C94B997E7 for ; Fri, 15 Jul 2016 23:10:34 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-lf0-x236.google.com (mail-lf0-x236.google.com [IPv6:2a00:1450:4010:c07::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 04A011B04; Fri, 15 Jul 2016 23:10:34 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-lf0-x236.google.com with SMTP id b199so97786711lfe.0; Fri, 15 Jul 2016 16:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xWZXpuuZ3E0/y9y0ZwFoijBovr4cq7rqeg86PZJGugY=; b=x0n5HNIo/ugHeAkPMldWnFHRgkdLH0Jjbu1QEPIuDNyVEG//Mv4dOgyR/PQD5O3uPp GVtcw7ZYOKazWN5YNenJn2okBxXmIAccE0zx2HBv5VXD839Je1OLl2AmxXSivQZtZmGp JmzcO2w9X5Z0R27bL+xdSTcjXYHGI0ZFZDtoMZaeKlaITh0aLJ3J1C45XVKYqk5Iq9xa spG4YeVBZt8yU+PNPb6vz73KqGVq/aZqf6uzcndLrh+Iy1VvS5WZ4sZg/l5EyggS7tJf WZoa+DxnOuy9Zyst3yQyNo1upLJFx5tEuimXADBDo9mVtrLc6nNc7GV+mH8usXAH4OsT vqqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=xWZXpuuZ3E0/y9y0ZwFoijBovr4cq7rqeg86PZJGugY=; b=mjWWtsuw0PDUfnAlNBcuNQexnDcPCkHu1qnIEMXe2znFCZTAJGfMZ8nKM+WdaSadcE XNA6ObA2cQR5ligPmvN4cfW85mgTY28MD23X0WkhbVU+1HZpTYue5ohQUsGYigv8O4nZ Q4m9ZVYKQhIZKW0qdhfRnxwkK2qfXMtIIAQlQrKrf4eFUDD1llt4e1iBEcWM5E87AnpA w3MBh/5CyF9y+MgGIUinYGhHTHB7SbyQQLzEJXS9eDxYsqSV+t0MkBk6zQmcDEZ3s4Xa kwyDBv/gm7ksCty7reO8ZJiLEIbB9Jm7aAZtgK+cy/7vL+yCDvYmV0CpYlgCsjtiPfWV UQqQ== X-Gm-Message-State: ALyK8tLEZ8Lbz0jPa5iXaX103MuDQOX4opv6YFX79acH47Mphqdwag8n+88rMGJ35Qlmhw== X-Received: by 10.25.35.9 with SMTP id j9mr11218890lfj.6.1468624232130; Fri, 15 Jul 2016 16:10:32 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id h9sm403464lfe.8.2016.07.15.16.10.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jul 2016 16:10:31 -0700 (PDT) Sender: Baptiste Daroussin Date: Sat, 16 Jul 2016 01:10:30 +0200 From: Baptiste Daroussin To: Jung-uk Kim Cc: Thomas Eberhardt , freebsd-stable@FreeBSD.org Subject: Re: stable/11 Problems with Unicode character and ls(1) sorting Message-ID: <20160715231030.k6ywbzdgi43lom33@ivaldir.etoilebsd.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kdm5ptxooynwc6ol" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1-neo (2016-06-11) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 23:10:34 -0000 --kdm5ptxooynwc6ol Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 15, 2016 at 11:38:22AM -0400, Jung-uk Kim wrote: > 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/sys/= 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, t= =3D,=20 > > len=3D, pri=3D, which=3D<= value optimized out>, state=3D) > > 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, t=3D,=20 > > len=3D, pri=3D, which=3D<= value optimized out>, state=3D) > > at /usr/src/lib/libc/locale/collate.c:340 > > #1 0x0000000800fdc38a in wcscoll_l (ws1=3D, ws2= =3D,=20 > > locale=3D) at /usr/src/lib/libc/string/wcscoll= =2Ec:158 > > #2 0x0000000800fd9071 in strcoll_l (s=3D, s2=3D, locale=3D0x80124f338) > > at /usr/src/lib/libc/string/strcoll.c:101 > > #3 0x0000000800fee253 in qsort (a=3D, n=3D, es=3D,=20 > > cmp=3D0x800f28530 ) at /usr/src/lib/libc/stdlib/qsort.c= :130 > > #4 0x0000000800f27397 in fts_sort (sp=3D, head=3D= , nitems=3D) > > at /usr/src/lib/libc/gen/fts.c:995 > > #5 0x0000000800f2848e in fts_children (sp=3D, ins= tr=3DError accessing memory address 0x2: Bad address. > > ) at /usr/src/lib/libc/gen/fts.c:570 > > #6 0x00000000004030df in traverse (argc=3D, argv= =3D,=20 > > options=3D) at /usr/src/bin/ls/ls.c:576 > > #7 0x0000000000402eeb in main (argc=3D, argv=3D) 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, s2=3D, 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. >=20 > 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. >=20 > https://svnweb.freebsd.org/changeset/base/302324 >=20 > FYI, this problem is tracked as PR211135. >=20 > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211135 >=20 > Jung-uk Kim >=20 Fixed by: r302916. I'll merge it in 2 days in stable/11 if re@ agrees Best regards, Bapt --kdm5ptxooynwc6ol Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXiW1jAAoJEGOJi9zxtz5apRQQAJAhIf4pBa2IRoHkm6o/rjPI ZlsLUyolmloeCXrp8RnWcCKONku0kPpu+Ew1q3qCAc0sT8usL56Hcg05Vk0Igj0k tZ55pWRrIPhPhOdzZY06K8crKRJBKERCe4K/hCWsUq5iHBBLMzwDPtO4FfBB+mF/ Vrg8232FgqcNKwV2hSjkLjRT3ymYbl4Uqm/GlQlOmi9hQBXN2SdbswOexG4rSvZR ofgVXjles+D3Z+3kg5hyONsZbvjeKJ+i5TdEoQYEb7dy1G1+/tl3Ww9/fCzqRTeU +q4zQUfTkp4PQshqdxMZ5UtIufRXSzfLrv8FqMqga1F0c+qPCwi9JyOQP39aVMHr XwgcrWoXim4Z1QOKgjcnyP7ZAxbZXIL9OxrL1r2up0aGDzRCAhpjsoLx0sbVUANS zeDnTD9vSfguM6pfF0mQDhrB9n4hJt3yoADhoLPoAYqWpnoSCTY8EeIbzSdnk4P1 bbAEpDlo0Upj0lua2zfrwqL+mc38Uq793NtJgQgMseR3kTC60ffS5m/efEBCFgdZ pkox4e8iQb0Z3ZxYDwPpo+YlylK1FrUlv/gwg094JoAGm9BoCqa8fM18djYp+mbg 1zzZMnuUIuKL6I8EIVUIe3oPi4jaZhx0//mHu2Xjo98yl6iJGY15Dixd9SMHQDvc o8SUzDXNssLUEpf3H1wI =iwYb -----END PGP SIGNATURE----- --kdm5ptxooynwc6ol--