Panic when MM server start

Description

seeing this panic
```json
{"level":"debug","ts":1600443282.5472505,"caller":"web/handlers.go:100","msg":"Received HTTP request","method":"GET","url":"/api/v4/system/ping","request_id":"sk47ouxphire3fqu4gykj8t4by","status_code":""}
{"level":"error","ts":1600443282.5474207,"caller":"http/server.go:3059","msg":"http: panic serving 10.128.148.189:40204: runtime error: invalid memory address or nil pointer dereference\ngoroutine 3103 [running]:\nnet/http.(*conn).serve.func1(0xc0002b17c0)\n\tnet/http/server.go:1772 +0x139\npanic(0x1fb6800, 0x39b5160)\n\truntime/panic.go:973 +0x3e3\ngithub.com/mattermost/mattermost-server/v5/plugin.(*Environment).SetPrepackagedPlugins(0x0, 0xc0020013e0, 0xb, 0xb)\n\tgithub.com/mattermost/mattermost-server/v5/plugin/environment.go:492 +0x22\ngithub.com/mattermost/mattermost-server/v5/app.(*App).InitPlugins(0xc00000c960, 0xc0018b9230, 0x9, 0xc0018b9250, 0x10)\n\tgithub.com/mattermost/mattermost-server/v5/app/plugin.go:187 +0x540\ngithub.com/mattermost/mattermost-server/v5/app.(*App).InitServer.func1()\n\tgithub.com/mattermost/mattermost-server/v5/app/app.go:103 +0x264\nsync.(*Once).doSlow(0xc002142c20, 0xc000be92f8)\n\tsync/once.go:66 +0xec\nsync.(*Once).Do(...)\n\tsync/once.go:57\ngithub.com/mattermost/mattermost-server/v5/app.(*App).InitServer(0xc00000c960)\n\tgithub.com/mattermost/mattermost-server/v5/app/app.go:70 +0x152\ngithub.com/mattermost/mattermost-server/v5/web.Handler.ServeHTTP(0xc0018fa4a0, 0x23cf570, 0x357d5f0, 0xd, 0x0, 0x0, 0x0, 0x26fafc0, 0xc0002e4fc0, 0xc002180200)\n\tgithub.com/mattermost/mattermost-server/v5/web/handlers.go:107 +0x280\ngithub.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1(0x26faa00, 0xc0001528c0, 0xc002180200)\n\tgithub.com/NYTimes/gziphandler@v1.1.1/gzip.go:336 +0x211\nnet/http.HandlerFunc.ServeHTTP(0xc001bb3ce0, 0x26faa00, 0xc0001528c0, 0xc002180200)\n\tnet/http/server.go:2012 +0x44\ngithub.com/gorilla/mux.(*Router).ServeHTTP(0xc00222e780, 0x26faa00, 0xc0001528c0, 0xc0004ffe00)\n\tgithub.com/gorilla/mux@v1.7.4/mux.go:210 +0xe2\nnet/http.serverHandler.ServeHTTP(0xc0001ee380, 0x26faa00, 0xc0001528c0, 0xc0004ffe00)\n\tnet/http/server.go:2807 +0xa3\nnet/http.(*conn).serve(0xc0002b17c0, 0x2703700, 0xc000bd0f40)\n\tnet/http/server.go:1895 +0x86c\ncreated by net/http.(*Server).Serve\n\tnet/http/server.go:2933 +0x35c","source":"httpserver"}
{"level":"debug","ts":1600443282.5476747,"caller":"web/handlers.go:100","msg":"Received HTTP request","method":"GET","url":"/api/v4/system/ping","request_id":"bya84otynjgbjewojohszfai5y","status_code":"200"}
{"level":"debug","ts":1600443282.5477102,"caller":"web/handlers.go:100","msg":"Received HTTP request","method":"GET","url":"/api/v4/system/ping","request_id":"w8489b3j7idxzke3zayxg61gah","status_code":"200"}
{"level":"debug","ts":1600443282.547834,"caller":"web/handlers.go:100","msg":"Received HTTP request","method":"GET","url":"/api/v4/system/ping","request_id":"kh53pdqc7bfqijjfrip786towa","status_code":"200"}
```

This is running on the CLOUD STAGING account

Issue created from a message in Mattermost.

QA Test Steps

None

Activity

Show:
Christopher Poile
September 18, 2020, 5:37 PM
Edited

Update from Carlos: not happening on every instance, just that one time. It caused a server restart, and eventually it worked. Probably a plugin behaving badly. But he doesn’t have access to that instance anymore.

Maria Nuñez
September 18, 2020, 5:45 PM

This happened before we deployed the latest MM with the new IR plugin as prepackaged so I don’t think it is related.

Christopher Poile
September 18, 2020, 5:50 PM

Thanks . I’ll wait for more info from Carlos, see if he can find what plugins were prepackaged on that instance, and if there are any other logs.

If we don’t have that info then just keep our eyes out for it to happen again and get more logs next time.

Agniva De Sarker
October 6, 2020, 10:12 AM

This is a duplicate of .

- Can you confirm that the server where it happened was running a commit after ?

I see that the commit went in 3rd Aug, and the ticket was filed Sep 18. So I am not sure if indeed this happened before that commit, but given that it happened only once, I think that commit likely fixed it.

cc

Carlos Panato
October 6, 2020, 10:28 AM

I will try to reproduce that

Mana

None

Assignee

Miguel de la Cruz

QA Assignee

None

Reporter

Carlos Panato

Epic Link

None

Fix versions

Mattermost Team

Sustained Engineering

Sprint

None

Labels

None

QA Testing Areas

None

GitHub Issue

None

Components

None

Severity

None
Configure