Docker engine segfaults afer server crash

Hi,

Afer a severe server crash and a file system recovery, the docker engine doesn’t start and segfaults. This is the journalctl -xe error:

 $ sudo systemctl status docker
 docker.service - Docker Application Container Engine
 Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
 Active: failed (Result: core-dump) since Mon 2017-03-06 17:54:43 COT; 1min 40s ago
 Docs: https://docs.docker.com
 Process: 688 ExecStart=/usr/bin/dockerd -H fd:// (code=dumped, signal=SEGV)
 Main PID: 688 (code=dumped, signal=SEGV)
 Mar 06 17:54:43 svr-2 systemd[1]: Starting Docker Application Container Engine...
 Mar 06 17:54:43 svr-2 systemd[1]: docker.service: Main process exited, code=dumped, status=11/SEGV
 Mar 06 17:54:43 svr-2 systemd[1]: Failed to start Docker Application Container Engine.
 Mar 06 17:54:43 svr-2 systemd[1]: docker.service: Unit entered failed state.
 Mar 06 17:54:43 svr-2 systemd[1]: docker.service: Failed with result 'core-dump'.

 $ sudo journalctl -xe
 Mar 06 17:56:37 svr-2 sudo[962]: pam_unix(sudo:session): session opened for user root by jbaptiste(uid=0)
 Mar 06 17:56:37 svr-2 polkitd(authority=local)[697]: Registered Authentication Agent for unix-process:963:12721 (system bus name :1.6 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object 
 Mar 06 17:56:37 svr-2 systemd[1]: Starting Docker Application Container Engine...
 -- Subject: Unit docker.service has begun start-up
 -- Defined-By: systemd
 -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
 -- 
 -- Unit docker.service has begun starting up.
 Mar 06 17:56:37 svr-2 kernel: dockerd[969]: segfault at ffffffffffffffd9 ip 000000000040aa00 sp 00007ffd63b1c940 error 5 in dockerd[400000+2479000]
 Mar 06 17:56:37 svr-2 systemd[1]: docker.service: Main process exited, code=dumped, status=11/SEGV
 Mar 06 17:56:37 svr-2 systemd[1]: Failed to start Docker Application Container Engine.
 -     - Subject: Unit docker.service has failed
 -- Defined-By: systemd
 -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
 -- 
 -- Unit docker.service has failed.
 -- 
 -- The result is failed.
 Mar 06 17:56:37 svr-2 systemd[1]: docker.service: Unit entered failed state.
 Mar 06 17:56:37 svr-2 systemd[1]: docker.service: Failed with result 'core-dump'.

Any ideas on how to recover it ? as the containers that run on that server all have host volumes I was thinking on removing docker and the /var/lib/docker directory and reinstalling it, WDYT ?

It turned out that the filesystem was damaged pretty badly, and there are errors everywhere: corrupted apt configuration files, files missing, etc, so the only option is to recover on a new server :frowning: