Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemError: flush: Bad file descriptor on Travis but not on local machine #39

Open
JockLawrie opened this issue Apr 5, 2016 · 5 comments

Comments

@JockLawrie
Copy link

Hi there,

I am running the tests for LoggedDicts.jl, which uses Logging.jl as a dependency. On my local machine everything works well, but on Travis I consistently get the error: SystemError: flush: Bad file descriptor

Oddly, the error occurs on a line that is called several times without issue earlier in the test suite. The failure consistently occurs at the same call site (line 44 of test/runtests.jl).

It is unclear if this is a Logging.jl issue, a Travis issue or something that I'm doing wrong.
Have you seen this problem before?

Regards,
Jock

@kmsquire
Copy link
Owner

kmsquire commented Apr 6, 2016

Hi, Thanks for reporting. I haven't run across this, and I don't know what the problem is off hand. I'll try to take a look, but not sure how soon. If you discover anything about it, please post back!

Link with an example from LoggedDicts.jl: https://travis-ci.org/JockLawrie/LoggedDicts.jl/jobs/120814199#L160-L168.

@kmsquire
Copy link
Owner

kmsquire commented Apr 6, 2016

Okay, a small hint: the only flush function is here. It might be that the file descriptor you're writing to (is it a file?) can't be created on travis with your current setup, or that whatever you're writing to doesn't exist on travis. Maybe that provides enough hints for digging into it more?

@JockLawrie
Copy link
Author

The curious thing is that each call to set!, pop!, push! and delete! calls info(), which then writes to the log file. This all goes without a hitch until the end of runtests.jl. That is, the error is raised only when info() is called for the 9th time.

The only thing I can think of is that the log file is closed by some Travis setting...but then surely the test suite from Logging.jl would have encountered this problem. So I'm stumped.

@JockLawrie
Copy link
Author

New fact: Commenting out writes (not logs) to other files passes on Linux
but still fails on OSX. Not being a Mac user, I have no idea why.

On 6 April 2016 at 13:18, Kevin Squire [email protected] wrote:

Okay, a small hint: the only flush function is here
https://github.com/kmsquire/Logging.jl/blob/master/src/Logging.jl#L74.
It might be that the file descriptor you're writing to (is it a file?)
can't be created on travis with your current setup, or that whatever you're
writing to doesn't exist on travis. Maybe that provides enough hints for
digging into it more?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#39 (comment)

@JockLawrie
Copy link
Author

Now passing on OSX - no issue, it just stopped so I restarted it.

So the problem seems related to writing to a stream not using Logging.jl
while also writing to a log file using Logging.jl.
The difficulty is that it reproduces on Travis, but not on my local Debian
machine.

On 6 April 2016 at 14:53, Jock Lawrie [email protected] wrote:

New fact: Commenting out writes (not logs) to other files passes on Linux
but still fails on OSX. Not being a Mac user, I have no idea why.

On 6 April 2016 at 13:18, Kevin Squire [email protected] wrote:

Okay, a small hint: the only flush function is here
https://github.com/kmsquire/Logging.jl/blob/master/src/Logging.jl#L74.
It might be that the file descriptor you're writing to (is it a file?)
can't be created on travis with your current setup, or that whatever you're
writing to doesn't exist on travis. Maybe that provides enough hints for
digging into it more?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#39 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants