mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bannier (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MESOS-9331) Some library functions ignore failures from ::close which should probably be handled.
Date Wed, 17 Oct 2018 20:45:00 GMT
Benjamin Bannier created MESOS-9331:
---------------------------------------

             Summary: Some library functions ignore failures from ::close which should probably
be handled.
                 Key: MESOS-9331
                 URL: https://issues.apache.org/jira/browse/MESOS-9331
             Project: Mesos
          Issue Type: Bug
          Components: stout
            Reporter: Benjamin Bannier
            Assignee: Benjamin Bannier


Multiple functions e.g., in {{stout}} ignore the return value of {{::close}} with the following
rationale,
{code:java}
// We ignore the return value of close(). This is because users
// calling this function are interested in the return value of
// write(). Also an unsuccessful close() doesn't affect the write.{code}
I believe this is incorrect in general. Especially when not calling {{::fsync}} after a write
operation, the kernel might buffer writes and only trigger write-related failures when the
file descriptor is closed.[here|[http://man7.org/linux/man-pages/man2/close.2.html#NOTES].]

We should audit our code to make sure that failures to {{::close}} file descriptors are
properly propagated when needed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message