[issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks

2021-11-18 Thread STINNER Victor

STINNER Victor  added the comment:

> Thanks, Victor! ✨ 🍰 ✨

I'm curious to know if the traceback became a little more readable than  
msg406480 with this minor enhancement ;-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks

2021-11-17 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks, Victor! ✨ 🍰 ✨

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks

2021-11-17 Thread Łukasz Langa

Change by Łukasz Langa :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks

2021-11-17 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset ac89f8cab79800195687dd141de472f90c626ec3 by Miss Islington (bot) 
in branch '3.9':
bpo-45831: _Py_DumpASCII() uses a single write() call if possible (GH-29596) 
(GH-29597)
https://github.com/python/cpython/commit/ac89f8cab79800195687dd141de472f90c626ec3


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks

2021-11-17 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 4ffde90dccd741b04a448f2e44f0b82a41b6fe96 by Miss Islington (bot) 
in branch '3.10':
bpo-45831: _Py_DumpASCII() uses a single write() call if possible (GH-29596) 
(GH-29598)
https://github.com/python/cpython/commit/4ffde90dccd741b04a448f2e44f0b82a41b6fe96


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks

2021-11-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +27841
pull_request: https://github.com/python/cpython/pull/29598

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks

2021-11-17 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +27840
pull_request: https://github.com/python/cpython/pull/29597

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks

2021-11-17 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset b919d8105c4d77f00509b6d3ab2073f09db640de by Victor Stinner in 
branch 'main':
bpo-45831: _Py_DumpASCII() uses a single write() call if possible (GH-29596)
https://github.com/python/cpython/commit/b919d8105c4d77f00509b6d3ab2073f09db640de


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks

2021-11-17 Thread STINNER Victor


STINNER Victor  added the comment:

> This is also a performance issue

Yep. On Windows, it already happened to me to see characters written one by one 
when the machine and the terminal was super slow. I expect faster dump if an 
ASCII string can be written at once.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks

2021-11-17 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
nosy: +vstinner
nosy_count: 1.0 -> 2.0
pull_requests: +27839
pull_request: https://github.com/python/cpython/pull/29596

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks

2021-11-17 Thread Łukasz Langa

New submission from Łukasz Langa :

This is also a performance issue but I'm mostly concerned about the stdout 
corruption aspect. When more than one thread aborts at the same time, output 
ends up looking like the example below on the terminal. Unless you understand 
the issue is output written out byte-by-byte, you might get misled into seeing 
memory corruption.


Fatal Python error: Aborted

Fatal Python error: Fatal Python error: Fatal Python error: AbortedAborted



AbortedCurrent thread 0x

000110cf4dc0 (most recent call first):
Current thread 0xCurrent thread 0x  File 000110cf4dc0Current thread 0x 
(most recent call first):
000110cf4dc110cf4dc0 (most recent call first):
 (most recent call first):
"  File   File   File 
/tmp"""tctmtmppmpyp//tcchppoy/nytc-hptrohyonoton-t-rh-ormooaoontt-i--rnmomo/aatiLi-nni/m/baLLriiinbab/rrLraayirr/byyr//FFaFrrrayam/mrFeearwmaowermwoeorkrwkkossr//kPPsyy/ttPhsyo/tnhP.hyotnoh.nof.nrff.arfmarreaammwmeeoewwrowkro/orVrkkek///rVVseVierorsesnirsioson/ns3si.//o331.n1s.111///l13il.bi1/b1//pl/ypiltybht/ihopbno/n3yp3.t.1hy11o1/n/m3mu.tul1lth1ti/oipmnrpu3ol.rc1toe1cs/esmsiunsliignt/pigspr/yorncocscehysnrseocsihnsnirigoz/nesi.yzpnyen."cgph/yrs"oy,
 line nn95i, line  in c95z_ in e__h.e_pnertnyoet"ernr_i__z_
, line
e  File   File .95p in y_""_//"ttemmnppt//, line ccepp95yy in 
ttr_h_ho_on_-ner-nr
ooto  File ote-rm"_a/_ti
nm  File 
p//Lcitbp"yr-ta/hrtym/pFm/racaipmnye/owLtoihbrokrnnas-r/-Pyry/rtFoohooorttn-a.mfma-eirmnwaamoiernwk/osL//rikPL/yiVtbherroansrb.iyfo/nrFasr/ma3emw.e1owr1o/kr/lkiVsbe/r/Pspyyittohhnoosnn/.33f..r11a11m//elmwiuolbrt/kpi/pyVtrehorocsenis3os.n1is1n//g3/m.uq1ul1te/iulpeirsb.o/cppeyys"ts,
 line h102io in nng3g/.qe1utr
e1u  File a/"rme/uytsl/.mtppFi/yrpc"rpa, line yomt102ehcw in eosgnose-rirtnk
gs  File o//o"Pt/qty-mumpea/ticunpey/hLtosih.bopnrnya-".rr, line yfo/r102oF in 
argtaemm-temew
woaor  File 
rikkns/"L//Pi/ybtVtrmhapeor/nyc/.pFfyrrtaahmmoerwensow-rorkorsok/t/Pi-Vymoetarhisonnin.o/sfnLrs//ai33mb.er.1w11o1ar/rk/l/lyViieb/brF/srp/aipyomntyhseo/tn3w3.ho1.r11o1/k/lsnic3ob//n.cpPu1yr1yrt/ehmntuothl/otfinup.rtfourrcaeenss3s/.ip1nr1gom/c/qecusoesne.uwpceyuosr."rp,
 line ry236ke in /"_nVpt, line re/o102fcr in sueitgsuesr_toewn
...

--
components: Interpreter Core
messages: 406480
nosy: lukasz.langa
priority: normal
severity: normal
stage: patch review
status: open
title: _Py_DumpASCII() writes characters one by one leading to corrupted 
tracebacks
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com