[Bug 550474] Re: Bad handling of zero-length writes

Matthias Klose doko at ubuntu.com
Mon Jul 17 13:30:07 UTC 2017


** Changed in: expect (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to expect in Ubuntu.
https://bugs.launchpad.net/bugs/550474

Title:
  Bad handling of zero-length writes

Status in expect package in Ubuntu:
  Fix Released

Bug description:
  Binary package hint: expect

  expect writes this in the debug log:

    write() failed to write anything - will sleep(1) and retry...

  The cause is that ExpOutputProc() can be called with toWrite == 0.  I
  will attach a patch that fixes the problem.

  The problem isn't easy to reproduce.  I have not been able to create a small test case. But if you attempt to run
  the test suite of ftp://ftp.lysator.liu.se/pub/lyskom/server/lyskom-server-2.1.1.tar.gz.sig it will fail with strange locking
  errors.  The errors disappear if  you fix this expect bug.

  I have reported this to Don Libes but not gotten any response yet.  This problem was apparently introduced when
  expect started to use non-blocking I/O.

  I'm using Ubuntu 9.10.  This problem exists in all versions of expect
  5.43.0: I'm using 5.43.0-17.

  (One could possibly argue that it is a TCL bug that ExpOutputProc() is
  called with 0 as argument. I have not investigated if it would make
  more sense to fix the problem there.  Given that ExpOutputProc()
  checks if toWrite is less than 0, I think it makes sense that it also
  handles the case when toWrite is 0 in a sane way.)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/expect/+bug/550474/+subscriptions



More information about the foundations-bugs mailing list