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

Server crashes on outdated databases #26

Open
HannaLindgren opened this issue Oct 23, 2019 · 0 comments
Open

Server crashes on outdated databases #26

HannaLindgren opened this issue Oct 23, 2019 · 0 comments

Comments

@HannaLindgren
Copy link
Member

Error report

Error when trying to use old (outdated table declarations) databases in the db_files folder, the server simply crashes without info.

We should make sure the user gets a more descriptive error message in these situations.

  1. Start lex server pointing to outdated db table declarations
    lexserver$ go run *go 7777

  2. Visit http://localhost:7777/lexicon/list

  3. Server crashes with the following stack trace:

panic: send on closed channel

goroutine 166 [running]:
github.com/stts-se/pronlex/dbapi.(*DBManager).ListLexicons.func1(0xc420132369, 0x10, 0xc4201472c0, 0xc420139800)
   /home/nikolaj/go/src/github.com/stts-se/pronlex/dbapi/db_manager.go:351 +0x372
created by github.com/stts-se/pronlex/dbapi.(*DBManager).ListLexicons
   /home/nikolaj/go/src/github.com/stts-se/pronlex/dbapi/db_manager.go:342 +0x1b1     
exit status 2


Notes

  1. Have the dbapi compare each db schema to the current schema as defined in code. If they don't match, give a proper, but simple, error message. Maybe print more info to stderr but still give the client/user a short description of the situation.
  2. The stack trace refers to ch0 <- r so I don't know yet exactly where this error originates ... needs more investigation to put the error check in the right place.

[Moved from Phabricator]

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

No branches or pull requests

1 participant