* b4 splat
@ 2021-12-09 21:08 Rob Herring
2021-12-09 21:31 ` Konstantin Ryabitsev
2021-12-09 21:47 ` Alexandre Belloni
0 siblings, 2 replies; 4+ messages in thread
From: Rob Herring @ 2021-12-09 21:08 UTC (permalink / raw)
To: Konstantin Ryabitsev, tools; +Cc: users
Hi Konstantin,
I'm seeing a splat from b4 on this thread. I briefly looked at it, but
don't see the problem. The email looks pretty 'normal' to me.
Rob
$ b4 -d mbox 20211209172206.17778-3-sumitg@nvidia.com
Running git --no-pager config -z --get-regexp b4\..*
Running git --no-pager config -z --get-regexp get-lore-mbox\..*
Running git --no-pager config -z --get-regexp gpg\..*
Looking up https://x-lore.kernel.org/r/20211209172206.17778-3-sumitg%40nvidia.com
t_mbx_url=https://x-lore.kernel.org/all/20211209172206.17778-3-sumitg%40nvidia.com/t.mbox.gz
Using cached copy:
/home/rob/.cache/b4/efa2c648ff0f4928169fcc154d99c92552a9ff56.pi.msgs
Looking at: 20211209172206.17778-1-sumitg@nvidia.com
Looking at: 20211209172206.17778-9-sumitg@nvidia.com
Going into maybe:
20211209172206.17778-1-sumitg@nvidia.com->20211209172206.17778-9-sumitg@nvidia.com
Looking at: 20211209172206.17778-4-sumitg@nvidia.com
Going into maybe:
20211209172206.17778-1-sumitg@nvidia.com->20211209172206.17778-4-sumitg@nvidia.com
Looking at: 20211209172206.17778-3-sumitg@nvidia.com
Kept in thread: 20211209172206.17778-3-sumitg@nvidia.com
Looking at: 20211209172206.17778-2-sumitg@nvidia.com
Kept in thread: 20211209172206.17778-2-sumitg@nvidia.com
Looking at: 20211209172206.17778-5-sumitg@nvidia.com
Kept in thread: 20211209172206.17778-5-sumitg@nvidia.com
Looking at: 20211209172206.17778-8-sumitg@nvidia.com
Kept in thread: 20211209172206.17778-8-sumitg@nvidia.com
Looking at: 20211209172206.17778-7-sumitg@nvidia.com
Kept in thread: 20211209172206.17778-7-sumitg@nvidia.com
Looking at: 20211209172206.17778-6-sumitg@nvidia.com
Kept in thread: 20211209172206.17778-6-sumitg@nvidia.com
Looking at: 20211209172206.17778-1-sumitg@nvidia.com
Kept in thread: 20211209172206.17778-1-sumitg@nvidia.com
Looking at: 20211209172206.17778-9-sumitg@nvidia.com
Kept in thread: 20211209172206.17778-9-sumitg@nvidia.com
Looking at: 20211209172206.17778-4-sumitg@nvidia.com
Kept in thread: 20211209172206.17778-4-sumitg@nvidia.com
9 messages in the thread
Traceback (most recent call last):
File "/home/rob/.local/bin/b4", line 33, in <module>
sys.exit(load_entry_point('b4', 'console_scripts', 'b4')())
File "/home/rob/proj/git/b4/b4/command.py", line 272, in cmd
cmdargs.func(cmdargs)
File "/home/rob/proj/git/b4/b4/command.py", line 64, in cmd_mbox
b4.mbox.main(cmdargs)
File "/home/rob/proj/git/b4/b4/mbox.py", line 782, in main
b4.save_git_am_mbox(msgs, fh)
File "/home/rob/proj/git/b4/b4/__init__.py", line 2451, in save_git_am_mbox
gen.flatten(msg, unixfrom=True)
File "/usr/lib/python3.9/email/generator.py", line 116, in flatten
self._write(msg)
File "/usr/lib/python3.9/email/generator.py", line 181, in _write
self._dispatch(msg)
File "/usr/lib/python3.9/email/generator.py", line 218, in _dispatch
meth(msg)
File "/usr/lib/python3.9/email/generator.py", line 247, in _handle_text
msg.set_payload(payload, charset)
File "/usr/lib/python3.9/email/message.py", line 315, in set_payload
payload = payload.encode(charset.output_charset)
LookupError: unknown encoding: y
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: b4 splat
2021-12-09 21:08 b4 splat Rob Herring
@ 2021-12-09 21:31 ` Konstantin Ryabitsev
2021-12-09 21:59 ` Rob Herring
2021-12-09 21:47 ` Alexandre Belloni
1 sibling, 1 reply; 4+ messages in thread
From: Konstantin Ryabitsev @ 2021-12-09 21:31 UTC (permalink / raw)
To: Rob Herring; +Cc: tools, users
On Thu, Dec 09, 2021 at 03:08:52PM -0600, Rob Herring wrote:
> Hi Konstantin,
>
> I'm seeing a splat from b4 on this thread. I briefly looked at it, but
> don't see the problem. The email looks pretty 'normal' to me.
We definitely shouldn't crash there, but the submitter indeed managed to do
something very strange:
Content-Type: text/plain; charset="y"
https://lore.kernel.org/all/20211209172206.17778-5-sumitg@nvidia.com/
Amusingly, we handle this weird corner-case in "b4 am" just not in "b4 mbox".
-K
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: b4 splat
2021-12-09 21:08 b4 splat Rob Herring
2021-12-09 21:31 ` Konstantin Ryabitsev
@ 2021-12-09 21:47 ` Alexandre Belloni
1 sibling, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2021-12-09 21:47 UTC (permalink / raw)
To: Rob Herring; +Cc: Konstantin Ryabitsev, tools, users
On 09/12/2021 15:08:52-0600, Rob Herring wrote:
> Hi Konstantin,
>
> I'm seeing a splat from b4 on this thread. I briefly looked at it, but
> don't see the problem. The email looks pretty 'normal' to me.
>
> Rob
>
> $ b4 -d mbox 20211209172206.17778-3-sumitg@nvidia.com
> Running git --no-pager config -z --get-regexp b4\..*
> Running git --no-pager config -z --get-regexp get-lore-mbox\..*
> Running git --no-pager config -z --get-regexp gpg\..*
> Looking up https://x-lore.kernel.org/r/20211209172206.17778-3-sumitg%40nvidia.com
> t_mbx_url=https://x-lore.kernel.org/all/20211209172206.17778-3-sumitg%40nvidia.com/t.mbox.gz
> Using cached copy:
> /home/rob/.cache/b4/efa2c648ff0f4928169fcc154d99c92552a9ff56.pi.msgs
> Looking at: 20211209172206.17778-1-sumitg@nvidia.com
> Looking at: 20211209172206.17778-9-sumitg@nvidia.com
> Going into maybe:
> 20211209172206.17778-1-sumitg@nvidia.com->20211209172206.17778-9-sumitg@nvidia.com
> Looking at: 20211209172206.17778-4-sumitg@nvidia.com
> Going into maybe:
> 20211209172206.17778-1-sumitg@nvidia.com->20211209172206.17778-4-sumitg@nvidia.com
> Looking at: 20211209172206.17778-3-sumitg@nvidia.com
> Kept in thread: 20211209172206.17778-3-sumitg@nvidia.com
> Looking at: 20211209172206.17778-2-sumitg@nvidia.com
> Kept in thread: 20211209172206.17778-2-sumitg@nvidia.com
> Looking at: 20211209172206.17778-5-sumitg@nvidia.com
> Kept in thread: 20211209172206.17778-5-sumitg@nvidia.com
> Looking at: 20211209172206.17778-8-sumitg@nvidia.com
> Kept in thread: 20211209172206.17778-8-sumitg@nvidia.com
> Looking at: 20211209172206.17778-7-sumitg@nvidia.com
> Kept in thread: 20211209172206.17778-7-sumitg@nvidia.com
> Looking at: 20211209172206.17778-6-sumitg@nvidia.com
> Kept in thread: 20211209172206.17778-6-sumitg@nvidia.com
> Looking at: 20211209172206.17778-1-sumitg@nvidia.com
> Kept in thread: 20211209172206.17778-1-sumitg@nvidia.com
> Looking at: 20211209172206.17778-9-sumitg@nvidia.com
> Kept in thread: 20211209172206.17778-9-sumitg@nvidia.com
> Looking at: 20211209172206.17778-4-sumitg@nvidia.com
> Kept in thread: 20211209172206.17778-4-sumitg@nvidia.com
> 9 messages in the thread
> Traceback (most recent call last):
> File "/home/rob/.local/bin/b4", line 33, in <module>
> sys.exit(load_entry_point('b4', 'console_scripts', 'b4')())
> File "/home/rob/proj/git/b4/b4/command.py", line 272, in cmd
> cmdargs.func(cmdargs)
> File "/home/rob/proj/git/b4/b4/command.py", line 64, in cmd_mbox
> b4.mbox.main(cmdargs)
> File "/home/rob/proj/git/b4/b4/mbox.py", line 782, in main
> b4.save_git_am_mbox(msgs, fh)
> File "/home/rob/proj/git/b4/b4/__init__.py", line 2451, in save_git_am_mbox
> gen.flatten(msg, unixfrom=True)
> File "/usr/lib/python3.9/email/generator.py", line 116, in flatten
> self._write(msg)
> File "/usr/lib/python3.9/email/generator.py", line 181, in _write
> self._dispatch(msg)
> File "/usr/lib/python3.9/email/generator.py", line 218, in _dispatch
> meth(msg)
> File "/usr/lib/python3.9/email/generator.py", line 247, in _handle_text
> msg.set_payload(payload, charset)
> File "/usr/lib/python3.9/email/message.py", line 315, in set_payload
> payload = payload.encode(charset.output_charset)
> LookupError: unknown encoding: y
>
This is a common error: the declared charset is y which isn't a thing.
What happens is that the submitter gets to the following git prompt:
The following files are 8bit, but do not declare a Content-Transfer-Encoding.
something.patch
Which 8bit encoding should I declare [UTF-8]?
At that point, y was pressed instead of enter.
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: b4 splat
2021-12-09 21:31 ` Konstantin Ryabitsev
@ 2021-12-09 21:59 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-12-09 21:59 UTC (permalink / raw)
To: Konstantin Ryabitsev; +Cc: tools, users
On Thu, Dec 9, 2021 at 3:31 PM Konstantin Ryabitsev
<konstantin@linuxfoundation.org> wrote:
>
> On Thu, Dec 09, 2021 at 03:08:52PM -0600, Rob Herring wrote:
> > Hi Konstantin,
> >
> > I'm seeing a splat from b4 on this thread. I briefly looked at it, but
> > don't see the problem. The email looks pretty 'normal' to me.
>
> We definitely shouldn't crash there, but the submitter indeed managed to do
> something very strange:
>
> Content-Type: text/plain; charset="y"
Ahh, when I add a print of 'msg' before the splat, it's just
'Content-Type: text/plain'. I guess the object's repr() method handles
it.
Rob
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-09 22:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 21:08 b4 splat Rob Herring
2021-12-09 21:31 ` Konstantin Ryabitsev
2021-12-09 21:59 ` Rob Herring
2021-12-09 21:47 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).