Giter Site home page Giter Site logo

Comments (12)

mattn avatar mattn commented on August 15, 2024

I got following result.

$ ps aux | grep fuf
mattn    20516  0.0  1.1 807012  1468 pts/4    Sl+  09:17   0:00 ./fuf
$ while [ 1 ] ; do ls /proc/20516/fd | wc -l ; sleep 1; done
3
3
3
3
3
3
3
ls: cannot access /proc/20516/fd: No such file or directory
0
ls: cannot access /proc/20516/fd: No such file or directory
0
ls: cannot access /proc/20516/fd: No such file or directory
0

Are you using gccgo?

from go-sqlite3.

ernestoalejo avatar ernestoalejo commented on August 15, 2024

Using 8g, Fedora 17, 32 bits. Using the sqlite3.7.11-3.fc17 package.

My results look something like this (after introducing a time.Sleep of 20 Milliseconds to obtain more measurements):

3
3
3
3
5
5
11
16
21
27
32
37
43
49
.........more results here....
981
987
993
999
1004
1010
1016
1021     // here the program fails
0
0
0

Let me know if I can provide some more information to debug the issue.

from go-sqlite3.

mattn avatar mattn commented on August 15, 2024

Hmm, do you using latest version of go & sqlite3-devel?

I tried above on CentOS6 32bit.

from go-sqlite3.

ernestoalejo avatar ernestoalejo commented on August 15, 2024

Go installed from source:
devel +ca83aeaa55e0 Fri Feb 22 12:23:19 2013 +1100

SQLite3 is the latest version Fedora has (3.7.11), but not the current one (3.7.15.2).

I was about to try the same example using C, to see if it happens there too.

from go-sqlite3.

ernestoalejo avatar ernestoalejo commented on August 15, 2024

I've tested a similar example ported to C with the functions you use and no leak of descriptors.

Then I downgraded my Go version to 1, (hg update go1.0.3). The gist code produced no leaks there. After updating to the latest one (hg pull && hg update default) the loop stopped at iteration i=1021 with no file descriptors remaining. Same code in both cases.

Have you some distribution of Go around to test if it is a regression?

from go-sqlite3.

mattn avatar mattn commented on August 15, 2024

I've tested on tip.

CentOS6

2.6.32-042stab061.2 #1 SMP Fri Aug 24 09:07:21 MSK 2012 i686 i686 i386 GNU/Linux

from go-sqlite3.

ernestoalejo avatar ernestoalejo commented on August 15, 2024

I've used hg bisect to find the change that starts reproducing the error. This one fails for me:

https://code.google.com/p/go/source/detail?r=ddb9e6365e57

I'll investigate further

from go-sqlite3.

mattn avatar mattn commented on August 15, 2024

Could you please file this issue to https://code.google.com/p/go/issues/list ?

from go-sqlite3.

ernestoalejo avatar ernestoalejo commented on August 15, 2024

https://code.google.com/p/go/issues/detail?id=4935

from go-sqlite3.

mattn avatar mattn commented on August 15, 2024

Thank you.

from go-sqlite3.

ernestoalejo avatar ernestoalejo commented on August 15, 2024

It's now fixed:
https://code.google.com/p/go/issues/detail?id=4902
https://code.google.com/p/go/source/detail?r=3486a9feedda

from go-sqlite3.

mattn avatar mattn commented on August 15, 2024

Thank you.

from go-sqlite3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.