Bug 2210796

Summary: [abrt] esptool: _update_dtr_state(): serialposix.py:713:_update_dtr_state:OSError: [Errno 71] Protocol error
Product: [Fedora] Fedora Reporter: Ihor <sp.titan>
Component: esptoolAssignee: Karolina Surma <ksurma>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 38CC: ksurma, mhroncok, python-packagers-sig, sp.titan, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/6b037418e5a0f7f2b34c1642a278780ed5ece74
Whiteboard: abrt_hash:6580834f08da7d40fc4d7aef419f8d4cf5579237;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-02 12:24:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: os_info
none
File: environ
none
File: mountinfo
none
File: open_fds
none
File: namespaces
none
File: backtrace
none
File: cpuinfo none

Description Ihor 2023-05-29 14:08:49 UTC
Version-Release number of selected component:
esptool-4.5.1-2.fc38

Additional info:
reporter:       libreport-2.17.10
kernel:         6.2.15-300.fc38.x86_64
cmdline:        /usr/bin/python3 -sP /usr/bin/esptool.py --port /dev/ttyUSB0 --baud 921600 write_flash --flash_mode dio --flash_size 4MB 0x0 esp-at.bin
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/vte-spawn-37e5f2d3-b6c1-4826-afc8-1619137061ba.scope
uid:            1000
reason:         serialposix.py:713:_update_dtr_state:OSError: [Errno 71] Protocol error
executable:     /usr/bin/esptool.py
type:           Python3
package:        esptool-4.5.1-2.fc38
runlevel:       N 5
exception_type: OSError
crash_function: _update_dtr_state
interpreter:    python3-3.11.3-2.fc38.x86_64

Truncated backtrace:
serialposix.py:713:_update_dtr_state:OSError: [Errno 71] Protocol error

Traceback (most recent call last):
  File "/usr/bin/esptool.py", line 34, in <module>
    esptool._main()
  File "/usr/lib/python3.11/site-packages/esptool/__init__.py", line 1032, in _main
    main()
  File "/usr/lib/python3.11/site-packages/esptool/__init__.py", line 674, in main
    esp = esp or get_default_connected_device(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/esptool/__init__.py", line 915, in get_default_connected_device
    _esp = detect_chip(
           ^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/esptool/cmds.py", line 90, in detect_chip
    detect_port = ESPLoader(port, baud, trace_enabled=trace_enabled)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/esptool/loader.py", line 302, in __init__
    self._port = serial.serial_for_url(port)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/serial/__init__.py", line 90, in serial_for_url
    instance.open()
  File "/usr/lib/python3.11/site-packages/serial/serialposix.py", line 336, in open
    self._update_dtr_state()
  File "/usr/lib/python3.11/site-packages/serial/serialposix.py", line 713, in _update_dtr_state
    fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
OSError: [Errno 71] Protocol error

Local variables in innermost frame:
self: Serial<id=0x7f45708da560, open=False>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False)

Comment 1 Ihor 2023-05-29 14:08:52 UTC
Created attachment 1967680 [details]
File: os_info

Comment 2 Ihor 2023-05-29 14:08:53 UTC
Created attachment 1967681 [details]
File: environ

Comment 3 Ihor 2023-05-29 14:08:55 UTC
Created attachment 1967682 [details]
File: mountinfo

Comment 4 Ihor 2023-05-29 14:08:56 UTC
Created attachment 1967683 [details]
File: open_fds

Comment 5 Ihor 2023-05-29 14:08:58 UTC
Created attachment 1967684 [details]
File: namespaces

Comment 6 Ihor 2023-05-29 14:09:00 UTC
Created attachment 1967685 [details]
File: backtrace

Comment 7 Ihor 2023-05-29 14:09:01 UTC
Created attachment 1967686 [details]
File: cpuinfo

Comment 8 Tomas Orsava 2023-06-07 12:35:33 UTC
Hi Ihor, could you please provide a reproducer?