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

CPU Usage #383

Closed
matejkramny opened this issue Jun 20, 2014 · 21 comments
Closed

CPU Usage #383

matejkramny opened this issue Jun 20, 2014 · 21 comments
Labels
bug A problem with current functionality, as opposed to missing functionality (enhancement) frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Milestone

Comments

@matejkramny
Copy link

I have 240982 files to sync, and syncthing (understandably) uses quite a large proportion of the CPU to monitor the files.

screenshot 2014-06-20 10 22 50

Other than reducing the number of files synced, is there any way to lower cpu usage?

@calmh
Copy link
Member

calmh commented Jun 20, 2014

That doesn't look right for the "monitoring" stage; is it still doing the initial scan, or syncing files to another node?

@matejkramny
Copy link
Author

It has done the initial scan, and now is just ‘idle’ (in the gui). No other nodes were added actually..

I used btsync to sync my source code directory.. Im a node developer, and unfortunately the node_modules junk gets synced too. Thats the source of the 250k files. Dependencies.

I also have an older macbook pro, which isn’t quite as fast as it used to be. That might be a factor too.

Matej Kramny

On Friday, 20 June 2014 at 10:29, Jakob Borg wrote:

That doesn't look right for the "monitoring" stage; is it still doing the initial scan, or syncing files to another node?


Reply to this email directly or view it on GitHub (https://github.com/calmh/syncthing/issues/383#issuecomment-46660661).

@calmh
Copy link
Member

calmh commented Jun 20, 2014

Still, idle should be idle. That said, for that many files there are some inefficiencies... I did some recent fixes in this area that are not in the 0.8.15 release; if you like, you could give the binary below a spin and see what happens.

https://nym.se/t/syncthing-darwin-amd64-v0.8.15-12-g8e8a579.tar.gz

@calmh
Copy link
Member

calmh commented Jun 20, 2014

Syncthing does a periodic scan for changes (just looking at file timestamps), by default every 60 seconds. In most cases this takes a few milliseconds because all file metdata is cached and nothing has changed. If you have many files and you're memory constrained, the metadata might not stay in the filesystem cache. In that case you might want to increase the scan interval, paying the price of detecting changes slower.

@matejkramny
Copy link
Author

With the new version, i get the following

Matej Kramny

On Friday, 20 June 2014 at 10:42, Jakob Borg wrote:

Still, idle should be idle. That said, for that many files there are some inefficiencies... I did some recent fixes in this area that are not in the 0.8.15 release; if you like, you could give the binary below a spin and see what happens.
https://nym.se/t/syncthing-darwin-amd64-v0.8.15-12-g8e8a579.tar.gz


Reply to this email directly or view it on GitHub (https://github.com/calmh/syncthing/issues/383#issuecomment-46661614).

@calmh
Copy link
Member

calmh commented Jun 20, 2014

Hm?

@matejkramny
Copy link
Author

idk, it doesn’t index the folder..

Matej Kramny

On Friday, 20 June 2014 at 14:56, Jakob Borg wrote:

Hm?


Reply to this email directly or view it on GitHub (https://github.com/calmh/syncthing/issues/383#issuecomment-46680405).

@calmh
Copy link
Member

calmh commented Jun 20, 2014

Did you mean to attach a screenshot or a log of some kind?

@matejkramny
Copy link
Author

Oh sorry the mail picture wasn't attached (facepalm)

screenshot 2014-06-20 10 46 42

@calmh
Copy link
Member

calmh commented Jun 20, 2014

Weird. Make sure you reload the GUI in your browser, if something could be cached? What does the console say?

@matejkramny
Copy link
Author

Cleared the cache in chrome..

console says

∴ /Users/matejkramny/Downloads/syncthing-darwin-amd64-v0.8.15-12-g8e8a579\ 2/syncthing
[KRO37] 16:44:43 INFO: syncthing v0.8.15-12-g8e8a579 (go1.3 darwin-amd64 default) jb@jborg-mbp 2014-06-20 09:40:38 UTC
[KRO37] 16:44:43 INFO: My ID: KRO37YVYI6GUVVRK5ZSPUOROTMRCD35XZF5P3GY2WYOCNFYTLQSA
[KRO37] 16:44:43 INFO: Starting web GUI on http://127.0.0.1:8080/
[KRO37] 16:44:43 INFO: Populating repository index

I just removed the repo and added it back, same thing.. 'Unknown' state

@calmh
Copy link
Member

calmh commented Jun 20, 2014

Well, weird. There's nothing that's really changed in the release I gave you that should have anything do with this. However, if the last line of output is "populating repository index" then it's still doing the initial scan of the repo. You should see

...
[P56IO] 17:37:39 INFO: Starting web GUI on http://127.0.0.1:8080/
[P56IO] 17:37:39 INFO: Populating repository index
[P56IO] 17:37:43 INFO: Created UPnP port mapping - external port 26780
[P56IO] 17:37:43 INFO: Sending local discovery announcements
[P56IO] 17:37:43 INFO: Sending global discovery announcements
[P56IO] 17:37:43 OK: Ready to synchronize dropbox (read-write)

i.e. at "ready to synchronize" it's done with the scan. It can take a while on the first startup. It still shouldn't be shown as unknown though in the meantime, so I'm not sure what's going on there.

@matejkramny
Copy link
Author

Hmm interesting..

Perhaps the index is already built, but its stuck somewhere. It uses 0% cpu and has no disk activity.

However, trying to sync a different folder produces the same issue.
Are there built caches i can just remove?

Thanks for your help :P.

Matej Kramny

On Friday, 20 June 2014 at 16:55, Jakob Borg wrote:

Well, weird. There's nothing that's really changed in the release I gave you that should have anything do with this. However, if the last line of output is "populating repository index" then it's still doing the initial scan of the repo. You should see
... [P56IO] 17:37:39 INFO: Starting web GUI on http://127.0.0.1:8080/ [P56IO] 17:37:39 INFO: Populating repository index [P56IO] 17:37:43 INFO: Created UPnP port mapping - external port 26780 [P56IO] 17:37:43 INFO: Sending local discovery announcements [P56IO] 17:37:43 INFO: Sending global discovery announcements [P56IO] 17:37:43 OK: Ready to synchronize dropbox (read-write)
i.e. at "ready to synchronize" it's done with the scan. It can take a while on the first startup. It still shouldn't be shown as unknown though in the meantime, so I'm not sure what's going on there.


Reply to this email directly or view it on GitHub (https://github.com/calmh/syncthing/issues/383#issuecomment-46694735).

@calmh
Copy link
Member

calmh commented Jun 20, 2014

Sounds like it's become stuck. I'd like know where. If you open a new terminal and run pkill -QUIT syncthing you should get a nice long stacktrace that it would be nice if you could send me. The index caches are in ~/Library/Application Support/Syncthing/*.idx.gz; delete those for a super clean start (though I'm not sure why it would be necessary. :/)

@matejkramny
Copy link
Author

My terminal has limited scrollback, so i didn't get the whole thing..

Hope this helps.
Btw, after the pkill -QUIT command it has now progressed and did finish index (Repo is idle).

runtime.goexit()
    /usr/local/go/src/pkg/runtime/proc.c:1445

goroutine 21 [chan receive]:
main.trackCPUUsage()
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui_unix.go:22 +0xe8
created by main.init·2
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui_unix.go:15 +0x22

goroutine 22 [chan receive, 16 minutes]:
main.saveConfigLoop(0xc2080f1a40, 0x43)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/main.go:539 +0x5b
created by main.main
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/main.go:193 +0xd32

goroutine 23 [semacquire, 13 minutes]:
sync.runtime_Semacquire(0xc20813233c)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*RWMutex).RLock(0xc208132330)
    /usr/local/go/src/pkg/sync/rwmutex.go:36 +0x5e
github.com/calmh/syncthing/model.(*Model).broadcastIndexLoop(0xc2081322d0)
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:581 +0xc7
created by github.com/calmh/syncthing/model.NewModel
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:99 +0x346

goroutine 24 [IO wait, 13 minutes]:
net.runtime_pollWait(0x8a1d90, 0x72, 0x0)
    /usr/local/go/src/pkg/runtime/netpoll.goc:146 +0x66
net.(*pollDesc).Wait(0xc2081f2450, 0x72, 0x0, 0x0)
    /usr/local/go/src/pkg/net/fd_poll_runtime.go:84 +0x46
net.(*pollDesc).WaitRead(0xc2081f2450, 0x0, 0x0)
    /usr/local/go/src/pkg/net/fd_poll_runtime.go:89 +0x42
net.(*netFD).accept(0xc2081f23f0, 0x5b17e8, 0x0, 0x89f208, 0x23)
    /usr/local/go/src/pkg/net/fd_unix.go:409 +0x343
net.(*TCPListener).AcceptTCP(0xc20803a0a0, 0x8, 0x0, 0x0)
    /usr/local/go/src/pkg/net/tcpsock_posix.go:234 +0x5d
net.(*TCPListener).Accept(0xc20803a0a0, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/net/tcpsock_posix.go:244 +0x4b
net/http.(*Server).Serve(0xc208004000, 0x8a0dc0, 0xc20803a0a0, 0x0, 0x0)
    /usr/local/go/src/pkg/net/http/server.go:1698 +0x91
net/http.Serve(0x8a0dc0, 0xc20803a0a0, 0x8a2010, 0xc2081ca300, 0x0, 0x0)
    /usr/local/go/src/pkg/net/http/server.go:1576 +0x7c
created by main.startGUI
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:128 +0x188e

goroutine 25 [semacquire, 13 minutes]:
sync.runtime_Semacquire(0xc20813233c)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*RWMutex).RLock(0xc208132330)
    /usr/local/go/src/pkg/sync/rwmutex.go:36 +0x5e
github.com/calmh/syncthing/model.(*Model).ConnectionStats(0xc2081322d0, 0xc20d6d6800)
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:138 +0x69
main.restGetConnections(0xc2081322d0, 0xca8268, 0xc20baf7b00)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:206 +0x27
reflect.Value.call(0x395f20, 0x5b1600, 0x0, 0x130, 0x4b4710, 0x4, 0xc20baf7c00, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x395f20, 0x5b1600, 0x0, 0x130, 0xc20baf7c00, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b9a2100, 0x395f20, 0x5b1600, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).Invoke(0xc20ba5ed20, 0x395f20, 0x5b1600, 0x0, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:29 +0x92
github.com/codegangsta/martini.(*routeContext).run(0xc20d6ccd50)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:314 +0xb4
github.com/codegangsta/martini.(*route).Handle(0xc2081fa730, 0xca82a0, 0xc20ba5ed20, 0xca8268, 0xc20baf7b00)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:217 +0xae
github.com/codegangsta/martini.(*router).Handle(0xc2080f1d10, 0xca8268, 0xc20baf7b00, 0xc20b9869c0, 0xca82a0, 0xc20ba5ed20)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:112 +0x187
github.com/codegangsta/martini.Router.Handle·fm(0xca8268, 0xc20baf7b00, 0xc20b9869c0, 0xca82a0, 0xc20ba5ed20)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:122 +0x6a
reflect.Value.call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0x4b4710, 0x4, 0xc20ba6b260, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0xc20ba6b260, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b9a2100, 0x3ec5a0, 0xc2081ce460, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5ed20)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*context).Next(0xc20ba5ed20)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:154 +0x32
github.com/codegangsta/martini.func·004(0xca82a0, 0xc20ba5ed20, 0xc2081e65f0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/recovery.go:140 +0x76
reflect.Value.call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0x4b4710, 0x4, 0xc20baf7b80, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0xc20baf7b80, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b9a2100, 0x3b83e0, 0x5b1120, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5ed20)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*Martini).ServeHTTP(0xc2081ca300, 0xca8178, 0xc20ba61540, 0xc20b9869c0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:69 +0x53
net/http.serverHandler.ServeHTTP(0xc208004000, 0xca8178, 0xc20ba61540, 0xc20b9869c0)
    /usr/local/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc2081f6380)
    /usr/local/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
    /usr/local/go/src/pkg/net/http/server.go:1721 +0x313

goroutine 26 [semacquire, 13 minutes]:
sync.runtime_Semacquire(0xc20813233c)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*RWMutex).RLock(0xc208132330)
    /usr/local/go/src/pkg/sync/rwmutex.go:36 +0x5e
github.com/calmh/syncthing/model.(*Model).GlobalSize(0xc2081322d0, 0xc2080016c8, 0x7, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:219 +0x7f
main.reportData(0xc2081322d0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/usage_report.go:35 +0x44a
main.sendUsageReport(0xc2081322d0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/usage_report.go:73 +0x4a
main.restPostConfig(0xc20b9cdd40, 0xc2081322d0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:269 +0x26f
reflect.Value.call(0x39f8e0, 0x5b1650, 0x0, 0x130, 0x4b4710, 0x4, 0xc20bae1c00, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x39f8e0, 0x5b1650, 0x0, 0x130, 0xc20bae1c00, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba51a60, 0x39f8e0, 0x5b1650, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).Invoke(0xc20ba5e9b0, 0x39f8e0, 0x5b1650, 0x0, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:29 +0x92
github.com/codegangsta/martini.(*routeContext).run(0xc20d6931d0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:314 +0xb4
github.com/codegangsta/martini.(*route).Handle(0xc2081fb680, 0xca82a0, 0xc20ba5e9b0, 0xca8268, 0xc20bae1a00)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:217 +0xae
github.com/codegangsta/martini.(*router).Handle(0xc2080f1d10, 0xca8268, 0xc20bae1a00, 0xc20b9cdd40, 0xca82a0, 0xc20ba5e9b0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:112 +0x187
github.com/codegangsta/martini.Router.Handle·fm(0xca8268, 0xc20bae1a00, 0xc20b9cdd40, 0xca82a0, 0xc20ba5e9b0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:122 +0x6a
reflect.Value.call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0x4b4710, 0x4, 0xc20bac2120, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0xc20bac2120, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba51a60, 0x3ec5a0, 0xc2081ce460, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5e9b0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*context).Next(0xc20ba5e9b0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:154 +0x32
github.com/codegangsta/martini.func·004(0xca82a0, 0xc20ba5e9b0, 0xc2081e65f0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/recovery.go:140 +0x76
reflect.Value.call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0x4b4710, 0x4, 0xc20bae1b00, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0xc20bae1b00, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba51a60, 0x3b83e0, 0x5b1120, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5e9b0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*Martini).ServeHTTP(0xc2081ca300, 0xca8178, 0xc20b9d35e0, 0xc20b9cdd40)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:69 +0x53
net/http.serverHandler.ServeHTTP(0xc208004000, 0xca8178, 0xc20b9d35e0, 0xc20b9cdd40)
    /usr/local/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc2081f6480)
    /usr/local/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
    /usr/local/go/src/pkg/net/http/server.go:1721 +0x313

goroutine 27 [semacquire, 13 minutes]:
sync.runtime_Semacquire(0xc20813233c)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*RWMutex).RLock(0xc208132330)
    /usr/local/go/src/pkg/sync/rwmutex.go:36 +0x5e
github.com/calmh/syncthing/model.(*Model).GlobalSize(0xc2081322d0, 0xc20d6ccd95, 0x7, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:219 +0x7f
main.restGetModel(0xc2081322d0, 0xca8268, 0xc20baf7c80, 0xc20b987520)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:171 +0x298
reflect.Value.call(0x3d1f20, 0x5b1620, 0x0, 0x130, 0x4b4710, 0x4, 0xc20ba6b380, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3d1f20, 0x5b1620, 0x0, 0x130, 0xc20ba6b380, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b99a500, 0x3d1f20, 0x5b1620, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).Invoke(0xc20ba5ed70, 0x3d1f20, 0x5b1620, 0x0, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:29 +0x92
github.com/codegangsta/martini.(*routeContext).run(0xc20d6ccf00)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:314 +0xb4
github.com/codegangsta/martini.(*route).Handle(0xc2081fa190, 0xca82a0, 0xc20ba5ed70, 0xca8268, 0xc20baf7c80)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:217 +0xae
github.com/codegangsta/martini.(*router).Handle(0xc2080f1d10, 0xca8268, 0xc20baf7c80, 0xc20b987520, 0xca82a0, 0xc20ba5ed70)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:112 +0x187
github.com/codegangsta/martini.Router.Handle·fm(0xca8268, 0xc20baf7c80, 0xc20b987520, 0xca82a0, 0xc20ba5ed70)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:122 +0x6a
reflect.Value.call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0x4b4710, 0x4, 0xc20ba6b320, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0xc20ba6b320, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b99a500, 0x3ec5a0, 0xc2081ce460, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5ed70)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*context).Next(0xc20ba5ed70)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:154 +0x32
github.com/codegangsta/martini.func·004(0xca82a0, 0xc20ba5ed70, 0xc2081e65f0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/recovery.go:140 +0x76
reflect.Value.call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0x4b4710, 0x4, 0xc20baf7d00, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0xc20baf7d00, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b99a500, 0x3b83e0, 0x5b1120, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5ed70)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*Martini).ServeHTTP(0xc2081ca300, 0xca8178, 0xc20ba615e0, 0xc20b987520)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:69 +0x53
net/http.serverHandler.ServeHTTP(0xc208004000, 0xca8178, 0xc20ba615e0, 0xc20b987520)
    /usr/local/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc2081f6580)
    /usr/local/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
    /usr/local/go/src/pkg/net/http/server.go:1721 +0x313

goroutine 28 [semacquire, 13 minutes]:
sync.runtime_Semacquire(0xc20813233c)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*RWMutex).RLock(0xc208132330)
    /usr/local/go/src/pkg/sync/rwmutex.go:36 +0x5e
github.com/calmh/syncthing/model.(*Model).GlobalSize(0xc2081322d0, 0xc2080016c8, 0x7, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:219 +0x7f
main.reportData(0xc2081322d0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/usage_report.go:35 +0x44a
main.sendUsageReport(0xc2081322d0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/usage_report.go:73 +0x4a
main.restPostConfig(0xc20ba20000, 0xc2081322d0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:269 +0x26f
reflect.Value.call(0x39f8e0, 0x5b1650, 0x0, 0x130, 0x4b4710, 0x4, 0xc20baf6400, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x39f8e0, 0x5b1650, 0x0, 0x130, 0xc20baf6400, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba50400, 0x39f8e0, 0x5b1650, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).Invoke(0xc20ba5e1e0, 0x39f8e0, 0x5b1650, 0x0, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:29 +0x92
github.com/codegangsta/martini.(*routeContext).run(0xc20ba599b0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:314 +0xb4
github.com/codegangsta/martini.(*route).Handle(0xc2081fb680, 0xca82a0, 0xc20ba5e1e0, 0xca8268, 0xc20baf6280)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:217 +0xae
github.com/codegangsta/martini.(*router).Handle(0xc2080f1d10, 0xca8268, 0xc20baf6280, 0xc20ba20000, 0xca82a0, 0xc20ba5e1e0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:112 +0x187
github.com/codegangsta/martini.Router.Handle·fm(0xca8268, 0xc20baf6280, 0xc20ba20000, 0xca82a0, 0xc20ba5e1e0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:122 +0x6a
reflect.Value.call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0x4b4710, 0x4, 0xc20ba6a360, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0xc20ba6a360, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba50400, 0x3ec5a0, 0xc2081ce460, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5e1e0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*context).Next(0xc20ba5e1e0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:154 +0x32
github.com/codegangsta/martini.func·004(0xca82a0, 0xc20ba5e1e0, 0xc2081e65f0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/recovery.go:140 +0x76
reflect.Value.call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0x4b4710, 0x4, 0xc20baf6300, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0xc20baf6300, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba50400, 0x3b83e0, 0x5b1120, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5e1e0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*Martini).ServeHTTP(0xc2081ca300, 0xca8178, 0xc20ba60140, 0xc20ba20000)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:69 +0x53
net/http.serverHandler.ServeHTTP(0xc208004000, 0xca8178, 0xc20ba60140, 0xc20ba20000)
    /usr/local/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc2081f6680)
    /usr/local/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
    /usr/local/go/src/pkg/net/http/server.go:1721 +0x313

goroutine 29 [semacquire, 16 minutes]:
sync.runtime_Semacquire(0xc208132338)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*RWMutex).Lock(0xc208132330)
    /usr/local/go/src/pkg/sync/rwmutex.go:83 +0xa3
github.com/calmh/syncthing/model.(*Model).Version(0xc2081322d0, 0xc20ba0fde5, 0x7, 0xc20ba80670)
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:882 +0x4b
main.restGetModel(0xc2081322d0, 0xca8268, 0xc20ba48b00, 0xc20a6c60d0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:183 +0x92b
reflect.Value.call(0x3d1f20, 0x5b1620, 0x0, 0x130, 0x4b4710, 0x4, 0xc20ba39aa0, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3d1f20, 0x5b1620, 0x0, 0x130, 0xc20ba39aa0, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba4d7e0, 0x3d1f20, 0x5b1620, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).Invoke(0xc20ba47770, 0x3d1f20, 0x5b1620, 0x0, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:29 +0x92
github.com/codegangsta/martini.(*routeContext).run(0xc20ba0ff50)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:314 +0xb4
github.com/codegangsta/martini.(*route).Handle(0xc2081fa190, 0xca82a0, 0xc20ba47770, 0xca8268, 0xc20ba48b00)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:217 +0xae
github.com/codegangsta/martini.(*router).Handle(0xc2080f1d10, 0xca8268, 0xc20ba48b00, 0xc20a6c60d0, 0xca82a0, 0xc20ba47770)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:112 +0x187
github.com/codegangsta/martini.Router.Handle·fm(0xca8268, 0xc20ba48b00, 0xc20a6c60d0, 0xca82a0, 0xc20ba47770)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:122 +0x6a
reflect.Value.call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0x4b4710, 0x4, 0xc20ba39a40, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0xc20ba39a40, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba4d7e0, 0x3ec5a0, 0xc2081ce460, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba47770)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*context).Next(0xc20ba47770)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:154 +0x32
github.com/codegangsta/martini.func·004(0xca82a0, 0xc20ba47770, 0xc2081e65f0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/recovery.go:140 +0x76
reflect.Value.call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0x4b4710, 0x4, 0xc20ba48b80, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0xc20ba48b80, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba4d7e0, 0x3b83e0, 0x5b1120, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba47770)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*Martini).ServeHTTP(0xc2081ca300, 0xca8178, 0xc20ba33860, 0xc20a6c60d0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:69 +0x53
net/http.serverHandler.ServeHTTP(0xc208004000, 0xca8178, 0xc20ba33860, 0xc20a6c60d0)
    /usr/local/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc2081f6780)
    /usr/local/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
    /usr/local/go/src/pkg/net/http/server.go:1721 +0x313

goroutine 30 [semacquire, 13 minutes]:
sync.runtime_Semacquire(0xc20813233c)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*RWMutex).RLock(0xc208132330)
    /usr/local/go/src/pkg/sync/rwmutex.go:36 +0x5e
github.com/calmh/syncthing/model.(*Model).GlobalSize(0xc2081322d0, 0xc20d692cd5, 0x7, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:219 +0x7f
main.restGetModel(0xc2081322d0, 0xca8268, 0xc20bae1500, 0xc20ba20ea0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:171 +0x298
reflect.Value.call(0x3d1f20, 0x5b1620, 0x0, 0x130, 0x4b4710, 0x4, 0xc20badbe00, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3d1f20, 0x5b1620, 0x0, 0x130, 0xc20badbe00, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba51780, 0x3d1f20, 0x5b1620, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).Invoke(0xc20ba5e910, 0x3d1f20, 0x5b1620, 0x0, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:29 +0x92
github.com/codegangsta/martini.(*routeContext).run(0xc20d692e40)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:314 +0xb4
github.com/codegangsta/martini.(*route).Handle(0xc2081fa190, 0xca82a0, 0xc20ba5e910, 0xca8268, 0xc20bae1500)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:217 +0xae
github.com/codegangsta/martini.(*router).Handle(0xc2080f1d10, 0xca8268, 0xc20bae1500, 0xc20ba20ea0, 0xca82a0, 0xc20ba5e910)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:112 +0x187
github.com/codegangsta/martini.Router.Handle·fm(0xca8268, 0xc20bae1500, 0xc20ba20ea0, 0xca82a0, 0xc20ba5e910)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:122 +0x6a
reflect.Value.call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0x4b4710, 0x4, 0xc20badbd40, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0xc20badbd40, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba51780, 0x3ec5a0, 0xc2081ce460, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5e910)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*context).Next(0xc20ba5e910)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:154 +0x32
github.com/codegangsta/martini.func·004(0xca82a0, 0xc20ba5e910, 0xc2081e65f0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/recovery.go:140 +0x76
reflect.Value.call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0x4b4710, 0x4, 0xc20bae1600, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0xc20bae1600, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba51780, 0x3b83e0, 0x5b1120, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5e910)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*Martini).ServeHTTP(0xc2081ca300, 0xca8178, 0xc20b9d3360, 0xc20ba20ea0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:69 +0x53
net/http.serverHandler.ServeHTTP(0xc208004000, 0xca8178, 0xc20b9d3360, 0xc20ba20ea0)
    /usr/local/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc2081f6880)
    /usr/local/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
    /usr/local/go/src/pkg/net/http/server.go:1721 +0x313

goroutine 48 [semacquire, 13 minutes]:
sync.runtime_Semacquire(0xc20813233c)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*RWMutex).RLock(0xc208132330)
    /usr/local/go/src/pkg/sync/rwmutex.go:36 +0x5e
github.com/calmh/syncthing/model.(*Model).ConnectionStats(0xc2081322d0, 0xc20d6ae800)
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:138 +0x69
main.restGetConnections(0xc2081322d0, 0xca8268, 0xc20baf6e00)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:206 +0x27
reflect.Value.call(0x395f20, 0x5b1600, 0x0, 0x130, 0x4b4710, 0x4, 0xc20baf6f00, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x395f20, 0x5b1600, 0x0, 0x130, 0xc20baf6f00, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20baa4ea0, 0x395f20, 0x5b1600, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).Invoke(0xc20b953360, 0x395f20, 0x5b1600, 0x0, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:29 +0x92
github.com/codegangsta/martini.(*routeContext).run(0xc20d683ce0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:314 +0xb4
github.com/codegangsta/martini.(*route).Handle(0xc2081fa730, 0xca82a0, 0xc20b953360, 0xca8268, 0xc20baf6e00)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:217 +0xae
github.com/codegangsta/martini.(*router).Handle(0xc2080f1d10, 0xca8268, 0xc20baf6e00, 0xc20b9cdba0, 0xca82a0, 0xc20b953360)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:112 +0x187
github.com/codegangsta/martini.Router.Handle·fm(0xca8268, 0xc20baf6e00, 0xc20b9cdba0, 0xca82a0, 0xc20b953360)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:122 +0x6a
reflect.Value.call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0x4b4710, 0x4, 0xc20ba6aa20, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0xc20ba6aa20, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20baa4ea0, 0x3ec5a0, 0xc2081ce460, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20b953360)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*context).Next(0xc20b953360)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:154 +0x32
github.com/codegangsta/martini.func·004(0xca82a0, 0xc20b953360, 0xc2081e65f0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/recovery.go:140 +0x76
reflect.Value.call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0x4b4710, 0x4, 0xc20baf6e80, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0xc20baf6e80, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20baa4ea0, 0x3b83e0, 0x5b1120, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20b953360)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*Martini).ServeHTTP(0xc2081ca300, 0xca8178, 0xc20ba60aa0, 0xc20b9cdba0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:69 +0x53
net/http.serverHandler.ServeHTTP(0xc208004000, 0xca8178, 0xc20ba60aa0, 0xc20b9cdba0)
    /usr/local/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc20ba56480)
    /usr/local/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
    /usr/local/go/src/pkg/net/http/server.go:1721 +0x313

goroutine 49 [semacquire, 13 minutes]:
sync.runtime_Semacquire(0xc20813233c)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*RWMutex).RLock(0xc208132330)
    /usr/local/go/src/pkg/sync/rwmutex.go:36 +0x5e
github.com/calmh/syncthing/model.(*Model).GlobalSize(0xc2081322d0, 0xc2080016c8, 0x7, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:219 +0x7f
main.reportData(0xc2081322d0, 0xc20ba21380)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/usage_report.go:35 +0x44a
main.restGetReport(0xca8268, 0xc20bae0a00, 0xc2081322d0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:386 +0xa1
reflect.Value.call(0x3bd7a0, 0x5b1630, 0x0, 0x130, 0x4b4710, 0x4, 0xc20bae0c00, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3bd7a0, 0x5b1630, 0x0, 0x130, 0xc20bae0c00, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba51240, 0x3bd7a0, 0x5b1630, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).Invoke(0xc20ba5e6e0, 0x3bd7a0, 0x5b1630, 0x0, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:29 +0x92
github.com/codegangsta/martini.(*routeContext).run(0xc20d692960)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:314 +0xb4
github.com/codegangsta/martini.(*route).Handle(0xc2081fb2c0, 0xca82a0, 0xc20ba5e6e0, 0xca8268, 0xc20bae0a00)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:217 +0xae
github.com/codegangsta/martini.(*router).Handle(0xc2080f1d10, 0xca8268, 0xc20bae0a00, 0xc20b9cd380, 0xca82a0, 0xc20ba5e6e0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:112 +0x187
github.com/codegangsta/martini.Router.Handle·fm(0xca8268, 0xc20bae0a00, 0xc20b9cd380, 0xca82a0, 0xc20ba5e6e0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:122 +0x6a
reflect.Value.call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0x4b4710, 0x4, 0xc20badb800, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0xc20badb800, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba51240, 0x3ec5a0, 0xc2081ce460, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5e6e0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*context).Next(0xc20ba5e6e0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:154 +0x32
github.com/codegangsta/martini.func·004(0xca82a0, 0xc20ba5e6e0, 0xc2081e65f0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/recovery.go:140 +0x76
reflect.Value.call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0x4b4710, 0x4, 0xc20bae0b00, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0xc20bae0b00, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20ba51240, 0x3b83e0, 0x5b1120, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5e6e0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*Martini).ServeHTTP(0xc2081ca300, 0xca8178, 0xc20b9d2d20, 0xc20b9cd380)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:69 +0x53
net/http.serverHandler.ServeHTTP(0xc208004000, 0xca8178, 0xc20b9d2d20, 0xc20b9cd380)
    /usr/local/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc20ba56500)
    /usr/local/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
    /usr/local/go/src/pkg/net/http/server.go:1721 +0x313

goroutine 33 [semacquire, 13 minutes]:
sync.runtime_Semacquire(0xc20813233c)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*RWMutex).RLock(0xc208132330)
    /usr/local/go/src/pkg/sync/rwmutex.go:36 +0x5e
github.com/calmh/syncthing/model.(*Model).GlobalSize(0xc2081322d0, 0xc2080016c8, 0x7, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:219 +0x7f
main.reportData(0xc2081322d0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/usage_report.go:35 +0x44a
main.sendUsageReport(0xc2081322d0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/usage_report.go:73 +0x4a
main.restPostConfig(0xc20b986680, 0xc2081322d0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:269 +0x26f
reflect.Value.call(0x39f8e0, 0x5b1650, 0x0, 0x130, 0x4b4710, 0x4, 0xc20babd380, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x39f8e0, 0x5b1650, 0x0, 0x130, 0xc20babd380, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b96c0c0, 0x39f8e0, 0x5b1650, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).Invoke(0xc20b832690, 0x39f8e0, 0x5b1650, 0x0, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:29 +0x92
github.com/codegangsta/martini.(*routeContext).run(0xc20d6e8150)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:314 +0xb4
github.com/codegangsta/martini.(*route).Handle(0xc2081fb680, 0xca82a0, 0xc20b832690, 0xca8268, 0xc20babd180)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:217 +0xae
github.com/codegangsta/martini.(*router).Handle(0xc2080f1d10, 0xca8268, 0xc20babd180, 0xc20b986680, 0xca82a0, 0xc20b832690)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:112 +0x187
github.com/codegangsta/martini.Router.Handle·fm(0xca8268, 0xc20babd180, 0xc20b986680, 0xca82a0, 0xc20b832690)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:122 +0x6a
reflect.Value.call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0x4b4710, 0x4, 0xc20bac3080, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0xc20bac3080, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b96c0c0, 0x3ec5a0, 0xc2081ce460, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20b832690)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*context).Next(0xc20b832690)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:154 +0x32
github.com/codegangsta/martini.func·004(0xca82a0, 0xc20b832690, 0xc2081e65f0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/recovery.go:140 +0x76
reflect.Value.call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0x4b4710, 0x4, 0xc20babd280, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0xc20babd280, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b96c0c0, 0x3b83e0, 0x5b1120, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20b832690)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*Martini).ServeHTTP(0xc2081ca300, 0xca8178, 0xc20b99ec80, 0xc20b986680)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:69 +0x53
net/http.serverHandler.ServeHTTP(0xc208004000, 0xca8178, 0xc20b99ec80, 0xc20b986680)
    /usr/local/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc20b77ce00)
    /usr/local/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
    /usr/local/go/src/pkg/net/http/server.go:1721 +0x313

goroutine 50 [semacquire, 13 minutes]:
sync.runtime_Semacquire(0xc20813233c)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*RWMutex).RLock(0xc208132330)
    /usr/local/go/src/pkg/sync/rwmutex.go:36 +0x5e
github.com/calmh/syncthing/model.(*Model).GlobalSize(0xc2081322d0, 0xc2080016c8, 0x7, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:219 +0x7f
main.reportData(0xc2081322d0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/usage_report.go:35 +0x44a
main.sendUsageReport(0xc2081322d0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/usage_report.go:73 +0x4a
main.restPostConfig(0xc20b9a5110, 0xc2081322d0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:269 +0x26f
reflect.Value.call(0x39f8e0, 0x5b1650, 0x0, 0x130, 0x4b4710, 0x4, 0xc20baf7f00, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x39f8e0, 0x5b1650, 0x0, 0x130, 0xc20baf7f00, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b99be80, 0x39f8e0, 0x5b1650, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).Invoke(0xc20ba5ee10, 0x39f8e0, 0x5b1650, 0x0, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:29 +0x92
github.com/codegangsta/martini.(*routeContext).run(0xc20d6cd0e0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:314 +0xb4
github.com/codegangsta/martini.(*route).Handle(0xc2081fb680, 0xca82a0, 0xc20ba5ee10, 0xca8268, 0xc20baf7e00)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:217 +0xae
github.com/codegangsta/martini.(*router).Handle(0xc2080f1d10, 0xca8268, 0xc20baf7e00, 0xc20b9a5110, 0xca82a0, 0xc20ba5ee10)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:112 +0x187
github.com/codegangsta/martini.Router.Handle·fm(0xca8268, 0xc20baf7e00, 0xc20b9a5110, 0xca82a0, 0xc20ba5ee10)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:122 +0x6a
reflect.Value.call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0x4b4710, 0x4, 0xc20ba6b440, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0xc20ba6b440, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b99be80, 0x3ec5a0, 0xc2081ce460, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5ee10)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*context).Next(0xc20ba5ee10)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:154 +0x32
github.com/codegangsta/martini.func·004(0xca82a0, 0xc20ba5ee10, 0xc2081e65f0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/recovery.go:140 +0x76
reflect.Value.call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0x4b4710, 0x4, 0xc20baf7e80, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0xc20baf7e80, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b99be80, 0x3b83e0, 0x5b1120, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5ee10)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*Martini).ServeHTTP(0xc2081ca300, 0xca8178, 0xc20ba61680, 0xc20b9a5110)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:69 +0x53
net/http.serverHandler.ServeHTTP(0xc208004000, 0xca8178, 0xc20ba61680, 0xc20b9a5110)
    /usr/local/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc20ba56f00)
    /usr/local/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
    /usr/local/go/src/pkg/net/http/server.go:1721 +0x313

goroutine 34 [semacquire, 13 minutes]:
sync.runtime_Semacquire(0xc20813233c)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*RWMutex).RLock(0xc208132330)
    /usr/local/go/src/pkg/sync/rwmutex.go:36 +0x5e
github.com/calmh/syncthing/model.(*Model).GlobalSize(0xc2081322d0, 0xc2080016c8, 0x7, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:219 +0x7f
main.reportData(0xc2081322d0, 0xc20b986ea0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/usage_report.go:35 +0x44a
main.restGetReport(0xca8268, 0xc20baf74c0, 0xc2081322d0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:386 +0xa1
reflect.Value.call(0x3bd7a0, 0x5b1630, 0x0, 0x130, 0x4b4710, 0x4, 0xc20baf75c0, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3bd7a0, 0x5b1630, 0x0, 0x130, 0xc20baf75c0, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b9eefc0, 0x3bd7a0, 0x5b1630, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).Invoke(0xc20b953ae0, 0x3bd7a0, 0x5b1630, 0x0, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:29 +0x92
github.com/codegangsta/martini.(*routeContext).run(0xc20d6cc720)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:314 +0xb4
github.com/codegangsta/martini.(*route).Handle(0xc2081fb2c0, 0xca82a0, 0xc20b953ae0, 0xca8268, 0xc20baf74c0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:217 +0xae
github.com/codegangsta/martini.(*router).Handle(0xc2080f1d10, 0xca8268, 0xc20baf74c0, 0xc20b9a4c30, 0xca82a0, 0xc20b953ae0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:112 +0x187
github.com/codegangsta/martini.Router.Handle·fm(0xca8268, 0xc20baf74c0, 0xc20b9a4c30, 0xca82a0, 0xc20b953ae0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:122 +0x6a
reflect.Value.call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0x4b4710, 0x4, 0xc20ba6af00, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0xc20ba6af00, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b9eefc0, 0x3ec5a0, 0xc2081ce460, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20b953ae0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*context).Next(0xc20b953ae0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:154 +0x32
github.com/codegangsta/martini.func·004(0xca82a0, 0xc20b953ae0, 0xc2081e65f0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/recovery.go:140 +0x76
reflect.Value.call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0x4b4710, 0x4, 0xc20baf7540, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0xc20baf7540, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b9eefc0, 0x3b83e0, 0x5b1120, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20b953ae0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*Martini).ServeHTTP(0xc2081ca300, 0xca8178, 0xc20ba61180, 0xc20b9a4c30)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:69 +0x53
net/http.serverHandler.ServeHTTP(0xc208004000, 0xca8178, 0xc20ba61180, 0xc20b9a4c30)
    /usr/local/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc20b77d400)
    /usr/local/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
    /usr/local/go/src/pkg/net/http/server.go:1721 +0x313

goroutine 35 [semacquire, 13 minutes]:
sync.runtime_Semacquire(0xc20813233c)
    /usr/local/go/src/pkg/runtime/sema.goc:199 +0x30
sync.(*RWMutex).RLock(0xc208132330)
    /usr/local/go/src/pkg/sync/rwmutex.go:36 +0x5e
github.com/calmh/syncthing/model.(*Model).GlobalSize(0xc2081322d0, 0xc2080016c8, 0x7, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/model/model.go:219 +0x7f
main.reportData(0xc2081322d0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/usage_report.go:35 +0x44a
main.sendUsageReport(0xc2081322d0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/usage_report.go:73 +0x4a
main.restPostConfig(0xc20b987a00, 0xc2081322d0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:269 +0x26f
reflect.Value.call(0x39f8e0, 0x5b1650, 0x0, 0x130, 0x4b4710, 0x4, 0xc20ba94bc0, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x39f8e0, 0x5b1650, 0x0, 0x130, 0xc20ba94bc0, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b9272c0, 0x39f8e0, 0x5b1650, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).Invoke(0xc20ba5efa0, 0x39f8e0, 0x5b1650, 0x0, 0x0, 0x0, 0x0, 0x0)
    <autogenerated>:29 +0x92
github.com/codegangsta/martini.(*routeContext).run(0xc20d6cd7d0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:314 +0xb4
github.com/codegangsta/martini.(*route).Handle(0xc2081fb680, 0xca82a0, 0xc20ba5efa0, 0xca8268, 0xc20ba94980)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:217 +0xae
github.com/codegangsta/martini.(*router).Handle(0xc2080f1d10, 0xca8268, 0xc20ba94980, 0xc20b987a00, 0xca82a0, 0xc20ba5efa0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/router.go:112 +0x187
github.com/codegangsta/martini.Router.Handle·fm(0xca8268, 0xc20ba94980, 0xc20b987a00, 0xca82a0, 0xc20ba5efa0)
    /Users/jb/src/github.com/calmh/syncthing/cmd/syncthing/gui.go:122 +0x6a
reflect.Value.call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0x4b4710, 0x4, 0xc20ba6b680, 0x3, 0x3, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3ec5a0, 0xc2081ce460, 0x0, 0x130, 0xc20ba6b680, 0x3, 0x3, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b9272c0, 0x3ec5a0, 0xc2081ce460, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5efa0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*context).Next(0xc20ba5efa0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:154 +0x32
github.com/codegangsta/martini.func·004(0xca82a0, 0xc20ba5efa0, 0xc2081e65f0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/recovery.go:140 +0x76
reflect.Value.call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0x4b4710, 0x4, 0xc20ba94ac0, 0x2, 0x2, 0x0, ...)
    /usr/local/go/src/pkg/reflect/value.go:563 +0x1210
reflect.Value.Call(0x3b83e0, 0x5b1120, 0x0, 0x130, 0xc20ba94ac0, 0x2, 0x2, 0x0, 0x0, 0x0)
    /usr/local/go/src/pkg/reflect/value.go:411 +0xd7
github.com/codegangsta/inject.(*injector).Invoke(0xc20b9272c0, 0x3b83e0, 0x5b1120, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/inject/inject.go:102 +0x3b7
github.com/codegangsta/martini.(*context).run(0xc20ba5efa0)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:163 +0x86
github.com/codegangsta/martini.(*Martini).ServeHTTP(0xc2081ca300, 0xca8178, 0xc20ba61ae0, 0xc20b987a00)
    /Users/jb/src/github.com/calmh/syncthing/Godeps/_workspace/src/github.com/codegangsta/martini/martini.go:69 +0x53
net/http.serverHandler.ServeHTTP(0xc208004000, 0xca8178, 0xc20ba61ae0, 0xc20b987a00)
    /usr/local/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc20b75a600)
    /usr/local/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
    /usr/local/go/src/pkg/net/http/server.go:1721 +0x313

rax     0xe
rbx     0x129e2c03
rcx     0x8feeb0
rdx     0x129e2c03
rdi     0x1303
rsi     0x6
rbp     0x6
rsp     0x8feeb0
r8      0xe286935
r9      0x2295c4d7
r10     0xdd4f437b2e0
r11     0x212
r12     0x481b3c7133f1b
r13     0x481b3985e5e08
r14     0x137973cffa74c000
r15     0xa0ff53c8
rip     0x459e3
rflags  0x212
cs      0x7
fs      0x0
gs      0x8f0000

@matejkramny
Copy link
Author

Alright, now that it works.. Its a bit faster, though every 60 seconds the cpu is maxed out for about 20-40 seconds.

I suppose you have a faster mac. My is core duo 2009.

@calmh
Copy link
Member

calmh commented Jun 20, 2014

Thanks for the traceback. That'll be tedious to work through, but it shows syncthing being deadlocked for the last 13 minutes, so there's a bug for sure at the end of it.

Yeah the 60 second rescan is expected, although maxing out cpu for 30 seconds at the time is a bit painful. :/ This seems to be one of those few cases where subscribing to filesystem notifications instead (#9) would be a huge win.

@matejkramny
Copy link
Author

Thanks Jakob.

If there’s anything i can do to help, please tell me :). I’d like to contribute, but idk where to start (or what needs to be done)..
Im a UI designer, with angular.js, node.js &co experience.

Matej Kramny

On Friday, 20 June 2014 at 17:33, Jakob Borg wrote:

Thanks for the traceback. That'll be tedious to work through, but it shows syncthing being deadlocked for the last 13 minutes, so there's a bug for sure at the end of it.
Yeah the 60 second rescan is expected, although maxing out cpu for 30 seconds at the time is a bit painful. :/ This seems to be one of those few cases where subscribing to filesystem notifications instead (#9 (calmh#9)) would be a huge win.


Reply to this email directly or view it on GitHub (https://github.com/calmh/syncthing/issues/383#issuecomment-46699020).

@calmh
Copy link
Member

calmh commented Jun 20, 2014

Well, in this case (as regards to cpu usage and efficiency), sit tight because that's the current focus. Can't make any promises for magic though. :/

The UI however is in HTML5 + angular–and certainly in need of some UI design–so anything you feel like adding there in terms of recommendations, tips or actual code is welcome. :)

@calmh calmh added the bug label Jun 20, 2014
@bsidhom
Copy link
Contributor

bsidhom commented Jun 26, 2014

This is something that concerned me earlier, though I haven't experienced the issue on any of my machines.

Implementing updates via a filesystem listener is probably worth investigating, though it's also probably a good idea to have a fallback. I have plenty of RAM, but my system's default inotify limit is only around 500K (inodes). If this post is correct and each listener only consumes about 1KB of kernel memory, that's (only) about 500MB. I don't know if there would be adverse effects of having large amounts of memory allocated for the kernel or if the CPU overhead at that point would exceed that of a manual file scan, but I know that changing the max inode listener count requires administrative access on most systems.

@bsidhom bsidhom mentioned this issue Jun 26, 2014
@beta992
Copy link

beta992 commented Jul 8, 2014

I also have this issue:

top

CPU|MEM
44.1 0.4 syncthing
26.2 0.4 syncthing (few seconds later)

And then it goes back to the first one again. I think there is a loop causing it.
What process is running in the background? I'd thought it only scanned between an interval of 60 seconds. :P

@calmh calmh modified the milestones: v1.0, v0.9 Jul 26, 2014
@calmh calmh closed this as completed in e27d429 Jul 29, 2014
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Jun 17, 2017
@syncthing syncthing locked and limited conversation to collaborators Jun 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A problem with current functionality, as opposed to missing functionality (enhancement) frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

No branches or pull requests

5 participants