Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / f7 / 96f9da6feeff8903e275cddb3ec3d635a73881
1 Return-Path: <wking@tremily.us>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id 6E0206DE0AF8\r
6  for <notmuch@notmuchmail.org>; Sat, 13 Feb 2016 22:31:39 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.007\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.007 tagged_above=-999 required=5 tests=[AWL=0.108, \r
12  DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13  RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled\r
14 Received: from arlo.cworth.org ([127.0.0.1])\r
15  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
16  with ESMTP id jHIQUFT-wLaf for <notmuch@notmuchmail.org>;\r
17  Sat, 13 Feb 2016 22:31:36 -0800 (PST)\r
18 Received: from resqmta-po-10v.sys.comcast.net (resqmta-po-10v.sys.comcast.net\r
19  [96.114.154.169])\r
20  by arlo.cworth.org (Postfix) with ESMTPS id 392CB6DE0A9A\r
21  for <notmuch@notmuchmail.org>; Sat, 13 Feb 2016 22:31:35 -0800 (PST)\r
22 Received: from resomta-po-19v.sys.comcast.net ([96.114.154.243])\r
23  by resqmta-po-10v.sys.comcast.net with comcast\r
24  id J6XV1s0025FMDhs016XaqT; Sun, 14 Feb 2016 06:31:34 +0000\r
25 Received: from mail.tremily.us ([73.221.72.168])\r
26  by resomta-po-19v.sys.comcast.net with comcast\r
27  id J6XY1s00J3dr3C9016XZ8s; Sun, 14 Feb 2016 06:31:33 +0000\r
28 Received: by mail.tremily.us (Postfix, from userid 1000)\r
29  id 7018C1BB1A75; Sat, 13 Feb 2016 22:31:32 -0800 (PST)\r
30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
31  t=1455431492; bh=doMnITzmjEm/nfzTRvyZujrx5mV36yKmPCZQnXGrkss=;\r
32  h=Date:From:To:Cc:Subject:References:In-Reply-To;\r
33  b=kF6iJAdjcQZJNAK/OlXWMxyBDmBpvLuEO1iVr4S+ldRN5+2BJtiVoFFscy0NfeJAh\r
34  7t1gdCKy2Llv2oUdvto6uohoafvUxg4C+3Tg4TOhmspysMMa5eBk+wERZSfbbllmMP\r
35  5No8kbxW7dJg41qh6uBUo8rnUDeTZNvMbDv1AUTU=\r
36 Date: Sat, 13 Feb 2016 22:31:32 -0800\r
37 From: "W. Trevor King" <wking@tremily.us>\r
38 To: David Bremner <david@tethera.net>\r
39 Cc: notmuch@notmuchmail.org\r
40 Subject: Re: problems with nmbug and empty prefix (UnicodeWarning and broken\r
41  pipe)\r
42 Message-ID: <20160214063132.GD4265@odin.tremily.us>\r
43 References: <87oabko293.fsf@zancas.localnet>\r
44  <20160213223357.GC4265@odin.tremily.us>\r
45  <87ziv4813v.fsf@zancas.localnet>\r
46 MIME-Version: 1.0\r
47 Content-Type: multipart/signed; micalg=pgp-sha1;\r
48  protocol="application/pgp-signature"; boundary="bMDD5T6Tp9Yu3dvb"\r
49 Content-Disposition: inline\r
50 In-Reply-To: <87ziv4813v.fsf@zancas.localnet>\r
51 OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;\r
52  url=http://tremily.us/pubkey.txt\r
53 User-Agent: Mutt/1.5.23 (2014-03-12)\r
54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
55  s=q20140121; t=1455431494;\r
56  bh=MDLTWBSn1+hD9ci3RkDBCXFTpKUbbeQrMCqIoP35rPQ=;\r
57  h=Received:Received:Received:Date:From:To:Subject:Message-ID:\r
58  MIME-Version:Content-Type;\r
59  b=mNvKfayACyMkwVoXxWH+zVhLzHNKowXBuMQGYImobuSr/78R7Ry48Oy6gWY/a5kxW\r
60  DDKHc9ALCbmwA+i+t/i3wOzj6qNUiD9ntvk9F0FBn07lG/ujf56gnB7/ZInWSGVeai\r
61  Y09Be4xqDNUeRGu0JApmiTbXS0phTFbr2w7n5rOn3cyjJY5qsL/dC7opgJa22xWLXb\r
62  5vYUY/EsfcztfIZLRC+7/DV+k87yzGY1RGEVhvPei6OmAVeXs/hGJuFAS43aT+76Zs\r
63  J6ARECHtk7ummoYNt6k36aZv4QeRd0uRnWHdBKaE4Qv5sCT+q2UNSy5dkMP4MmVDng\r
64  E6Cns7RLqNwIQ==\r
65 X-BeenThere: notmuch@notmuchmail.org\r
66 X-Mailman-Version: 2.1.20\r
67 Precedence: list\r
68 List-Id: "Use and development of the notmuch mail system."\r
69  <notmuch.notmuchmail.org>\r
70 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
71  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
73 List-Post: <mailto:notmuch@notmuchmail.org>\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
75 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
76  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
77 X-List-Received-Date: Sun, 14 Feb 2016 06:31:39 -0000\r
78 \r
79 \r
80 --bMDD5T6Tp9Yu3dvb\r
81 Content-Type: text/plain; charset=utf-8\r
82 Content-Disposition: inline\r
83 Content-Transfer-Encoding: quoted-printable\r
84 \r
85 On Sat, Feb 13, 2016 at 10:41:40PM -0400, David Bremner wrote:\r
86 > Traceback (most recent call last):\r
87 >   File "/home/bremner/.config/scripts/nmbug.real", line 834, in <module>\r
88 >     args.func(**kwargs)\r
89 >   File "/home/bremner/.config/scripts/nmbug.real", line 324, in commit\r
90 >     status =3D get_status()\r
91 >   File "/home/bremner/.config/scripts/nmbug.real", line 581, in get_status\r
92 >     index =3D _index_tags()\r
93 >   File "/home/bremner/.config/scripts/nmbug.real", line 621, in _index_ta=\r
94 gs\r
95 >     git.stdin.write(line)\r
96 \r
97 This traceback is pointing at what should be a stream write, so I\r
98 don't see how urllib is involved there at all.  I guess this traceback\r
99 ends up in the =E2=80=9CBroken pipe=E2=80=9D message from your original pos=\r
100 t?\r
101 \r
102 Dropping some debugging prints into the:\r
103 \r
104   for line in notmuch.stdout:\r
105 \r
106 block will likely get us close enough to figure out which line in the\r
107 =E2=80=98notmuch dump =E2=80=A6=E2=80=99 output causing the problem.\r
108 \r
109 > > We only call =E2=80=98notmuch dump =E2=80=A6=E2=80=99 from _index_tags,=\r
110  where dump's stdout is\r
111 > > tweaked and fed into =E2=80=98git update-index =E2=80=A6=E2=80=99.  You=\r
112 r urllib UnicodeWarning\r
113 > > suggests the issue lies in:\r
114 > >\r
115 > >   tags =3D [\r
116 > >       _unquote(tag[len(prefix):])\r
117 > >       for tag in tags_string.split()\r
118 > >       if tag.startswith(prefix)]\r
119 >=20\r
120 > Looking at the source for urllib, that line is actually in quote,\r
121 > which is called only from _hex_quote\r
122 \r
123 And we call _hex_quote from _index_tags_for_message, which is right\r
124 before the git.stdin.write line from your traceback.  So its certainly\r
125 possible that we're feeding _hex_quote something it can't handle in\r
126 Python 2.  If I could reproduce this locally, I'd probably drop a\r
127 debugging print in there as well:\r
128 \r
129   for tag in tags:\r
130       _LOG.debug('building a quoted path for {!r} / {!r}'.format(id, tag))\r
131       path =3D 'tags/{id}/{tag}'.format(\r
132           id=3D_hex_quote(string=3Did), tag=3D_hex_quote(string=3Dtag))\r
133       yield '{mode} {hash}\t{path}\n'.format(mode=3Dmode, hash=3Dhash, path=\r
134 =3Dpath)\r
135 \r
136 > Unfortunately despite my best efforts with filterwarnings, I\r
137 > couldn't figure out how to get a stack trace for that\r
138 > UnicodeWarning.\r
139 \r
140 I haven't spent much time with filterwarnings.  My guess is that:\r
141 \r
142   $ python -W error ./nmbug --log-level debug commit\r
143 \r
144 will turn it into a raised exception [1].  But you may have tried\r
145 that, and it may not have worked for some reason :p.\r
146 \r
147 If dropping debugging prints into the relevant code sections doesn't\r
148 turn up the problem, =E2=80=98strace -o /tmp/trace -f nmbug --log-level deb=\r
149 ug\r
150 commit=E2=80=99 will likely capture enough of the data moving between\r
151 processes for us to figure out what nmbug is choking on.\r
152 \r
153 Another alternative would be to check your list of censored tags for\r
154 anything that looks like it might contain Unicode-issue-triggering\r
155 characters.  What is your locale?  Do you have any tags with non-ASCII\r
156 characters?  You should be able to isolate this problem by iterating\r
157 through all your tags:\r
158 \r
159   $ for TAG in <censored>\r
160   > do\r
161   >   echo "${TAG}"\r
162   >   NMBPREFIX=3D"${TAG%?}" nmbug commit\r
163   > done\r
164 \r
165 and see which one acts up.\r
166 \r
167 Cheers,\r
168 Trevor\r
169 \r
170 [1]: https://docs.python.org/2/library/warnings.html#warning-filter\r
171 \r
172 --=20\r
173 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).\r
174 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy\r
175 \r
176 --bMDD5T6Tp9Yu3dvb\r
177 Content-Type: application/pgp-signature; name="signature.asc"\r
178 Content-Description: OpenPGP digital signature\r
179 \r
180 -----BEGIN PGP SIGNATURE-----\r
181 Version: GnuPG v2\r
182 \r
183 iQIcBAEBAgAGBQJWwB9BAAoJEAPqygegUbGsJ5wQAKiq2gt5YYHb02ZW4gT3nfv6\r
184 2QdO1FlUy9XhPhzwPKdK8NBeIZIhzI0Pu95/kXRauQxPgveZlgaDeBdEPYS9G1hf\r
185 yuwwfXKclqKF2dNnieJ7EkdZ2KqPkgOpVWjoffONzGGhNBMUIzFR1pwtoJwxHSwS\r
186 XE1Xhp91FBOQ2EbxTCHI1mgwQI49YVhZffIKkg2hrmIqieg/VgrU0fpEGVRCf6zr\r
187 yfk1sbUKRxG/fC+B5lLJHhbu+A3a2InJtlgk+IyXXv8UQcFIBA34sxYqWI6Jxujl\r
188 Jp5LM49DeiMmaL12PnDeCYJh6MfZdnVqq/LkeAzhVmVSNfRZ9DJUIr4zKlzY3lRU\r
189 Bxge7yaEH/ZboQMOM1y06UqHcIBY+05OZNjCep+I/4dlQlYmDPCBR7MY5WdACVl5\r
190 Je5F3Fr5ZZwyNT5K/6IhgWCT1d0IWIh8m0GY6VfsFasynzZLSEyOleU7SXFiQAjb\r
191 vpk5jWsUIOGlWEwXnv+h7kdwRvY9Q+w8h8wON1RAFI+hEvPV2XFq2xqjvXqebsRd\r
192 UdsFRxyQn7AWU3BuKGyo6p5RF1k3W+miCqnDR5h5IZSFQHTDjRUKcfP7rz0ep6CM\r
193 so4Y23NTuQbRK20POiE9Ig/3MeCwWYfqs2uMr8/dZ5jg0UCk4oXU/XLwnx50kPxx\r
194 injrOxzmqVKm4C9R1DtY\r
195 =1g4t\r
196 -----END PGP SIGNATURE-----\r
197 \r
198 --bMDD5T6Tp9Yu3dvb--\r