Go 1.8 Beta - error when reading local files

333 views
Skip to first unread message

si...@intesoft.net

unread,
Jun 29, 2017, 1:31:10 PM6/29/17
to google-appengine-go
Hi

Thanks for making Go 1.8 available - great news!

I've tested it with several different projects and most have worked without problem but one is failing when trying to read local files.

With the api_version set to go1.8, calling ioutil.ReadDir results in "readdirent: bad file descriptor"

Change the runtime back to go1 lists the file correctly:

0 test.txt false

Here's the example code:

package app

import (
"fmt"

"io/ioutil"
"net/http"
)

func test(w http.ResponseWriter, r *http.Request) {
files, err := ioutil.ReadDir("./data")
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}

w.Header().Set("Content-Type", "text/plain")
w.WriteHeader(http.StatusOK)
for i, f := range files {
fmt.Fprintf(w, "%d %s %t\n", i, f.Name(), f.IsDir())
}
}

Many thanks
Simon

Morgan Conbere

unread,
Jul 6, 2017, 8:29:40 PM7/6/17
to google-appengine-go
I ran into what I expect is a related issue. I can read a local file successfully, but filepath.Glob doesn't return any files while using api_version: go1.8.

Here's a repo that reproduces the issue: https://github.com/mconbere/glob

Deployed with go1.8: https://glob-2017.appspot.com/

Did you have any luck finding a workaround for 1.8?

Best,
Morgan

Steven Buss

unread,
Jul 7, 2017, 12:56:12 PM7/7/17
to Morgan Conbere, google-appengine-go
I started poking around on this problem yesterday. I'm still investigating but will update the list as soon as I have some guesses.

Please keep these bug reports coming :)

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steven Buss

unread,
Jul 10, 2017, 9:12:43 PM7/10/17
to Morgan Conbere, google-appengine-go
Thanks so much for this bug report. I found the source of the problem (I wrote a bad patch to File.readdir that happened to not get executed in our tests) and committed a fix for it (and the test env). The deadline for this week's release was last Friday, so it should roll out next week, around the 19th.

To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsubscribe...@googlegroups.com.

si...@intesoft.net

unread,
Jul 17, 2017, 6:56:24 PM7/17/17
to google-appengine-go, mor...@tokentransit.com
Yay, great news - I'll give it another try after that and let you know if / that it's working.

Many thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

si...@intesoft.net

unread,
Jul 21, 2017, 10:07:13 PM7/21/17
to google-appengine-go, mor...@tokentransit.com
Tested it again and it appears to be fixed now - thanks! :)

si...@intesoft.net

unread,
Jul 21, 2017, 10:08:35 PM7/21/17
to google-appengine-go, mor...@tokentransit.com
Oops, sorry, wrong issue - I meant the other one.

Morgan Conbere

unread,
Aug 1, 2017, 2:33:33 PM8/1/17
to si...@intesoft.net, google-appengine-go
Steven, I'm curious to know if there's a current timeline for resolving this issue with the go1.8 toolchain. Knowing even rough anticipated dates would help a great deal with my planning.

Best,
Morgan

Many thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsubscribe...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





--
Morgan Conbere
CEO, Token Transit

Steven Buss

unread,
Aug 1, 2017, 4:53:42 PM8/1/17
to Morgan Conbere, Simon Green, google-appengine-go
The bugfix almost made it to production last week but got rolled back due to an issue with go1.6. A new release is going out this week and should be available by Thursday afternoon if we don't run in to any issues.

To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine-go/CABOmd%3DFx2T%3DKTK4B4aj3cA1zSjxVhd2OCmk22ZQzg%3D9BeXPLew%40mail.gmail.com.

Steven Buss

unread,
Aug 3, 2017, 10:08:54 PM8/3/17
to Morgan Conbere, Simon Green, google-appengine-go
This has been rolled out. Please try again and let me know if you are seeing any other errors.

To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsubscribe...@googlegroups.com.

Morgan Conbere

unread,
Aug 4, 2017, 1:57:56 PM8/4/17
to Steven Buss, Simon Green, google-appengine-go
I see everything working correctly in my test app. Looks great!

si...@intesoft.net

unread,
Aug 4, 2017, 2:01:35 PM8/4/17
to google-appengine-go, mor...@tokentransit.com, si...@intesoft.net
Working for me too - thanks !
Many thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





--
Morgan Conbere
CEO, Token Transit

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

ma...@roybos.nl

unread,
Aug 18, 2017, 3:30:36 PM8/18/17
to google-appengine-go, mor...@tokentransit.com, si...@intesoft.net
Hi Steven,

Is this update also rolled out in the Europe region (Belgium)?
We are now encountering the exact same issue here.

Kind regards,

Roy Bos
Many thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





--
Morgan Conbere
CEO, Token Transit

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

Ernesto Alejo

unread,
Aug 21, 2017, 8:31:21 AM8/21/17
to google-appengine-go, mor...@tokentransit.com, si...@intesoft.net, ma...@roybos.nl
Hi,

The error is back not only in Europe, two apps I manage in us-central also fail with the same error: "readdirent: bad file descriptor". Probably a rollback again because of other issues.

Steven, there is another release going out with the fix again?

Many thanks,
Ernesto

si...@intesoft.net

unread,
Aug 21, 2017, 9:42:52 AM8/21/17
to google-appengine-go, mor...@tokentransit.com, si...@intesoft.net, ma...@roybos.nl
Same here, any way I try to real local files now fails with 1.8 although I'm not getting any error - the files just don't appear to be there. Changing to 1.6 makes it work.

Steven Buss

unread,
Aug 22, 2017, 5:13:38 PM8/22/17
to Simon Green, google-appengine-go, Morgan Conbere, ma...@roybos.nl
Thank you for the reports, and I'm sorry the delay. I was out of the office for the eclipse. We are now aware of this issue and are working on a mitigation.

Many thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsubscribe...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





--
Morgan Conbere
CEO, Token Transit

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsubscribe...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsubscribe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine-go/13f2d7e0-1431-42e3-a76e-968d84f8f4ba%40googlegroups.com.

Steven Buss

unread,
Aug 23, 2017, 12:26:46 AM8/23/17
to Simon Green, google-appengine-go, Morgan Conbere, ma...@roybos.nl
The fix was rolled out a few hours ago. Sorry for the issues!

si...@intesoft.net

unread,
Aug 23, 2017, 12:29:06 AM8/23/17
to google-appengine-go, si...@intesoft.net, mor...@tokentransit.com, ma...@roybos.nl
Awesome, thanks - will test it out tomorrow :)
Many thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





--
Morgan Conbere
CEO, Token Transit

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

ma...@roybos.nl

unread,
Aug 23, 2017, 3:29:26 AM8/23/17
to google-appengine-go, si...@intesoft.net, mor...@tokentransit.com, ma...@roybos.nl
Thanks for the fast fix, that's great!
I'll check it soon.

Kind regards,

Roy Bos
Many thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.





--
Morgan Conbere
CEO, Token Transit

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "google-appengine-go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.

Ronoaldo José de Lana Pereira

unread,
Aug 23, 2017, 12:07:04 PM8/23/17
to google-appengine-go
Oh, wait, there was an eclipse :-O ? I'm too much time in the office geez...

Thanks for the update ;-)

To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine-go+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine-go/CAN_t6FtmgBrW3RnhDLxH6UfCYCw8LUo0a9iP7Nw1JA_yxDCw9g%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Ronoaldo Pereira
Reply all
Reply to author
Forward
0 new messages