Add support for Sandstorm #590

Open
opened 2 years ago by prologic · 22 comments
Owner
  • Get Sandstorm users auto-created and logged in, since Sandstorm (ideally) manages authentication.
  • Get web publishing up so the world can follow.
  • Add in the HTTP proxy for getting posts from the outside world.
  • Try to get the API connected up for mobile app support.

Work-in-proggress branch:sandstorm_support

- [x] Get Sandstorm users auto-created and logged in, since Sandstorm (ideally) manages authentication. - [ ] Get web publishing up so the world can follow. - [ ] Add in the HTTP proxy for getting posts from the outside world. - [ ] Try to get the API connected up for mobile app support. Work-in-proggress branch:[sandstorm_support](https://git.mills.io/yarnsocial/yarn/src/branch/sandstorm_support)
Poster
Owner

yarnd now runs in Sandstorm 🥳

`yarnd` now runs in Sandstorm 🥳
Poster
Owner

For the first part (Authentication and Authorization) we probabpy need a custom "Session" manager if SANDSTORM=1 (from the environment) and to implement Auth handling provided by Sandstorm as trusted headers

For the first part (_Authentication and Authorization_) we _probabpy_ need a custom "Session" manager if `SANDSTORM=1` (_from the environment_) and to implement [Auth handling provided by Sandstorm as trusted headers](https://docs.sandstorm.io/en/latest/developing/auth/)
Poster
Owner

After this the rest should be pretty straight forward 👌

After this the rest should be pretty straight forward 👌
Owner

Yeah, I think pulling in auth is probably the one thing that really needs one to understand the specific app code in question.

For web publishing I need to check on the status of the getPublicId little app, but that will get built entirely in the sh scripts, and shouldn't impact your code at all, until you call that to get the URL for DNS config. The proxy is similar: We can set everything up entirely in sh scripts and then all you have to do is proxy your outgoing network requests to it. (Which is arguably a decent standard feature for apps to support anyways, I think.)

Yeah, I think pulling in auth is probably the one thing that really needs one to understand the specific app code in question. For web publishing I need to check on the status of the getPublicId little app, but that will get built entirely in the sh scripts, and shouldn't impact your code at all, until you call that to get the URL for DNS config. The proxy is similar: We can set everything up entirely in sh scripts and then all you have to do is proxy your outgoing network requests to it. (Which is arguably a decent standard feature for apps to support anyways, I think.)
Poster
Owner
[13:28:19]  <isd> The flow would be basically, using this package: https://pkg.go.dev/zenhack.net/go/sandstorm@v0.0.0-20211021215300-f57533beec91/exp/sandstormhttpbridge
[13:30:24]  <isd> (1) call Connect on startup to get a reference to the bridge, (2) in some request handler, call GetSessionContext to get a refrence to the session context, (3) cast that to a HackSessionContext (https://pkg.go.dev/zenhack.net/go/sandstorm@v0.0.0-20211021215300-f57533beec91/capnp/hacksession#HackSessionContext) and then call GetPublicId
[13:31:01]  <isd> Sadly, I do not have code handy that you can just copy & paste.
[13:31:41]  <isd> For outgoing requests, https://github.com/zenhack/powerbox-http-proxy is probably the best reference.

``` [13:28:19] <isd> The flow would be basically, using this package: https://pkg.go.dev/zenhack.net/go/sandstorm@v0.0.0-20211021215300-f57533beec91/exp/sandstormhttpbridge [13:30:24] <isd> (1) call Connect on startup to get a reference to the bridge, (2) in some request handler, call GetSessionContext to get a refrence to the session context, (3) cast that to a HackSessionContext (https://pkg.go.dev/zenhack.net/go/sandstorm@v0.0.0-20211021215300-f57533beec91/capnp/hacksession#HackSessionContext) and then call GetPublicId [13:31:01] <isd> Sadly, I do not have code handy that you can just copy & paste. [13:31:41] <isd> For outgoing requests, https://github.com/zenhack/powerbox-http-proxy is probably the best reference. ```
Owner

Have you had any inspiration on the account integration portion by chance? I am excited about this still.

Have you had any inspiration on the account integration portion by chance? I am excited about this still.
Poster
Owner

Ahh yes I think I know how to do this, but I think I had a question of you actually -- mostly to seek your opinion. Let me finish up some refactoring work and then get back to this 👌

Ahh yes I _think_ I know how to do this, but I think I had a question of you actually -- mostly to seek your opinion. Let me finish up some refactoring work and then get back to this 👌
Owner

Hey, I wanted to follow up on this and see where it sat on your radar. I don't think I ever found out what the question was. =) Decentralized social has had a bit of a resurgence because of recent Twitter news, and Sandstorm has some exciting stuff in the pipeline as well.

Hey, I wanted to follow up on this and see where it sat on your radar. I don't think I ever found out what the question was. =) Decentralized social has had a bit of a resurgence because of recent Twitter news, and Sandstorm has some exciting stuff in the pipeline as well.
Poster
Owner

Hey, I wanted to follow up on this and see where it sat on your radar. I don't think I ever found out what the question was. =) Decentralized social has had a bit of a resurgence because of recent Twitter news, and Sandstorm has some exciting stuff in the pipeline as well.

Hey! This is still on our radar! But we need more man power :)

Do you have anyone in the Sandstorm community that might be able to work with me on this? I need help!

> Hey, I wanted to follow up on this and see where it sat on your radar. I don't think I ever found out what the question was. =) Decentralized social has had a bit of a resurgence because of recent Twitter news, and Sandstorm has some exciting stuff in the pipeline as well. Hey! This is still on our radar! But we need more man power :) Do you have anyone in the Sandstorm community that might be able to work with me on this? I need help!
Owner

I think I can add a lot of the Sandstorm-specific stuff at least as an external components run by the package, if we hit a blocker I can probably ask Ian for help (he's one of our leads who does a fair bit of Go, but his todo list is very large), but probably the big bits on yarnd itself would be ensuring we can configure yarnd on first run totally within the web interface, and making sure we can point the requests for outbound servers to go through a proxy.

I think I can add a lot of the Sandstorm-specific stuff at least as an external components run by the package, if we hit a blocker I can probably ask Ian for help (he's one of our leads who does a fair bit of Go, but his todo list is very large), but probably the big bits on yarnd itself would be ensuring we can configure yarnd on first run totally within the web interface, and making sure we can point the requests for outbound servers to go through a proxy.
Poster
Owner

That would be a big help! The part I got stuck with was users and how users should be authenciated and passed to yarnd too. We may run into that again too, I'm not sure, been a while since I looked at the standstorm branch I had in progress...

That would be a big help! The part I got stuck with was users and how users should be authenciated and passed to `yarnd` too. We may run into that again too, I'm not sure, been a while since I looked at the standstorm branch I had in progress...
Owner

Do you have any support for different types of authentication providers presently or is it just login/password?

Sandstorm provides both a unique (i.e. authenticated) ID as well as a "preferred handle" i.e. username as HTTP headers with every request. In theory, you could even just patch the handle into their username and their ID into their password, though we don't guarantee the handle is unique, so someone who chose the same handle would fail to work in that case.

So the ideal case on Sandstorm would be that if not logged in, check the header, and use it to log them in, and if they do not exist, create them using that header info.

Do you have any support for different types of authentication providers presently or is it just login/password? Sandstorm provides both a unique (i.e. authenticated) ID as well as a "preferred handle" i.e. username as HTTP headers with every request. In theory, you could even just patch the handle into their username and their ID into their password, though we don't guarantee the handle is unique, so someone who chose the same handle would fail to work in that case. So the ideal case on Sandstorm would be that if not logged in, check the header, and use it to log them in, and if they do not exist, create them using that header info.
Poster
Owner

So the ideal case on Sandstorm would be that if not logged in, check the header, and use it to log them in, and if they do not exist, create them using that header info.

That's the conclusion I ended up with as well. Which means (to answer your first question) in order to support Sandstorm properly we'd have to implement a SandstormAuth. Currently we have support for Username/Password, MaglinkAuth (Email Login) and soon IndieAuth login.

> So the ideal case on Sandstorm would be that if not logged in, check the header, and use it to log them in, and if they do not exist, create them using that header info. That's the conclusion I ended up with as well. Which means (to answer your first question) in order to support Sandstorm properly we'd have to implement a SandstormAuth. Currently we have support for Username/Password, MaglinkAuth (Email Login) and soon IndieAuth login.
Owner

Yeah, I think it'd be best to properly handle Sandstorm auth integration the same way to handle other types of authentication, so you don't have to explicitly think about Sandstorm when doing future code changes.

Yeah, I think it'd be best to properly handle Sandstorm auth integration the same way to handle other types of authentication, so you don't have to explicitly think about Sandstorm when doing future code changes.
Owner

Are your other auth providers implemented in single files or single PRs or anything such that I could see what the scope of work is to add an auth provider to yarn?

Are your other auth providers implemented in single files or single PRs or anything such that I could see what the scope of work is to add an auth provider to yarn?
Poster
Owner

Are your other auth providers implemented in single files or single PRs or anything such that I could see what the scope of work is to add an auth provider to yarn?

Yes most logic is contained here

> Are your other auth providers implemented in single files or single PRs or anything such that I could see what the scope of work is to add an auth provider to yarn? Yes most logic is contained [here](https://git.mills.io/yarnsocial/yarn/src/branch/main/internal/login_handlers.go)
Owner

Okay, so I have this building and made a couple changes you'll want to also include:

in ./preflight.sh, fix the shebang to work in newer distros

#!/usr/bin/env sh

in .sandstorm/Vagrantfile, switch to Debian bullseye

config.vm.box = "debian/bullseye64"

in .sandstorm/setup.sh, let's bump the Go version

version=1.19.1

also, we need make (for building) and gnupg (for signing) so add them to setup.sh too

apt-get install -y git make gnupg

Here's my poor man's pull request, @prologic

Okay, so I have this building and made a couple changes you'll want to also include: in ./preflight.sh, fix the shebang to work in newer distros > #!/usr/bin/env sh in .sandstorm/Vagrantfile, switch to Debian bullseye > config.vm.box = "debian/bullseye64" in .sandstorm/setup.sh, let's bump the Go version > version=1.19.1 also, we need `make` (for building) and `gnupg` (for signing) so add them to setup.sh too > apt-get install -y git make gnupg Here's my poor man's pull request, @prologic
prologic referenced this issue from a commit 7 months ago
prologic closed this issue 7 months ago
sorenpeter referenced this issue from a commit 7 months ago
Owner

Reopening for tracking. Second post caused this stream of stack trace:

[yarnd] 2022/11/20 04:16:37 (127.0.0.1:40506) "GET / HTTP/1.1" 200 4913 3.815153ms
fatal error: concurrent map writes
fatal error: concurrent map writes

goroutine 279 [running]:
git.mills.io/yarnsocial/yarn/internal/session.(*Session).Set(0xc0005267e0, {0xe5c5e5?, 0x5?}, {0xc0010772c7, 0x5})
	/opt/app/internal/session/session.go:70 +0x4b
git.mills.io/yarnsocial/yarn/internal/auth.(*ProxyAuth).MustAuth.func1({0x1093620, 0xc0005269a0}, 0xc000c9e700, {0xc00101bb40, 0x2, 0x2})
	/opt/app/internal/auth/proxy_auth.go:50 +0x265
github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc00120bc80, {0x1093620, 0xc0005269a0}, 0xc000c9e700)
	/home/vagrant/go/pkg/mod/github.com/julienschmidt/httprouter@v1.3.0/router.go:387 +0x81c
git.mills.io/yarnsocial/yarn/internal.(*Router).ServeHTTP(0xc00011c000?, {0x1093620?, 0xc0005269a0?}, 0x21?)
	/opt/app/internal/router.go:144 +0x25
github.com/justinas/nosurf.(*CSRFHandler).handleSuccess(...)
	/home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:187
github.com/justinas/nosurf.(*CSRFHandler).ServeHTTP(0xc0012805a0, {0x1093620, 0xc0005269a0}, 0x108a8a0?)
	/home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:144 +0x5c4
git.mills.io/yarnsocial/yarn/internal/session.(*Manager).Handler.func1({0x1093620, 0xc0005269a0}, 0xc000c9e300)
	/opt/app/internal/session/manager.go:196 +0x26d
net/http.HandlerFunc.ServeHTTP(0xd1f400?, {0x1093620?, 0xc0005269a0?}, 0x4?)
	/usr/local/go/src/net/http/server.go:2109 +0x2f
github.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1({0x1094040, 0xc000c10800}, 0x4d4901?)
	/home/vagrant/go/pkg/mod/github.com/!n!y!times/gziphandler@v1.1.1/gzip.go:338 +0x26f
net/http.HandlerFunc.ServeHTTP(0xd8?, {0x1094040?, 0xc000c10800?}, 0x6f5e28?)
	/usr/local/go/src/net/http/server.go:2109 +0x2f
github.com/unrolled/logger.(*Logger).Handler.func1({0x1094730?, 0xc0000367e0}, 0xc000c9e300)
	/home/vagrant/go/pkg/mod/github.com/unrolled/logger@v0.0.0-20201216141554-31a3694fe979/logger.go:80 +0xf4
net/http.HandlerFunc.ServeHTTP(0x0?, {0x1094730?, 0xc0000367e0?}, 0x46bbae?)
	/usr/local/go/src/net/http/server.go:2109 +0x2f
net/http.serverHandler.ServeHTTP({0xc0016b6420?}, {0x1094730, 0xc0000367e0}, 0xc000c9e300)
	/usr/local/go/src/net/http/server.go:2947 +0x30c
net/http.(*conn).serve(0xc00025a320, {0x1095250, 0xc001012de0})
	/usr/local/go/src/net/http/server.go:1991 +0x607
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3102 +0x4db

goroutine 1 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.(*Server).Run(0xc000204180)
	/opt/app/internal/server.go:184 +0x139
main.main()
	/opt/app/cmd/yarnd/main.go:454 +0x1225

goroutine 6 [select]:
github.com/wblakecaldwell/profiler.init.0.func1()
	/home/vagrant/go/pkg/mod/github.com/wblakecaldwell/profiler@v0.0.0-20150908040756-6111ef1313a1/web_endpoints.go:59 +0xbf
created by github.com/wblakecaldwell/profiler.init.0
	/home/vagrant/go/pkg/mod/github.com/wblakecaldwell/profiler@v0.0.0-20150908040756-6111ef1313a1/web_endpoints.go:48 +0x7d

goroutine 158 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebSub).processInbox(0xc0004e20a0)
	/opt/app/internal/indieweb/websub.go:744 +0x37
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func3()
	/opt/app/internal/indieweb/websub.go:241 +0x53
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub
	/opt/app/internal/indieweb/websub.go:239 +0x1f6

goroutine 23 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1()
	/opt/app/internal/ttlcache.go:98 +0x7f
created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache
	/opt/app/internal/ttlcache.go:97 +0xac

goroutine 156 [select]:
github.com/patrickmn/go-cache.(*janitor).Run(0xc0011f60a0, 0xc000eae090?)
	/home/vagrant/go/pkg/mod/github.com/patrickmn/go-cache@v2.1.0+incompatible/cache.go:1079 +0x85
created by github.com/patrickmn/go-cache.runJanitor
	/home/vagrant/go/pkg/mod/github.com/patrickmn/go-cache@v2.1.0+incompatible/cache.go:1099 +0xed

goroutine 157 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1()
	/opt/app/internal/ttlcache.go:98 +0x7f
created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache
	/opt/app/internal/ttlcache.go:97 +0xac

goroutine 159 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebSub).processOutbox(0xc0004e20a0)
	/opt/app/internal/indieweb/websub.go:752 +0x65
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func4()
	/opt/app/internal/indieweb/websub.go:248 +0x53
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub
	/opt/app/internal/indieweb/websub.go:246 +0x26a

goroutine 160 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebSub).processVerify(0xc0004e20a0)
	/opt/app/internal/indieweb/websub.go:801 +0x65
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func5()
	/opt/app/internal/indieweb/websub.go:255 +0x53
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub
	/opt/app/internal/indieweb/websub.go:253 +0x2d6

goroutine 177 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func6()
	/opt/app/internal/indieweb/websub.go:261 +0x65
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub
	/opt/app/internal/indieweb/websub.go:260 +0x34a

goroutine 178 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func7()
	/opt/app/internal/indieweb/websub.go:268 +0x65
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub
	/opt/app/internal/indieweb/websub.go:267 +0x3c5

goroutine 179 [select]:
github.com/robfig/cron.(*Cron).run(0xc000109310)
	/home/vagrant/go/pkg/mod/github.com/robfig/cron@v1.2.0/cron.go:191 +0x58d
created by github.com/robfig/cron.(*Cron).Start
	/home/vagrant/go/pkg/mod/github.com/robfig/cron@v1.2.0/cron.go:144 +0x65

goroutine 180 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 181 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 182 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 183 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 184 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 185 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 186 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 187 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 188 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 189 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 190 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start.func1()
	/opt/app/internal/dispatcher.go:60 +0x74
created by git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start
	/opt/app/internal/dispatcher.go:58 +0x37c

goroutine 191 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start.func2()
	/opt/app/internal/dispatcher.go:73 +0x8a
created by git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start
	/opt/app/internal/dispatcher.go:71 +0x3bf

goroutine 192 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebMention).processInbox(0xc00128fcb0)
	/opt/app/internal/indieweb/webmention.go:122 +0x5e
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention.func1()
	/opt/app/internal/indieweb/webmention.go:37 +0x53
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention
	/opt/app/internal/indieweb/webmention.go:35 +0x136

goroutine 193 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebMention).processOutbox(0xc00128fcb0)
	/opt/app/internal/indieweb/webmention.go:166 +0x65
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention.func2()
	/opt/app/internal/indieweb/webmention.go:42 +0x53
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention
	/opt/app/internal/indieweb/webmention.go:40 +0x176

goroutine 223 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1()
	/opt/app/internal/ttlcache.go:98 +0x7f
created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache
	/opt/app/internal/ttlcache.go:97 +0xac

goroutine 224 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1()
	/opt/app/internal/ttlcache.go:98 +0x7f
created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache
	/opt/app/internal/ttlcache.go:97 +0xac

goroutine 226 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1()
	/opt/app/internal/ttlcache.go:98 +0x7f
created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache
	/opt/app/internal/ttlcache.go:97 +0xac

goroutine 228 [IO wait]:
internal/poll.runtime_pollWait(0x7f5d6947da98, 0x72)
	/usr/local/go/src/runtime/netpoll.go:305 +0x89
internal/poll.(*pollDesc).wait(0xc00120a080?, 0x6?, 0x0)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc00120a080)
	/usr/local/go/src/internal/poll/fd_unix.go:614 +0x234
net.(*netFD).accept(0xc00120a080)
	/usr/local/go/src/net/fd_unix.go:172 +0x35
net.(*TCPListener).accept(0xc000c820c0)
	/usr/local/go/src/net/tcpsock_posix.go:142 +0x28
net.(*TCPListener).Accept(0xc000c820c0)
	/usr/local/go/src/net/tcpsock.go:288 +0x3d
net/http.(*Server).Serve(0xc000200000, {0x1094520, 0xc000c820c0})
	/usr/local/go/src/net/http/server.go:3070 +0x385
net/http.(*Server).ListenAndServe(0xc000200000)
	/usr/local/go/src/net/http/server.go:2999 +0x7d
git.mills.io/yarnsocial/yarn/internal.(*Server).ListenAndServe(0xc000204180)
	/opt/app/internal/server.go:243 +0x72e
git.mills.io/yarnsocial/yarn/internal.(*Server).Run.func1()
	/opt/app/internal/server.go:176 +0x2a
created by git.mills.io/yarnsocial/yarn/internal.(*Server).Run
	/opt/app/internal/server.go:175 +0xac

goroutine 230 [syscall]:
os/signal.signal_recv()
	/usr/local/go/src/runtime/sigqueue.go:152 +0x2f
os/signal.loop()
	/usr/local/go/src/os/signal/signal_unix.go:23 +0x19
created by os/signal.Notify.func1.1
	/usr/local/go/src/os/signal/signal.go:151 +0x2a

goroutine 289 [IO wait]:
internal/poll.runtime_pollWait(0x7f5d6947d8b8, 0x72)
	/usr/local/go/src/runtime/netpoll.go:305 +0x89
internal/poll.(*pollDesc).wait(0xc0014cc000?, 0xc0011ff6f1?, 0x0)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0014cc000, {0xc0011ff6f1, 0x1, 0x1})
	/usr/local/go/src/internal/poll/fd_unix.go:167 +0x25a
net.(*netFD).Read(0xc0014cc000, {0xc0011ff6f1?, 0x0?, 0xc?})
	/usr/local/go/src/net/fd_posix.go:55 +0x29
net.(*conn).Read(0xc0012b4850, {0xc0011ff6f1?, 0xeb38c0?, 0x0?})
	/usr/local/go/src/net/net.go:183 +0x45
net/http.(*connReader).backgroundRead(0xc0011ff6e0)
	/usr/local/go/src/net/http/server.go:678 +0x3f
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:674 +0xca

goroutine 280 [runnable]:
net/http.(*connReader).startBackgroundRead.func2()
	/usr/local/go/src/net/http/server.go:674
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1594 +0x1
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:674 +0xca

goroutine 272 [running]:
	goroutine running on other thread; stack unavailable
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3102 +0x4db

goroutine 272 [running]:
git.mills.io/yarnsocial/yarn/internal/session.(*Session).Set(0xc0005267e0, {0xe5c5e5?, 0x5?}, {0xc001217477, 0x5})
	/opt/app/internal/session/session.go:70 +0x4b
git.mills.io/yarnsocial/yarn/internal/auth.(*ProxyAuth).MustAuth.func1({0x1093620, 0xc000550b60}, 0xc0011db600, {0xc000fdbc40, 0x2, 0x2})
	/opt/app/internal/auth/proxy_auth.go:50 +0x265
github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc00120bc80, {0x1093620, 0xc000550b60}, 0xc0011db600)
	/home/vagrant/go/pkg/mod/github.com/julienschmidt/httprouter@v1.3.0/router.go:387 +0x81c
git.mills.io/yarnsocial/yarn/internal.(*Router).ServeHTTP(0xc00011c000?, {0x1093620?, 0xc000550b60?}, 0x21?)
	/opt/app/internal/router.go:144 +0x25
github.com/justinas/nosurf.(*CSRFHandler).handleSuccess(...)
	/home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:187
github.com/justinas/nosurf.(*CSRFHandler).ServeHTTP(0xc0012805a0, {0x1093620, 0xc000550b60}, 0x108a8a0?)
	/home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:144 +0x5c4
git.mills.io/yarnsocial/yarn/internal/session.(*Manager).Handler.func1({0x1093620, 0xc000550b60}, 0xc0011db400)
	/opt/app/internal/session/manager.go:196 +0x26d
net/http.HandlerFunc.ServeHTTP(0xd1f400?, {0x1093620?, 0xc000550b60?}, 0x4?)
	/usr/local/go/src/net/http/server.go:2109 +0x2f
github.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1({0x1094040, 0xc0005a13e0}, 0x4d4901?)
	/home/vagrant/go/pkg/mod/github.com/!n!y!times/gziphandler@v1.1.1/gzip.go:338 +0x26f
net/http.HandlerFunc.ServeHTTP(0xd8?, {0x1094040?, 0xc0005a13e0?}, 0x6f5e28?)
	/usr/local/go/src/net/http/server.go:2109 +0x2f
github.com/unrolled/logger.(*Logger).Handler.func1({0x1094730?, 0xc0012d2460}, 0xc0011db400)
	/home/vagrant/go/pkg/mod/github.com/unrolled/logger@v0.0.0-20201216141554-31a3694fe979/logger.go:80 +0xf4
net/http.HandlerFunc.ServeHTTP(0x0?, {0x1094730?, 0xc0012d2460?}, 0x46bbae?)
	/usr/local/go/src/net/http/server.go:2109 +0x2f
net/http.serverHandler.ServeHTTP({0xc0011ff6e0?}, {0x1094730, 0xc0012d2460}, 0xc0011db400)
	/usr/local/go/src/net/http/server.go:2947 +0x30c
net/http.(*conn).serve(0xc0004e2f00, {0x1095250, 0xc001012de0})
	/usr/local/go/src/net/http/server.go:1991 +0x607
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3102 +0x4db
** HTTP-BRIDGE: App server exited with status code: 2
Reopening for tracking. Second post caused this stream of stack trace: ``` [yarnd] 2022/11/20 04:16:37 (127.0.0.1:40506) "GET / HTTP/1.1" 200 4913 3.815153ms fatal error: concurrent map writes fatal error: concurrent map writes goroutine 279 [running]: git.mills.io/yarnsocial/yarn/internal/session.(*Session).Set(0xc0005267e0, {0xe5c5e5?, 0x5?}, {0xc0010772c7, 0x5}) /opt/app/internal/session/session.go:70 +0x4b git.mills.io/yarnsocial/yarn/internal/auth.(*ProxyAuth).MustAuth.func1({0x1093620, 0xc0005269a0}, 0xc000c9e700, {0xc00101bb40, 0x2, 0x2}) /opt/app/internal/auth/proxy_auth.go:50 +0x265 github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc00120bc80, {0x1093620, 0xc0005269a0}, 0xc000c9e700) /home/vagrant/go/pkg/mod/github.com/julienschmidt/httprouter@v1.3.0/router.go:387 +0x81c git.mills.io/yarnsocial/yarn/internal.(*Router).ServeHTTP(0xc00011c000?, {0x1093620?, 0xc0005269a0?}, 0x21?) /opt/app/internal/router.go:144 +0x25 github.com/justinas/nosurf.(*CSRFHandler).handleSuccess(...) /home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:187 github.com/justinas/nosurf.(*CSRFHandler).ServeHTTP(0xc0012805a0, {0x1093620, 0xc0005269a0}, 0x108a8a0?) /home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:144 +0x5c4 git.mills.io/yarnsocial/yarn/internal/session.(*Manager).Handler.func1({0x1093620, 0xc0005269a0}, 0xc000c9e300) /opt/app/internal/session/manager.go:196 +0x26d net/http.HandlerFunc.ServeHTTP(0xd1f400?, {0x1093620?, 0xc0005269a0?}, 0x4?) /usr/local/go/src/net/http/server.go:2109 +0x2f github.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1({0x1094040, 0xc000c10800}, 0x4d4901?) /home/vagrant/go/pkg/mod/github.com/!n!y!times/gziphandler@v1.1.1/gzip.go:338 +0x26f net/http.HandlerFunc.ServeHTTP(0xd8?, {0x1094040?, 0xc000c10800?}, 0x6f5e28?) /usr/local/go/src/net/http/server.go:2109 +0x2f github.com/unrolled/logger.(*Logger).Handler.func1({0x1094730?, 0xc0000367e0}, 0xc000c9e300) /home/vagrant/go/pkg/mod/github.com/unrolled/logger@v0.0.0-20201216141554-31a3694fe979/logger.go:80 +0xf4 net/http.HandlerFunc.ServeHTTP(0x0?, {0x1094730?, 0xc0000367e0?}, 0x46bbae?) /usr/local/go/src/net/http/server.go:2109 +0x2f net/http.serverHandler.ServeHTTP({0xc0016b6420?}, {0x1094730, 0xc0000367e0}, 0xc000c9e300) /usr/local/go/src/net/http/server.go:2947 +0x30c net/http.(*conn).serve(0xc00025a320, {0x1095250, 0xc001012de0}) /usr/local/go/src/net/http/server.go:1991 +0x607 created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:3102 +0x4db goroutine 1 [chan receive]: git.mills.io/yarnsocial/yarn/internal.(*Server).Run(0xc000204180) /opt/app/internal/server.go:184 +0x139 main.main() /opt/app/cmd/yarnd/main.go:454 +0x1225 goroutine 6 [select]: github.com/wblakecaldwell/profiler.init.0.func1() /home/vagrant/go/pkg/mod/github.com/wblakecaldwell/profiler@v0.0.0-20150908040756-6111ef1313a1/web_endpoints.go:59 +0xbf created by github.com/wblakecaldwell/profiler.init.0 /home/vagrant/go/pkg/mod/github.com/wblakecaldwell/profiler@v0.0.0-20150908040756-6111ef1313a1/web_endpoints.go:48 +0x7d goroutine 158 [chan receive]: git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebSub).processInbox(0xc0004e20a0) /opt/app/internal/indieweb/websub.go:744 +0x37 git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func3() /opt/app/internal/indieweb/websub.go:241 +0x53 created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub /opt/app/internal/indieweb/websub.go:239 +0x1f6 goroutine 23 [chan receive]: git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1() /opt/app/internal/ttlcache.go:98 +0x7f created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache /opt/app/internal/ttlcache.go:97 +0xac goroutine 156 [select]: github.com/patrickmn/go-cache.(*janitor).Run(0xc0011f60a0, 0xc000eae090?) /home/vagrant/go/pkg/mod/github.com/patrickmn/go-cache@v2.1.0+incompatible/cache.go:1079 +0x85 created by github.com/patrickmn/go-cache.runJanitor /home/vagrant/go/pkg/mod/github.com/patrickmn/go-cache@v2.1.0+incompatible/cache.go:1099 +0xed goroutine 157 [chan receive]: git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1() /opt/app/internal/ttlcache.go:98 +0x7f created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache /opt/app/internal/ttlcache.go:97 +0xac goroutine 159 [chan receive]: git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebSub).processOutbox(0xc0004e20a0) /opt/app/internal/indieweb/websub.go:752 +0x65 git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func4() /opt/app/internal/indieweb/websub.go:248 +0x53 created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub /opt/app/internal/indieweb/websub.go:246 +0x26a goroutine 160 [chan receive]: git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebSub).processVerify(0xc0004e20a0) /opt/app/internal/indieweb/websub.go:801 +0x65 git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func5() /opt/app/internal/indieweb/websub.go:255 +0x53 created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub /opt/app/internal/indieweb/websub.go:253 +0x2d6 goroutine 177 [chan receive]: git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func6() /opt/app/internal/indieweb/websub.go:261 +0x65 created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub /opt/app/internal/indieweb/websub.go:260 +0x34a goroutine 178 [chan receive]: git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func7() /opt/app/internal/indieweb/websub.go:268 +0x65 created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub /opt/app/internal/indieweb/websub.go:267 +0x3c5 goroutine 179 [select]: github.com/robfig/cron.(*Cron).run(0xc000109310) /home/vagrant/go/pkg/mod/github.com/robfig/cron@v1.2.0/cron.go:191 +0x58d created by github.com/robfig/cron.(*Cron).Start /home/vagrant/go/pkg/mod/github.com/robfig/cron@v1.2.0/cron.go:144 +0x65 goroutine 180 [select]: git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() /opt/app/internal/worker.go:35 +0x9f created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start /opt/app/internal/worker.go:31 +0x56 goroutine 181 [select]: git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() /opt/app/internal/worker.go:35 +0x9f created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start /opt/app/internal/worker.go:31 +0x56 goroutine 182 [select]: git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() /opt/app/internal/worker.go:35 +0x9f created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start /opt/app/internal/worker.go:31 +0x56 goroutine 183 [select]: git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() /opt/app/internal/worker.go:35 +0x9f created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start /opt/app/internal/worker.go:31 +0x56 goroutine 184 [select]: git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() /opt/app/internal/worker.go:35 +0x9f created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start /opt/app/internal/worker.go:31 +0x56 goroutine 185 [select]: git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() /opt/app/internal/worker.go:35 +0x9f created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start /opt/app/internal/worker.go:31 +0x56 goroutine 186 [select]: git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() /opt/app/internal/worker.go:35 +0x9f created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start /opt/app/internal/worker.go:31 +0x56 goroutine 187 [select]: git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() /opt/app/internal/worker.go:35 +0x9f created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start /opt/app/internal/worker.go:31 +0x56 goroutine 188 [select]: git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() /opt/app/internal/worker.go:35 +0x9f created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start /opt/app/internal/worker.go:31 +0x56 goroutine 189 [select]: git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() /opt/app/internal/worker.go:35 +0x9f created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start /opt/app/internal/worker.go:31 +0x56 goroutine 190 [chan receive]: git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start.func1() /opt/app/internal/dispatcher.go:60 +0x74 created by git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start /opt/app/internal/dispatcher.go:58 +0x37c goroutine 191 [select]: git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start.func2() /opt/app/internal/dispatcher.go:73 +0x8a created by git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start /opt/app/internal/dispatcher.go:71 +0x3bf goroutine 192 [chan receive]: git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebMention).processInbox(0xc00128fcb0) /opt/app/internal/indieweb/webmention.go:122 +0x5e git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention.func1() /opt/app/internal/indieweb/webmention.go:37 +0x53 created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention /opt/app/internal/indieweb/webmention.go:35 +0x136 goroutine 193 [chan receive]: git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebMention).processOutbox(0xc00128fcb0) /opt/app/internal/indieweb/webmention.go:166 +0x65 git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention.func2() /opt/app/internal/indieweb/webmention.go:42 +0x53 created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention /opt/app/internal/indieweb/webmention.go:40 +0x176 goroutine 223 [chan receive]: git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1() /opt/app/internal/ttlcache.go:98 +0x7f created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache /opt/app/internal/ttlcache.go:97 +0xac goroutine 224 [chan receive]: git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1() /opt/app/internal/ttlcache.go:98 +0x7f created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache /opt/app/internal/ttlcache.go:97 +0xac goroutine 226 [chan receive]: git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1() /opt/app/internal/ttlcache.go:98 +0x7f created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache /opt/app/internal/ttlcache.go:97 +0xac goroutine 228 [IO wait]: internal/poll.runtime_pollWait(0x7f5d6947da98, 0x72) /usr/local/go/src/runtime/netpoll.go:305 +0x89 internal/poll.(*pollDesc).wait(0xc00120a080?, 0x6?, 0x0) /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32 internal/poll.(*pollDesc).waitRead(...) /usr/local/go/src/internal/poll/fd_poll_runtime.go:89 internal/poll.(*FD).Accept(0xc00120a080) /usr/local/go/src/internal/poll/fd_unix.go:614 +0x234 net.(*netFD).accept(0xc00120a080) /usr/local/go/src/net/fd_unix.go:172 +0x35 net.(*TCPListener).accept(0xc000c820c0) /usr/local/go/src/net/tcpsock_posix.go:142 +0x28 net.(*TCPListener).Accept(0xc000c820c0) /usr/local/go/src/net/tcpsock.go:288 +0x3d net/http.(*Server).Serve(0xc000200000, {0x1094520, 0xc000c820c0}) /usr/local/go/src/net/http/server.go:3070 +0x385 net/http.(*Server).ListenAndServe(0xc000200000) /usr/local/go/src/net/http/server.go:2999 +0x7d git.mills.io/yarnsocial/yarn/internal.(*Server).ListenAndServe(0xc000204180) /opt/app/internal/server.go:243 +0x72e git.mills.io/yarnsocial/yarn/internal.(*Server).Run.func1() /opt/app/internal/server.go:176 +0x2a created by git.mills.io/yarnsocial/yarn/internal.(*Server).Run /opt/app/internal/server.go:175 +0xac goroutine 230 [syscall]: os/signal.signal_recv() /usr/local/go/src/runtime/sigqueue.go:152 +0x2f os/signal.loop() /usr/local/go/src/os/signal/signal_unix.go:23 +0x19 created by os/signal.Notify.func1.1 /usr/local/go/src/os/signal/signal.go:151 +0x2a goroutine 289 [IO wait]: internal/poll.runtime_pollWait(0x7f5d6947d8b8, 0x72) /usr/local/go/src/runtime/netpoll.go:305 +0x89 internal/poll.(*pollDesc).wait(0xc0014cc000?, 0xc0011ff6f1?, 0x0) /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32 internal/poll.(*pollDesc).waitRead(...) /usr/local/go/src/internal/poll/fd_poll_runtime.go:89 internal/poll.(*FD).Read(0xc0014cc000, {0xc0011ff6f1, 0x1, 0x1}) /usr/local/go/src/internal/poll/fd_unix.go:167 +0x25a net.(*netFD).Read(0xc0014cc000, {0xc0011ff6f1?, 0x0?, 0xc?}) /usr/local/go/src/net/fd_posix.go:55 +0x29 net.(*conn).Read(0xc0012b4850, {0xc0011ff6f1?, 0xeb38c0?, 0x0?}) /usr/local/go/src/net/net.go:183 +0x45 net/http.(*connReader).backgroundRead(0xc0011ff6e0) /usr/local/go/src/net/http/server.go:678 +0x3f created by net/http.(*connReader).startBackgroundRead /usr/local/go/src/net/http/server.go:674 +0xca goroutine 280 [runnable]: net/http.(*connReader).startBackgroundRead.func2() /usr/local/go/src/net/http/server.go:674 runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 created by net/http.(*connReader).startBackgroundRead /usr/local/go/src/net/http/server.go:674 +0xca goroutine 272 [running]: goroutine running on other thread; stack unavailable created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:3102 +0x4db goroutine 272 [running]: git.mills.io/yarnsocial/yarn/internal/session.(*Session).Set(0xc0005267e0, {0xe5c5e5?, 0x5?}, {0xc001217477, 0x5}) /opt/app/internal/session/session.go:70 +0x4b git.mills.io/yarnsocial/yarn/internal/auth.(*ProxyAuth).MustAuth.func1({0x1093620, 0xc000550b60}, 0xc0011db600, {0xc000fdbc40, 0x2, 0x2}) /opt/app/internal/auth/proxy_auth.go:50 +0x265 github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc00120bc80, {0x1093620, 0xc000550b60}, 0xc0011db600) /home/vagrant/go/pkg/mod/github.com/julienschmidt/httprouter@v1.3.0/router.go:387 +0x81c git.mills.io/yarnsocial/yarn/internal.(*Router).ServeHTTP(0xc00011c000?, {0x1093620?, 0xc000550b60?}, 0x21?) /opt/app/internal/router.go:144 +0x25 github.com/justinas/nosurf.(*CSRFHandler).handleSuccess(...) /home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:187 github.com/justinas/nosurf.(*CSRFHandler).ServeHTTP(0xc0012805a0, {0x1093620, 0xc000550b60}, 0x108a8a0?) /home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:144 +0x5c4 git.mills.io/yarnsocial/yarn/internal/session.(*Manager).Handler.func1({0x1093620, 0xc000550b60}, 0xc0011db400) /opt/app/internal/session/manager.go:196 +0x26d net/http.HandlerFunc.ServeHTTP(0xd1f400?, {0x1093620?, 0xc000550b60?}, 0x4?) /usr/local/go/src/net/http/server.go:2109 +0x2f github.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1({0x1094040, 0xc0005a13e0}, 0x4d4901?) /home/vagrant/go/pkg/mod/github.com/!n!y!times/gziphandler@v1.1.1/gzip.go:338 +0x26f net/http.HandlerFunc.ServeHTTP(0xd8?, {0x1094040?, 0xc0005a13e0?}, 0x6f5e28?) /usr/local/go/src/net/http/server.go:2109 +0x2f github.com/unrolled/logger.(*Logger).Handler.func1({0x1094730?, 0xc0012d2460}, 0xc0011db400) /home/vagrant/go/pkg/mod/github.com/unrolled/logger@v0.0.0-20201216141554-31a3694fe979/logger.go:80 +0xf4 net/http.HandlerFunc.ServeHTTP(0x0?, {0x1094730?, 0xc0012d2460?}, 0x46bbae?) /usr/local/go/src/net/http/server.go:2109 +0x2f net/http.serverHandler.ServeHTTP({0xc0011ff6e0?}, {0x1094730, 0xc0012d2460}, 0xc0011db400) /usr/local/go/src/net/http/server.go:2947 +0x30c net/http.(*conn).serve(0xc0004e2f00, {0x1095250, 0xc001012de0}) /usr/local/go/src/net/http/server.go:1991 +0x607 created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:3102 +0x4db ** HTTP-BRIDGE: App server exited with status code: 2 ```
ocdtrekkie reopened this issue 7 months ago
Owner

Current progress merged in (minus a few trivial ones):
Proxy auth support 54f946613b
Sandstorm packaging support cac89f130e
Fix proxy auth 3a881be264
Use proxy auth as middleware 60acef3ddd

The next part of this project depends on me. I need to figure out how to get web publishing figured out, which requires I figure out how to do web publishing myself first.

Current progress merged in (minus a few trivial ones): Proxy auth support https://git.mills.io/yarnsocial/yarn/commit/54f946613b0a4cdbdec751b89df26d2ec1061c45 Sandstorm packaging support https://git.mills.io/yarnsocial/yarn/commit/cac89f130e6d96db22e71e0897b80764fb00ea65 Fix proxy auth https://git.mills.io/yarnsocial/yarn/commit/3a881be2646adc531a758eb387f904062c1c81fd Use proxy auth as middleware https://git.mills.io/yarnsocial/yarn/commit/60acef3ddd9ae40b9441aead0d28284fef0c7c31 The next part of this project depends on me. I need to figure out how to get web publishing figured out, which requires I figure out how to do web publishing myself first.
Owner

Okay, so more details on that stack trace:

If I post some things, and then click "Discover", the UI fails to load for me, and when I reload it, my old posts appear to be gone. But they still exist in the feed txt file. I posted three more times, and then hit Discover, and they also are now gone. ...But all five still are in the feed txt file.

Okay, so more details on that stack trace: If I post some things, and then click "Discover", the UI fails to load for me, and when I reload it, my old posts appear to be gone. But they still exist in the feed txt file. I posted three more times, and then hit Discover, and they also are now gone. ...But all five still are in the feed txt file.
Poster
Owner

Reopening for tracking. Second post caused this stream of stack trace:

[yarnd] 2022/11/20 04:16:37 (127.0.0.1:40506) "GET / HTTP/1.1" 200 4913 3.815153ms
fatal error: concurrent map writes
fatal error: concurrent map writes

goroutine 279 [running]:
git.mills.io/yarnsocial/yarn/internal/session.(*Session).Set(0xc0005267e0, {0xe5c5e5?, 0x5?}, {0xc0010772c7, 0x5})
	/opt/app/internal/session/session.go:70 +0x4b
git.mills.io/yarnsocial/yarn/internal/auth.(*ProxyAuth).MustAuth.func1({0x1093620, 0xc0005269a0}, 0xc000c9e700, {0xc00101bb40, 0x2, 0x2})
	/opt/app/internal/auth/proxy_auth.go:50 +0x265
github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc00120bc80, {0x1093620, 0xc0005269a0}, 0xc000c9e700)
	/home/vagrant/go/pkg/mod/github.com/julienschmidt/httprouter@v1.3.0/router.go:387 +0x81c
git.mills.io/yarnsocial/yarn/internal.(*Router).ServeHTTP(0xc00011c000?, {0x1093620?, 0xc0005269a0?}, 0x21?)
	/opt/app/internal/router.go:144 +0x25
github.com/justinas/nosurf.(*CSRFHandler).handleSuccess(...)
	/home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:187
github.com/justinas/nosurf.(*CSRFHandler).ServeHTTP(0xc0012805a0, {0x1093620, 0xc0005269a0}, 0x108a8a0?)
	/home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:144 +0x5c4
git.mills.io/yarnsocial/yarn/internal/session.(*Manager).Handler.func1({0x1093620, 0xc0005269a0}, 0xc000c9e300)
	/opt/app/internal/session/manager.go:196 +0x26d
net/http.HandlerFunc.ServeHTTP(0xd1f400?, {0x1093620?, 0xc0005269a0?}, 0x4?)
	/usr/local/go/src/net/http/server.go:2109 +0x2f
github.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1({0x1094040, 0xc000c10800}, 0x4d4901?)
	/home/vagrant/go/pkg/mod/github.com/!n!y!times/gziphandler@v1.1.1/gzip.go:338 +0x26f
net/http.HandlerFunc.ServeHTTP(0xd8?, {0x1094040?, 0xc000c10800?}, 0x6f5e28?)
	/usr/local/go/src/net/http/server.go:2109 +0x2f
github.com/unrolled/logger.(*Logger).Handler.func1({0x1094730?, 0xc0000367e0}, 0xc000c9e300)
	/home/vagrant/go/pkg/mod/github.com/unrolled/logger@v0.0.0-20201216141554-31a3694fe979/logger.go:80 +0xf4
net/http.HandlerFunc.ServeHTTP(0x0?, {0x1094730?, 0xc0000367e0?}, 0x46bbae?)
	/usr/local/go/src/net/http/server.go:2109 +0x2f
net/http.serverHandler.ServeHTTP({0xc0016b6420?}, {0x1094730, 0xc0000367e0}, 0xc000c9e300)
	/usr/local/go/src/net/http/server.go:2947 +0x30c
net/http.(*conn).serve(0xc00025a320, {0x1095250, 0xc001012de0})
	/usr/local/go/src/net/http/server.go:1991 +0x607
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3102 +0x4db

goroutine 1 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.(*Server).Run(0xc000204180)
	/opt/app/internal/server.go:184 +0x139
main.main()
	/opt/app/cmd/yarnd/main.go:454 +0x1225

goroutine 6 [select]:
github.com/wblakecaldwell/profiler.init.0.func1()
	/home/vagrant/go/pkg/mod/github.com/wblakecaldwell/profiler@v0.0.0-20150908040756-6111ef1313a1/web_endpoints.go:59 +0xbf
created by github.com/wblakecaldwell/profiler.init.0
	/home/vagrant/go/pkg/mod/github.com/wblakecaldwell/profiler@v0.0.0-20150908040756-6111ef1313a1/web_endpoints.go:48 +0x7d

goroutine 158 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebSub).processInbox(0xc0004e20a0)
	/opt/app/internal/indieweb/websub.go:744 +0x37
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func3()
	/opt/app/internal/indieweb/websub.go:241 +0x53
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub
	/opt/app/internal/indieweb/websub.go:239 +0x1f6

goroutine 23 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1()
	/opt/app/internal/ttlcache.go:98 +0x7f
created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache
	/opt/app/internal/ttlcache.go:97 +0xac

goroutine 156 [select]:
github.com/patrickmn/go-cache.(*janitor).Run(0xc0011f60a0, 0xc000eae090?)
	/home/vagrant/go/pkg/mod/github.com/patrickmn/go-cache@v2.1.0+incompatible/cache.go:1079 +0x85
created by github.com/patrickmn/go-cache.runJanitor
	/home/vagrant/go/pkg/mod/github.com/patrickmn/go-cache@v2.1.0+incompatible/cache.go:1099 +0xed

goroutine 157 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1()
	/opt/app/internal/ttlcache.go:98 +0x7f
created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache
	/opt/app/internal/ttlcache.go:97 +0xac

goroutine 159 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebSub).processOutbox(0xc0004e20a0)
	/opt/app/internal/indieweb/websub.go:752 +0x65
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func4()
	/opt/app/internal/indieweb/websub.go:248 +0x53
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub
	/opt/app/internal/indieweb/websub.go:246 +0x26a

goroutine 160 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebSub).processVerify(0xc0004e20a0)
	/opt/app/internal/indieweb/websub.go:801 +0x65
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func5()
	/opt/app/internal/indieweb/websub.go:255 +0x53
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub
	/opt/app/internal/indieweb/websub.go:253 +0x2d6

goroutine 177 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func6()
	/opt/app/internal/indieweb/websub.go:261 +0x65
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub
	/opt/app/internal/indieweb/websub.go:260 +0x34a

goroutine 178 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func7()
	/opt/app/internal/indieweb/websub.go:268 +0x65
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub
	/opt/app/internal/indieweb/websub.go:267 +0x3c5

goroutine 179 [select]:
github.com/robfig/cron.(*Cron).run(0xc000109310)
	/home/vagrant/go/pkg/mod/github.com/robfig/cron@v1.2.0/cron.go:191 +0x58d
created by github.com/robfig/cron.(*Cron).Start
	/home/vagrant/go/pkg/mod/github.com/robfig/cron@v1.2.0/cron.go:144 +0x65

goroutine 180 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 181 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 182 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 183 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 184 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 185 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 186 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 187 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 188 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 189 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1()
	/opt/app/internal/worker.go:35 +0x9f
created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start
	/opt/app/internal/worker.go:31 +0x56

goroutine 190 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start.func1()
	/opt/app/internal/dispatcher.go:60 +0x74
created by git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start
	/opt/app/internal/dispatcher.go:58 +0x37c

goroutine 191 [select]:
git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start.func2()
	/opt/app/internal/dispatcher.go:73 +0x8a
created by git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start
	/opt/app/internal/dispatcher.go:71 +0x3bf

goroutine 192 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebMention).processInbox(0xc00128fcb0)
	/opt/app/internal/indieweb/webmention.go:122 +0x5e
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention.func1()
	/opt/app/internal/indieweb/webmention.go:37 +0x53
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention
	/opt/app/internal/indieweb/webmention.go:35 +0x136

goroutine 193 [chan receive]:
git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebMention).processOutbox(0xc00128fcb0)
	/opt/app/internal/indieweb/webmention.go:166 +0x65
git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention.func2()
	/opt/app/internal/indieweb/webmention.go:42 +0x53
created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention
	/opt/app/internal/indieweb/webmention.go:40 +0x176

goroutine 223 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1()
	/opt/app/internal/ttlcache.go:98 +0x7f
created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache
	/opt/app/internal/ttlcache.go:97 +0xac

goroutine 224 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1()
	/opt/app/internal/ttlcache.go:98 +0x7f
created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache
	/opt/app/internal/ttlcache.go:97 +0xac

goroutine 226 [chan receive]:
git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1()
	/opt/app/internal/ttlcache.go:98 +0x7f
created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache
	/opt/app/internal/ttlcache.go:97 +0xac

goroutine 228 [IO wait]:
internal/poll.runtime_pollWait(0x7f5d6947da98, 0x72)
	/usr/local/go/src/runtime/netpoll.go:305 +0x89
internal/poll.(*pollDesc).wait(0xc00120a080?, 0x6?, 0x0)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc00120a080)
	/usr/local/go/src/internal/poll/fd_unix.go:614 +0x234
net.(*netFD).accept(0xc00120a080)
	/usr/local/go/src/net/fd_unix.go:172 +0x35
net.(*TCPListener).accept(0xc000c820c0)
	/usr/local/go/src/net/tcpsock_posix.go:142 +0x28
net.(*TCPListener).Accept(0xc000c820c0)
	/usr/local/go/src/net/tcpsock.go:288 +0x3d
net/http.(*Server).Serve(0xc000200000, {0x1094520, 0xc000c820c0})
	/usr/local/go/src/net/http/server.go:3070 +0x385
net/http.(*Server).ListenAndServe(0xc000200000)
	/usr/local/go/src/net/http/server.go:2999 +0x7d
git.mills.io/yarnsocial/yarn/internal.(*Server).ListenAndServe(0xc000204180)
	/opt/app/internal/server.go:243 +0x72e
git.mills.io/yarnsocial/yarn/internal.(*Server).Run.func1()
	/opt/app/internal/server.go:176 +0x2a
created by git.mills.io/yarnsocial/yarn/internal.(*Server).Run
	/opt/app/internal/server.go:175 +0xac

goroutine 230 [syscall]:
os/signal.signal_recv()
	/usr/local/go/src/runtime/sigqueue.go:152 +0x2f
os/signal.loop()
	/usr/local/go/src/os/signal/signal_unix.go:23 +0x19
created by os/signal.Notify.func1.1
	/usr/local/go/src/os/signal/signal.go:151 +0x2a

goroutine 289 [IO wait]:
internal/poll.runtime_pollWait(0x7f5d6947d8b8, 0x72)
	/usr/local/go/src/runtime/netpoll.go:305 +0x89
internal/poll.(*pollDesc).wait(0xc0014cc000?, 0xc0011ff6f1?, 0x0)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0014cc000, {0xc0011ff6f1, 0x1, 0x1})
	/usr/local/go/src/internal/poll/fd_unix.go:167 +0x25a
net.(*netFD).Read(0xc0014cc000, {0xc0011ff6f1?, 0x0?, 0xc?})
	/usr/local/go/src/net/fd_posix.go:55 +0x29
net.(*conn).Read(0xc0012b4850, {0xc0011ff6f1?, 0xeb38c0?, 0x0?})
	/usr/local/go/src/net/net.go:183 +0x45
net/http.(*connReader).backgroundRead(0xc0011ff6e0)
	/usr/local/go/src/net/http/server.go:678 +0x3f
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:674 +0xca

goroutine 280 [runnable]:
net/http.(*connReader).startBackgroundRead.func2()
	/usr/local/go/src/net/http/server.go:674
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:1594 +0x1
created by net/http.(*connReader).startBackgroundRead
	/usr/local/go/src/net/http/server.go:674 +0xca

goroutine 272 [running]:
	goroutine running on other thread; stack unavailable
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3102 +0x4db

goroutine 272 [running]:
git.mills.io/yarnsocial/yarn/internal/session.(*Session).Set(0xc0005267e0, {0xe5c5e5?, 0x5?}, {0xc001217477, 0x5})
	/opt/app/internal/session/session.go:70 +0x4b
git.mills.io/yarnsocial/yarn/internal/auth.(*ProxyAuth).MustAuth.func1({0x1093620, 0xc000550b60}, 0xc0011db600, {0xc000fdbc40, 0x2, 0x2})
	/opt/app/internal/auth/proxy_auth.go:50 +0x265
github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc00120bc80, {0x1093620, 0xc000550b60}, 0xc0011db600)
	/home/vagrant/go/pkg/mod/github.com/julienschmidt/httprouter@v1.3.0/router.go:387 +0x81c
git.mills.io/yarnsocial/yarn/internal.(*Router).ServeHTTP(0xc00011c000?, {0x1093620?, 0xc000550b60?}, 0x21?)
	/opt/app/internal/router.go:144 +0x25
github.com/justinas/nosurf.(*CSRFHandler).handleSuccess(...)
	/home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:187
github.com/justinas/nosurf.(*CSRFHandler).ServeHTTP(0xc0012805a0, {0x1093620, 0xc000550b60}, 0x108a8a0?)
	/home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:144 +0x5c4
git.mills.io/yarnsocial/yarn/internal/session.(*Manager).Handler.func1({0x1093620, 0xc000550b60}, 0xc0011db400)
	/opt/app/internal/session/manager.go:196 +0x26d
net/http.HandlerFunc.ServeHTTP(0xd1f400?, {0x1093620?, 0xc000550b60?}, 0x4?)
	/usr/local/go/src/net/http/server.go:2109 +0x2f
github.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1({0x1094040, 0xc0005a13e0}, 0x4d4901?)
	/home/vagrant/go/pkg/mod/github.com/!n!y!times/gziphandler@v1.1.1/gzip.go:338 +0x26f
net/http.HandlerFunc.ServeHTTP(0xd8?, {0x1094040?, 0xc0005a13e0?}, 0x6f5e28?)
	/usr/local/go/src/net/http/server.go:2109 +0x2f
github.com/unrolled/logger.(*Logger).Handler.func1({0x1094730?, 0xc0012d2460}, 0xc0011db400)
	/home/vagrant/go/pkg/mod/github.com/unrolled/logger@v0.0.0-20201216141554-31a3694fe979/logger.go:80 +0xf4
net/http.HandlerFunc.ServeHTTP(0x0?, {0x1094730?, 0xc0012d2460?}, 0x46bbae?)
	/usr/local/go/src/net/http/server.go:2109 +0x2f
net/http.serverHandler.ServeHTTP({0xc0011ff6e0?}, {0x1094730, 0xc0012d2460}, 0xc0011db400)
	/usr/local/go/src/net/http/server.go:2947 +0x30c
net/http.(*conn).serve(0xc0004e2f00, {0x1095250, 0xc001012de0})
	/usr/local/go/src/net/http/server.go:1991 +0x607
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3102 +0x4db
** HTTP-BRIDGE: App server exited with status code: 2

Fixed in f5a9213e

> Reopening for tracking. Second post caused this stream of stack trace: > > ``` > [yarnd] 2022/11/20 04:16:37 (127.0.0.1:40506) "GET / HTTP/1.1" 200 4913 3.815153ms > fatal error: concurrent map writes > fatal error: concurrent map writes > > goroutine 279 [running]: > git.mills.io/yarnsocial/yarn/internal/session.(*Session).Set(0xc0005267e0, {0xe5c5e5?, 0x5?}, {0xc0010772c7, 0x5}) > /opt/app/internal/session/session.go:70 +0x4b > git.mills.io/yarnsocial/yarn/internal/auth.(*ProxyAuth).MustAuth.func1({0x1093620, 0xc0005269a0}, 0xc000c9e700, {0xc00101bb40, 0x2, 0x2}) > /opt/app/internal/auth/proxy_auth.go:50 +0x265 > github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc00120bc80, {0x1093620, 0xc0005269a0}, 0xc000c9e700) > /home/vagrant/go/pkg/mod/github.com/julienschmidt/httprouter@v1.3.0/router.go:387 +0x81c > git.mills.io/yarnsocial/yarn/internal.(*Router).ServeHTTP(0xc00011c000?, {0x1093620?, 0xc0005269a0?}, 0x21?) > /opt/app/internal/router.go:144 +0x25 > github.com/justinas/nosurf.(*CSRFHandler).handleSuccess(...) > /home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:187 > github.com/justinas/nosurf.(*CSRFHandler).ServeHTTP(0xc0012805a0, {0x1093620, 0xc0005269a0}, 0x108a8a0?) > /home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:144 +0x5c4 > git.mills.io/yarnsocial/yarn/internal/session.(*Manager).Handler.func1({0x1093620, 0xc0005269a0}, 0xc000c9e300) > /opt/app/internal/session/manager.go:196 +0x26d > net/http.HandlerFunc.ServeHTTP(0xd1f400?, {0x1093620?, 0xc0005269a0?}, 0x4?) > /usr/local/go/src/net/http/server.go:2109 +0x2f > github.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1({0x1094040, 0xc000c10800}, 0x4d4901?) > /home/vagrant/go/pkg/mod/github.com/!n!y!times/gziphandler@v1.1.1/gzip.go:338 +0x26f > net/http.HandlerFunc.ServeHTTP(0xd8?, {0x1094040?, 0xc000c10800?}, 0x6f5e28?) > /usr/local/go/src/net/http/server.go:2109 +0x2f > github.com/unrolled/logger.(*Logger).Handler.func1({0x1094730?, 0xc0000367e0}, 0xc000c9e300) > /home/vagrant/go/pkg/mod/github.com/unrolled/logger@v0.0.0-20201216141554-31a3694fe979/logger.go:80 +0xf4 > net/http.HandlerFunc.ServeHTTP(0x0?, {0x1094730?, 0xc0000367e0?}, 0x46bbae?) > /usr/local/go/src/net/http/server.go:2109 +0x2f > net/http.serverHandler.ServeHTTP({0xc0016b6420?}, {0x1094730, 0xc0000367e0}, 0xc000c9e300) > /usr/local/go/src/net/http/server.go:2947 +0x30c > net/http.(*conn).serve(0xc00025a320, {0x1095250, 0xc001012de0}) > /usr/local/go/src/net/http/server.go:1991 +0x607 > created by net/http.(*Server).Serve > /usr/local/go/src/net/http/server.go:3102 +0x4db > > goroutine 1 [chan receive]: > git.mills.io/yarnsocial/yarn/internal.(*Server).Run(0xc000204180) > /opt/app/internal/server.go:184 +0x139 > main.main() > /opt/app/cmd/yarnd/main.go:454 +0x1225 > > goroutine 6 [select]: > github.com/wblakecaldwell/profiler.init.0.func1() > /home/vagrant/go/pkg/mod/github.com/wblakecaldwell/profiler@v0.0.0-20150908040756-6111ef1313a1/web_endpoints.go:59 +0xbf > created by github.com/wblakecaldwell/profiler.init.0 > /home/vagrant/go/pkg/mod/github.com/wblakecaldwell/profiler@v0.0.0-20150908040756-6111ef1313a1/web_endpoints.go:48 +0x7d > > goroutine 158 [chan receive]: > git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebSub).processInbox(0xc0004e20a0) > /opt/app/internal/indieweb/websub.go:744 +0x37 > git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func3() > /opt/app/internal/indieweb/websub.go:241 +0x53 > created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub > /opt/app/internal/indieweb/websub.go:239 +0x1f6 > > goroutine 23 [chan receive]: > git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1() > /opt/app/internal/ttlcache.go:98 +0x7f > created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache > /opt/app/internal/ttlcache.go:97 +0xac > > goroutine 156 [select]: > github.com/patrickmn/go-cache.(*janitor).Run(0xc0011f60a0, 0xc000eae090?) > /home/vagrant/go/pkg/mod/github.com/patrickmn/go-cache@v2.1.0+incompatible/cache.go:1079 +0x85 > created by github.com/patrickmn/go-cache.runJanitor > /home/vagrant/go/pkg/mod/github.com/patrickmn/go-cache@v2.1.0+incompatible/cache.go:1099 +0xed > > goroutine 157 [chan receive]: > git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1() > /opt/app/internal/ttlcache.go:98 +0x7f > created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache > /opt/app/internal/ttlcache.go:97 +0xac > > goroutine 159 [chan receive]: > git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebSub).processOutbox(0xc0004e20a0) > /opt/app/internal/indieweb/websub.go:752 +0x65 > git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func4() > /opt/app/internal/indieweb/websub.go:248 +0x53 > created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub > /opt/app/internal/indieweb/websub.go:246 +0x26a > > goroutine 160 [chan receive]: > git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebSub).processVerify(0xc0004e20a0) > /opt/app/internal/indieweb/websub.go:801 +0x65 > git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func5() > /opt/app/internal/indieweb/websub.go:255 +0x53 > created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub > /opt/app/internal/indieweb/websub.go:253 +0x2d6 > > goroutine 177 [chan receive]: > git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func6() > /opt/app/internal/indieweb/websub.go:261 +0x65 > created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub > /opt/app/internal/indieweb/websub.go:260 +0x34a > > goroutine 178 [chan receive]: > git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub.func7() > /opt/app/internal/indieweb/websub.go:268 +0x65 > created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebSub > /opt/app/internal/indieweb/websub.go:267 +0x3c5 > > goroutine 179 [select]: > github.com/robfig/cron.(*Cron).run(0xc000109310) > /home/vagrant/go/pkg/mod/github.com/robfig/cron@v1.2.0/cron.go:191 +0x58d > created by github.com/robfig/cron.(*Cron).Start > /home/vagrant/go/pkg/mod/github.com/robfig/cron@v1.2.0/cron.go:144 +0x65 > > goroutine 180 [select]: > git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() > /opt/app/internal/worker.go:35 +0x9f > created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start > /opt/app/internal/worker.go:31 +0x56 > > goroutine 181 [select]: > git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() > /opt/app/internal/worker.go:35 +0x9f > created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start > /opt/app/internal/worker.go:31 +0x56 > > goroutine 182 [select]: > git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() > /opt/app/internal/worker.go:35 +0x9f > created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start > /opt/app/internal/worker.go:31 +0x56 > > goroutine 183 [select]: > git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() > /opt/app/internal/worker.go:35 +0x9f > created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start > /opt/app/internal/worker.go:31 +0x56 > > goroutine 184 [select]: > git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() > /opt/app/internal/worker.go:35 +0x9f > created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start > /opt/app/internal/worker.go:31 +0x56 > > goroutine 185 [select]: > git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() > /opt/app/internal/worker.go:35 +0x9f > created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start > /opt/app/internal/worker.go:31 +0x56 > > goroutine 186 [select]: > git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() > /opt/app/internal/worker.go:35 +0x9f > created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start > /opt/app/internal/worker.go:31 +0x56 > > goroutine 187 [select]: > git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() > /opt/app/internal/worker.go:35 +0x9f > created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start > /opt/app/internal/worker.go:31 +0x56 > > goroutine 188 [select]: > git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() > /opt/app/internal/worker.go:35 +0x9f > created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start > /opt/app/internal/worker.go:31 +0x56 > > goroutine 189 [select]: > git.mills.io/yarnsocial/yarn/internal.(*Worker).Start.func1() > /opt/app/internal/worker.go:35 +0x9f > created by git.mills.io/yarnsocial/yarn/internal.(*Worker).Start > /opt/app/internal/worker.go:31 +0x56 > > goroutine 190 [chan receive]: > git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start.func1() > /opt/app/internal/dispatcher.go:60 +0x74 > created by git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start > /opt/app/internal/dispatcher.go:58 +0x37c > > goroutine 191 [select]: > git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start.func2() > /opt/app/internal/dispatcher.go:73 +0x8a > created by git.mills.io/yarnsocial/yarn/internal.(*Dispatcher).Start > /opt/app/internal/dispatcher.go:71 +0x3bf > > goroutine 192 [chan receive]: > git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebMention).processInbox(0xc00128fcb0) > /opt/app/internal/indieweb/webmention.go:122 +0x5e > git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention.func1() > /opt/app/internal/indieweb/webmention.go:37 +0x53 > created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention > /opt/app/internal/indieweb/webmention.go:35 +0x136 > > goroutine 193 [chan receive]: > git.mills.io/yarnsocial/yarn/internal/indieweb.(*WebMention).processOutbox(0xc00128fcb0) > /opt/app/internal/indieweb/webmention.go:166 +0x65 > git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention.func2() > /opt/app/internal/indieweb/webmention.go:42 +0x53 > created by git.mills.io/yarnsocial/yarn/internal/indieweb.NewWebMention > /opt/app/internal/indieweb/webmention.go:40 +0x176 > > goroutine 223 [chan receive]: > git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1() > /opt/app/internal/ttlcache.go:98 +0x7f > created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache > /opt/app/internal/ttlcache.go:97 +0xac > > goroutine 224 [chan receive]: > git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1() > /opt/app/internal/ttlcache.go:98 +0x7f > created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache > /opt/app/internal/ttlcache.go:97 +0xac > > goroutine 226 [chan receive]: > git.mills.io/yarnsocial/yarn/internal.NewTTLCache.func1() > /opt/app/internal/ttlcache.go:98 +0x7f > created by git.mills.io/yarnsocial/yarn/internal.NewTTLCache > /opt/app/internal/ttlcache.go:97 +0xac > > goroutine 228 [IO wait]: > internal/poll.runtime_pollWait(0x7f5d6947da98, 0x72) > /usr/local/go/src/runtime/netpoll.go:305 +0x89 > internal/poll.(*pollDesc).wait(0xc00120a080?, 0x6?, 0x0) > /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32 > internal/poll.(*pollDesc).waitRead(...) > /usr/local/go/src/internal/poll/fd_poll_runtime.go:89 > internal/poll.(*FD).Accept(0xc00120a080) > /usr/local/go/src/internal/poll/fd_unix.go:614 +0x234 > net.(*netFD).accept(0xc00120a080) > /usr/local/go/src/net/fd_unix.go:172 +0x35 > net.(*TCPListener).accept(0xc000c820c0) > /usr/local/go/src/net/tcpsock_posix.go:142 +0x28 > net.(*TCPListener).Accept(0xc000c820c0) > /usr/local/go/src/net/tcpsock.go:288 +0x3d > net/http.(*Server).Serve(0xc000200000, {0x1094520, 0xc000c820c0}) > /usr/local/go/src/net/http/server.go:3070 +0x385 > net/http.(*Server).ListenAndServe(0xc000200000) > /usr/local/go/src/net/http/server.go:2999 +0x7d > git.mills.io/yarnsocial/yarn/internal.(*Server).ListenAndServe(0xc000204180) > /opt/app/internal/server.go:243 +0x72e > git.mills.io/yarnsocial/yarn/internal.(*Server).Run.func1() > /opt/app/internal/server.go:176 +0x2a > created by git.mills.io/yarnsocial/yarn/internal.(*Server).Run > /opt/app/internal/server.go:175 +0xac > > goroutine 230 [syscall]: > os/signal.signal_recv() > /usr/local/go/src/runtime/sigqueue.go:152 +0x2f > os/signal.loop() > /usr/local/go/src/os/signal/signal_unix.go:23 +0x19 > created by os/signal.Notify.func1.1 > /usr/local/go/src/os/signal/signal.go:151 +0x2a > > goroutine 289 [IO wait]: > internal/poll.runtime_pollWait(0x7f5d6947d8b8, 0x72) > /usr/local/go/src/runtime/netpoll.go:305 +0x89 > internal/poll.(*pollDesc).wait(0xc0014cc000?, 0xc0011ff6f1?, 0x0) > /usr/local/go/src/internal/poll/fd_poll_runtime.go:84 +0x32 > internal/poll.(*pollDesc).waitRead(...) > /usr/local/go/src/internal/poll/fd_poll_runtime.go:89 > internal/poll.(*FD).Read(0xc0014cc000, {0xc0011ff6f1, 0x1, 0x1}) > /usr/local/go/src/internal/poll/fd_unix.go:167 +0x25a > net.(*netFD).Read(0xc0014cc000, {0xc0011ff6f1?, 0x0?, 0xc?}) > /usr/local/go/src/net/fd_posix.go:55 +0x29 > net.(*conn).Read(0xc0012b4850, {0xc0011ff6f1?, 0xeb38c0?, 0x0?}) > /usr/local/go/src/net/net.go:183 +0x45 > net/http.(*connReader).backgroundRead(0xc0011ff6e0) > /usr/local/go/src/net/http/server.go:678 +0x3f > created by net/http.(*connReader).startBackgroundRead > /usr/local/go/src/net/http/server.go:674 +0xca > > goroutine 280 [runnable]: > net/http.(*connReader).startBackgroundRead.func2() > /usr/local/go/src/net/http/server.go:674 > runtime.goexit() > /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 > created by net/http.(*connReader).startBackgroundRead > /usr/local/go/src/net/http/server.go:674 +0xca > > goroutine 272 [running]: > goroutine running on other thread; stack unavailable > created by net/http.(*Server).Serve > /usr/local/go/src/net/http/server.go:3102 +0x4db > > goroutine 272 [running]: > git.mills.io/yarnsocial/yarn/internal/session.(*Session).Set(0xc0005267e0, {0xe5c5e5?, 0x5?}, {0xc001217477, 0x5}) > /opt/app/internal/session/session.go:70 +0x4b > git.mills.io/yarnsocial/yarn/internal/auth.(*ProxyAuth).MustAuth.func1({0x1093620, 0xc000550b60}, 0xc0011db600, {0xc000fdbc40, 0x2, 0x2}) > /opt/app/internal/auth/proxy_auth.go:50 +0x265 > github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc00120bc80, {0x1093620, 0xc000550b60}, 0xc0011db600) > /home/vagrant/go/pkg/mod/github.com/julienschmidt/httprouter@v1.3.0/router.go:387 +0x81c > git.mills.io/yarnsocial/yarn/internal.(*Router).ServeHTTP(0xc00011c000?, {0x1093620?, 0xc000550b60?}, 0x21?) > /opt/app/internal/router.go:144 +0x25 > github.com/justinas/nosurf.(*CSRFHandler).handleSuccess(...) > /home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:187 > github.com/justinas/nosurf.(*CSRFHandler).ServeHTTP(0xc0012805a0, {0x1093620, 0xc000550b60}, 0x108a8a0?) > /home/vagrant/go/pkg/mod/github.com/justinas/nosurf@v1.1.1/handler.go:144 +0x5c4 > git.mills.io/yarnsocial/yarn/internal/session.(*Manager).Handler.func1({0x1093620, 0xc000550b60}, 0xc0011db400) > /opt/app/internal/session/manager.go:196 +0x26d > net/http.HandlerFunc.ServeHTTP(0xd1f400?, {0x1093620?, 0xc000550b60?}, 0x4?) > /usr/local/go/src/net/http/server.go:2109 +0x2f > github.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1({0x1094040, 0xc0005a13e0}, 0x4d4901?) > /home/vagrant/go/pkg/mod/github.com/!n!y!times/gziphandler@v1.1.1/gzip.go:338 +0x26f > net/http.HandlerFunc.ServeHTTP(0xd8?, {0x1094040?, 0xc0005a13e0?}, 0x6f5e28?) > /usr/local/go/src/net/http/server.go:2109 +0x2f > github.com/unrolled/logger.(*Logger).Handler.func1({0x1094730?, 0xc0012d2460}, 0xc0011db400) > /home/vagrant/go/pkg/mod/github.com/unrolled/logger@v0.0.0-20201216141554-31a3694fe979/logger.go:80 +0xf4 > net/http.HandlerFunc.ServeHTTP(0x0?, {0x1094730?, 0xc0012d2460?}, 0x46bbae?) > /usr/local/go/src/net/http/server.go:2109 +0x2f > net/http.serverHandler.ServeHTTP({0xc0011ff6e0?}, {0x1094730, 0xc0012d2460}, 0xc0011db400) > /usr/local/go/src/net/http/server.go:2947 +0x30c > net/http.(*conn).serve(0xc0004e2f00, {0x1095250, 0xc001012de0}) > /usr/local/go/src/net/http/server.go:1991 +0x607 > created by net/http.(*Server).Serve > /usr/local/go/src/net/http/server.go:3102 +0x4db > ** HTTP-BRIDGE: App server exited with status code: 2 > ``` Fixed in f5a9213e
Poster
Owner

Okay, so more details on that stack trace:

If I post some things, and then click "Discover", the UI fails to load for me, and when I reload it, my old posts appear to be gone. But they still exist in the feed txt file. I posted three more times, and then hit Discover, and they also are now gone. ...But all five still are in the feed txt file.

Fixed in f5a9213e

> Okay, so more details on that stack trace: > > If I post some things, and then click "Discover", the UI fails to load for me, and when I reload it, my old posts appear to be gone. But they still exist in the feed txt file. I posted three more times, and then hit Discover, and they also are now gone. ...But all five still are in the feed txt file. Fixed in f5a9213e
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: yarnsocial/yarn#590
Loading…
There is no content yet.