Bug 43713 - EBADF 'Bad file descriptor' not caught in console/protocol/client.py
EBADF 'Bad file descriptor' not caught in console/protocol/client.py
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.2
Assigned To: Florian Best
Jürn Brodersen
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-03 16:14 CET by Jürn Brodersen
Modified: 2017-04-04 18:29 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 5: Will affect all installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.257
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jürn Brodersen univentionstaff 2017-03-03 16:14:23 CET
I had the following traceback:
  File "/usr/sbin/univention-management-console-server", line 243, in <module>
    umc_daemon.do_action()
  File "/usr/lib/pymodules/python2.7/daemon/runner.py", line 186, in do_action
    func(self)
  File "/usr/lib/pymodules/python2.7/daemon/runner.py", line 131, in _start
    self.app.run()
  File "/usr/sbin/univention-management-console-server", line 210, in run
    notifier.loop()
  File "/usr/lib/pymodules/python2.7/notifier/nf_generic.py", line 286, in loop
    step()
  File "/usr/lib/pymodules/python2.7/notifier/nf_generic.py", line 273, in step
    not __sockets[ cond ][ fd ]( sock_obj ):
  File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/client.py", line 195, in _resend
    bytessent = sock.send(data)
  File "/usr/lib/python2.7/socket.py", line 170, in _dummy
    raise error(EBADF, 'Bad file descriptor')
error: [Errno 9] Bad file descriptor

I think there is a typo in console/protocol/client.py:

# ENOEXEC: bad file descriptor -> EBADF?
Comment 1 Florian Best univentionstaff 2017-03-03 16:18:00 CET
Did this cause a crash of the UMC-Server?
Comment 2 Jürn Brodersen univentionstaff 2017-03-03 16:18:31 CET
yes
Comment 3 Florian Best univentionstaff 2017-03-03 16:30:50 CET
univention-management-console (9.0.45-2):
r77338 | Bug #43713: handle EBADF in client
Comment 4 Florian Best univentionstaff 2017-03-03 16:32:40 CET
r77340 | Changelog Bug #43713
Comment 5 Jürn Brodersen univentionstaff 2017-03-03 17:15:27 CET
What I tested:
I couldn't reliable reproduce the traceback to check the fix.
But the fix looks good and the umc still works -> Verified

Package: univention-management-console
Version: 9.0.45-2A~4.2.0.201703031659
Branch: ucs_4.2-0
Comment 6 Stefan Gohmann univentionstaff 2017-04-04 18:29:35 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

If this error occurs again, please use "Clone This Bug".