Nvidia-uninstall Received signal SIGSEGV; aborting

I’m trying to run /usr/bin/nvidia-uninstall but no matter which flag I’m using I’m getting the error
Received signal SIGSEGV; aborting.

For instance
nvidia-uninstall --log-file-name /var/log/nvidia-uninstaller.log --skip-module-unload --silent

root@lab:~# cat /var/log/nvidia-uninstaller.log
nvidia-installer log file '/var/log/nvidia-uninstaller.log'
creation time: Tue Mar 24 16:40:04 2020
installer version: 440.44

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

nvidia-installer command line:
    nvidia-uninstall
    --log-file-name
    /var/log/nvidia-uninstaller.log
    --skip-module-unload
    --silent

Using built-in stream user interface
-> Detected 12 CPUs online; setting concurrency level to 12.

Some details:

root@lab:~# nvidia-smi
Tue Mar 24 17:21:38 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.44       Driver Version: 440.44       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 107...  On   | 00000000:01:00.0 Off |                  N/A |
| 38%   34C    P8    10W / 180W |      1MiB /  8119MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

I have installed the nvidia driver by using NVIDIA-Linux-x86_64-440.44.run

Does the same thing happen when you run
sudo ./NVIDIA-Linux-x86_64-440.44.run --uninstall
?

yes

Please try using the current 440.64 .run file to uninstall:
https://http.download.nvidia.com/XFree86/Linux-x86_64/

same error when running ./NVIDIA-Linux-x86_64-440.64.run --uninstall : Received signal SIGSEGV; aborting.

and in log file:

root@lab:~# cat /var/log/nvidia-uninstall.log
nvidia-installer log file '/var/log/nvidia-uninstall.log'
creation time: Tue Mar 24 18:02:19 2020
installer version: 440.64

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

nvidia-installer command line:
    ./nvidia-installer
    --uninstall

Unable to load: nvidia-installer ncurses v6 user interface

Using: nvidia-installer ncurses user interface
-> Detected 12 CPUs online; setting concurrency level to 12.

when running ./NVIDIA-Linux-x86_64-440.64.run --uninstall --skip-module-unload --silent
I’m getting the same error Received signal SIGSEGV; aborting.

Anyway to debug this?
I couldn’t find any verbosity or log level for the nvidia-uninstall …

Maybe just use coredumpctl first to get a backtrace.

If coredumpctl doesn’t provide anything useful, it might be helpful to build nvidia-installer from source with debugging enabled and reproduce the crash in a debugger:

git clone https://github.com/NVIDIA/nvidia-installer
cd nvidia-installer/
make -j8 DEBUG=1
gdb --args _out/Linux_x86_64/nvidia-installer --uninstall
(gdb) run
(gdb) backtrace

FYI - I got some issues while make
like: fatal error: pciaccess.h: No such file or directory and fatal error: ncurses.h: No such file or directory
workaround:

  1. apt install libpciaccess-dev libncurses5-dev
  2. git checkout git checkout 440.64

After I succeeded to run the make I did your suggested steps and I got:

  NVIDIA Software Installer for Unix/Linux                                                                                                                                              www.nvidia.com
                                                                                                                                                                                                      Program received signal SIGSEGV, Segmentation fault.
                                                  0x0000555555573795 in get_next_line (buf=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>, end=0x7fffffffe258,
    start=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>, length=4096) at misc.c:189
189             (*buf == '\0') ||
(gdb) backtrace
#0  0x0000555555573795 in get_next_line (buf=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>, end=0x7fffffffe258,
    start=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>, length=4096) at misc.c:189
#1  0x0000555555561815 in get_installed_driver_version_and_descr (op=0x5555557b1260, pVersion=0x7fffffffe358, pDescr=0x7fffffffe350) at backup.c:1246
#2  0x0000555555561b27 in uninstall_existing_driver (op=0x5555557b1260, interactive=1, skip_depmod=0) at backup.c:1380
#3  0x0000555555579a71 in main (argc=2, argv=0x7fffffffe488) at nvidia-installer.c:641

Environment:

OS: Ubuntu 18.04.3 LTS
Kernel: Linux lab 5.3.0-42-generic #34~18.04.1-Ubuntu SMP Fri Feb 28 13:42:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
User: root

This is the strace output of running the nvidia-uninstall

root@lab:~# strace -Ff -tt nvidia-uninstall
strace: deprecated option -F ignored
19:43:40.481692 execve("/usr/bin/nvidia-uninstall", ["nvidia-uninstall"], 0x7ffe92bc0ba0 /* 23 vars */) = 0
19:43:40.482792 brk(NULL)               = 0x14a8000
19:43:40.483064 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:43:40.483494 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
19:43:40.483975 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
19:43:40.484274 fstat(3, {st_mode=S_IFREG|0644, st_size=95220, ...}) = 0
19:43:40.484639 mmap(NULL, 95220, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f222249b000
19:43:40.484986 close(3)                = 0
19:43:40.485137 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:43:40.485181 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
19:43:40.485214 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\16\0\0\0\0\0\0"..., 832) = 832
19:43:40.485270 fstat(3, {st_mode=S_IFREG|0644, st_size=14560, ...}) = 0
19:43:40.485327 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2222499000
19:43:40.485403 mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2222088000
19:43:40.485444 mprotect(0x7f222208b000, 2093056, PROT_NONE) = 0
19:43:40.485494 mmap(0x7f222228a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f222228a000
19:43:40.485587 close(3)                = 0
19:43:40.485616 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:43:40.485667 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
19:43:40.485714 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\34\2\0\0\0\0\0"..., 832) = 832
19:43:40.485760 fstat(3, {st_mode=S_IFREG|0755, st_size=2030544, ...}) = 0
19:43:40.485813 mmap(NULL, 4131552, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2221c97000
19:43:40.485859 mprotect(0x7f2221e7e000, 2097152, PROT_NONE) = 0
19:43:40.485905 mmap(0x7f222207e000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e7000) = 0x7f222207e000
19:43:40.485959 mmap(0x7f2222084000, 15072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2222084000
19:43:40.486040 close(3)                = 0
19:43:40.486087 mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2222496000
19:43:40.486164 arch_prctl(ARCH_SET_FS, 0x7f2222496740) = 0
19:43:40.486229 mprotect(0x7f222207e000, 16384, PROT_READ) = 0
19:43:40.486265 mprotect(0x7f222228a000, 4096, PROT_READ) = 0
19:43:40.486302 mprotect(0x7f22224b3000, 4096, PROT_READ) = 0
19:43:40.486334 munmap(0x7f222249b000, 95220) = 0
19:43:40.486408 umask(022)              = 022
19:43:40.486470 brk(NULL)               = 0x14a8000
19:43:40.486496 brk(0x14c9000)          = 0x14c9000
19:43:40.486536 stat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=12288, ...}) = 0
19:43:40.486603 openat(AT_FDCWD, "/var/log/nvidia-uninstall.log", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
19:43:40.486693 fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
19:43:40.486754 write(3, "nvidia-installer log file '/var/"..., 58) = 58
19:43:40.486808 openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 4
19:43:40.486854 fstat(4, {st_mode=S_IFREG|0644, st_size=2321, ...}) = 0
19:43:40.486905 fstat(4, {st_mode=S_IFREG|0644, st_size=2321, ...}) = 0
19:43:40.486959 read(4, "TZif3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\6\0\0\0\0"..., 4096) = 2321
19:43:40.487010 lseek(4, -1473, SEEK_CUR) = 848
19:43:40.487054 read(4, "TZif3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\6\0\0\0\0"..., 4096) = 1473
19:43:40.487105 close(4)                = 0
19:43:40.487152 write(3, "creation time: Sun Mar 29 19:43:"..., 40) = 40
19:43:40.487205 write(3, "installer version: 440.44\n", 26) = 26
19:43:40.487253 write(3, "\n", 1)       = 1
19:43:40.487303 write(3, "PATH: /usr/local/sbin:/usr/local"..., 105) = 105
19:43:40.487356 write(3, "\n", 1)       = 1
19:43:40.487400 write(3, "nvidia-installer command line:\n", 31) = 31
19:43:40.487452 write(3, "    nvidia-uninstall\n", 21) = 21
19:43:40.487502 write(3, "\n", 1)       = 1
19:43:40.487561 getpid()                = 7059
19:43:40.487592 openat(AT_FDCWD, "/tmp/nv-ZHPg26", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
19:43:40.487667 lseek(4, 29360, SEEK_SET) = 29360
19:43:40.487716 write(4, "\0", 1)       = 1
19:43:40.487768 mmap(NULL, 29361, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) = 0x7f22224ab000
19:43:40.487870 munmap(0x7f22224ab000, 29361) = 0
19:43:40.487927 close(4)                = 0
19:43:40.487969 openat(AT_FDCWD, "/tmp/nv-ZHPg26", O_RDONLY|O_CLOEXEC) = 4
19:43:40.488003 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\20\0\0\0\0\0\0"..., 832) = 832
19:43:40.488056 fstat(4, {st_mode=S_IFREG|0600, st_size=29361, ...}) = 0
19:43:40.488111 mmap(NULL, 2119488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f2221a91000
19:43:40.488183 mprotect(0x7f2221a96000, 2097152, PROT_NONE) = 0
19:43:40.488232 mmap(0x7f2221c96000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x5000) = 0x7f2221c96000
19:43:40.488313 close(4)                = 0
19:43:40.488351 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
19:43:40.488398 fstat(4, {st_mode=S_IFREG|0644, st_size=95220, ...}) = 0
19:43:40.488457 mmap(NULL, 95220, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f222249b000
19:43:40.488523 close(4)                = 0
19:43:40.488564 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:43:40.488622 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/tls/haswell/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.488684 stat("/lib/x86_64-linux-gnu/tls/haswell/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.488742 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/tls/haswell/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.488791 stat("/lib/x86_64-linux-gnu/tls/haswell", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.488835 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/tls/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.488893 stat("/lib/x86_64-linux-gnu/tls/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.488953 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/tls/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.489013 stat("/lib/x86_64-linux-gnu/tls", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.489048 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/haswell/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.489104 stat("/lib/x86_64-linux-gnu/haswell/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.489158 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/haswell/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.489218 stat("/lib/x86_64-linux-gnu/haswell", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.489274 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.489334 stat("/lib/x86_64-linux-gnu/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.489392 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.489450 stat("/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
19:43:40.489512 openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/tls/haswell/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.489572 stat("/usr/lib/x86_64-linux-gnu/tls/haswell/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.489630 openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/tls/haswell/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.489691 stat("/usr/lib/x86_64-linux-gnu/tls/haswell", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.489750 openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/tls/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.489811 stat("/usr/lib/x86_64-linux-gnu/tls/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.489869 openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/tls/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.489930 stat("/usr/lib/x86_64-linux-gnu/tls", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
19:43:40.489991 openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/haswell/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.490053 stat("/usr/lib/x86_64-linux-gnu/haswell/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.490113 openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/haswell/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.490176 stat("/usr/lib/x86_64-linux-gnu/haswell", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.490228 openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.490290 stat("/usr/lib/x86_64-linux-gnu/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.490342 openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.490404 stat("/usr/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=69632, ...}) = 0
19:43:40.490465 openat(AT_FDCWD, "/lib/tls/haswell/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.490526 stat("/lib/tls/haswell/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.490584 openat(AT_FDCWD, "/lib/tls/haswell/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.490642 stat("/lib/tls/haswell", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.490700 openat(AT_FDCWD, "/lib/tls/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.490762 stat("/lib/tls/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.490820 openat(AT_FDCWD, "/lib/tls/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.490880 stat("/lib/tls", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.490936 openat(AT_FDCWD, "/lib/haswell/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.490994 stat("/lib/haswell/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.491054 openat(AT_FDCWD, "/lib/haswell/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.491114 stat("/lib/haswell", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.491172 openat(AT_FDCWD, "/lib/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.491236 stat("/lib/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.491293 openat(AT_FDCWD, "/lib/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.491353 stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
19:43:40.491412 openat(AT_FDCWD, "/usr/lib/tls/haswell/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.491472 stat("/usr/lib/tls/haswell/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.491530 openat(AT_FDCWD, "/usr/lib/tls/haswell/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.491590 stat("/usr/lib/tls/haswell", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.491647 openat(AT_FDCWD, "/usr/lib/tls/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.491703 stat("/usr/lib/tls/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.491760 openat(AT_FDCWD, "/usr/lib/tls/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.491818 stat("/usr/lib/tls", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.491870 openat(AT_FDCWD, "/usr/lib/haswell/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.491932 stat("/usr/lib/haswell/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.491988 openat(AT_FDCWD, "/usr/lib/haswell/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.492045 stat("/usr/lib/haswell", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.492105 openat(AT_FDCWD, "/usr/lib/x86_64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.492156 stat("/usr/lib/x86_64", 0x7ffe091f9cc0) = -1 ENOENT (No such file or directory)
19:43:40.492211 openat(AT_FDCWD, "/usr/lib/libncurses.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
19:43:40.492265 stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
19:43:40.492320 munmap(0x7f222249b000, 95220) = 0
19:43:40.492363 munmap(0x7f2221a91000, 2119488) = 0
19:43:40.492412 write(3, "Unable to load: nvidia-installer"..., 59) = 59
19:43:40.492462 write(3, "\n", 1)       = 1
19:43:40.492497 getpid()                = 7059
19:43:40.492523 openat(AT_FDCWD, "/tmp/nv-WzWxgw", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
19:43:40.492575 lseek(4, 29231, SEEK_SET) = 29231
19:43:40.492614 write(4, "\0", 1)       = 1
19:43:40.492650 mmap(NULL, 29232, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) = 0x7f22224ab000
19:43:40.492735 munmap(0x7f22224ab000, 29232) = 0
19:43:40.492781 close(4)                = 0
19:43:40.492817 openat(AT_FDCWD, "/tmp/nv-WzWxgw", O_RDONLY|O_CLOEXEC) = 4
19:43:40.492859 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\17\0\0\0\0\0\0"..., 832) = 832
19:43:40.492899 fstat(4, {st_mode=S_IFREG|0600, st_size=29232, ...}) = 0
19:43:40.492961 mmap(NULL, 2119456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f2221a91000
19:43:40.493037 mprotect(0x7f2221a96000, 2097152, PROT_NONE) = 0
19:43:40.493089 mmap(0x7f2221c96000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x5000) = 0x7f2221c96000
19:43:40.493165 close(4)                = 0
19:43:40.493204 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
19:43:40.493253 fstat(4, {st_mode=S_IFREG|0644, st_size=95220, ...}) = 0
19:43:40.493312 mmap(NULL, 95220, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f222249b000
19:43:40.493375 close(4)                = 0
19:43:40.493415 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:43:40.493472 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libncurses.so.5", O_RDONLY|O_CLOEXEC) = 4
19:43:40.493515 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360^\0\0\0\0\0\0"..., 832) = 832
19:43:40.493566 fstat(4, {st_mode=S_IFREG|0644, st_size=141248, ...}) = 0
19:43:40.493627 mmap(NULL, 2236872, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f222186e000
19:43:40.493696 mprotect(0x7f222188f000, 2097152, PROT_NONE) = 0
19:43:40.493750 mmap(0x7f2221a8f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x21000) = 0x7f2221a8f000
19:43:40.493841 close(4)                = 0
19:43:40.493879 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
19:43:40.493935 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 4
19:43:40.493980 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\311\0\0\0\0\0\0"..., 832) = 832
19:43:40.494038 fstat(4, {st_mode=S_IFREG|0644, st_size=170784, ...}) = 0
19:43:40.494092 mmap(NULL, 2267936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f2221644000
19:43:40.494172 mprotect(0x7f2221669000, 2097152, PROT_NONE) = 0
19:43:40.494222 mmap(0x7f2221869000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x25000) = 0x7f2221869000
19:43:40.494306 close(4)                = 0
19:43:40.494386 mprotect(0x7f2221869000, 16384, PROT_READ) = 0
19:43:40.494473 mprotect(0x7f2221a8f000, 4096, PROT_READ) = 0
19:43:40.494533 munmap(0x7f222249b000, 95220) = 0
19:43:40.494597 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
19:43:40.494658 stat("/root/.terminfo", 0x14ac3b0) = -1 ENOENT (No such file or directory)
19:43:40.494708 stat("/etc/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
19:43:40.494770 stat("/lib/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
19:43:40.494832 stat("/usr/share/terminfo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
19:43:40.494892 access("/etc/terminfo/x/xterm", R_OK) = -1 ENOENT (No such file or directory)
19:43:40.494947 access("/lib/terminfo/x/xterm", R_OK) = 0
19:43:40.494991 openat(AT_FDCWD, "/lib/terminfo/x/xterm", O_RDONLY) = 4
19:43:40.495038 fstat(4, {st_mode=S_IFREG|0644, st_size=3455, ...}) = 0
19:43:40.495076 read(4, "\32\1)\0&\0\17\0\235\1\270\5xterm|xterm-debian|X"..., 4096) = 3455
19:43:40.495126 read(4, "", 4096)       = 0
19:43:40.495189 close(4)                = 0
19:43:40.495231 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
19:43:40.495287 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
19:43:40.495349 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
19:43:40.495410 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
19:43:40.495468 ioctl(1, TIOCGWINSZ, {ws_row=60, ws_col=200, ws_xpixel=0, ws_ypixel=0}) = 0
19:43:40.495527 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
19:43:40.495580 ioctl(1, TIOCGWINSZ, {ws_row=60, ws_col=200, ws_xpixel=0, ws_ypixel=0}) = 0
19:43:40.495676 brk(0x14ea000)          = 0x14ea000
19:43:40.495761 brk(0x150b000)          = 0x150b000
19:43:40.495817 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
19:43:40.495866 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
19:43:40.495901 ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig -icanon echo ...}) = 0
19:43:40.495953 ioctl(1, TCGETS, {B38400 opost isig -icanon echo ...}) = 0
19:43:40.496004 ioctl(1, TCGETS, {B38400 opost isig -icanon echo ...}) = 0
19:43:40.496062 ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig -icanon -echo ...}) = 0
                                                                                               19:43:40.496103 ioctl(1, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
                                                                                                                                                                          19:43:40.496154 rt_sigaction(SIGTSTP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
                                                                  19:43:40.496221 rt_sigaction(SIGTSTP, {sa_handler=0x7f2221882be0, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f2221cd5f20}, NULL, 8) = 0
                  19:43:40.496297 rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
                                                                                                                 19:43:40.496363 rt_sigaction(SIGINT, {sa_handler=0x7f2221882af0, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f2221cd5f20}, NULL, 8) = 0
                                                                19:43:40.496444 rt_sigaction(SIGTERM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
                                                                                                                                                                19:43:40.496510 rt_sigaction(SIGTERM, {sa_handler=0x7f2221882af0, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f2221cd5f20}, NULL, 8) = 0
                                                                                                                19:43:40.496590 rt_sigaction(SIGWINCH, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
         19:43:40.496659 rt_sigaction(SIGWINCH, {sa_handler=0x7f2221882ae0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f2221cd5f20}, NULL, 8) = 0
                                                                                                                                                       19:43:40.496732 ioctl(1, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
                          19:43:40.496797 write(3, "Using: nvidia-installer ncurses "..., 47) = 47
                                                                                                  19:43:40.496863 ioctl(1, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
                                                                                                                                                                             19:43:40.496912 ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig -icanon -echo ...}) = 0
                                                                    19:43:40.496978 ioctl(1, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
                                                                                                                                               19:43:40.497035 write(1, "\33[?1049h\33[22;0;0t\33[1;60r\) = 253[m\33["..., 53
      19:43:40.552583 ioctl(1, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
                                                                                 19:43:40.552619 ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
19:43:40.552681 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
19:43:40.552740 unlink("/tmp/nv-WzWxgw") = 0
19:43:40.552791 write(2, "Received signal ", 16Received signal ) = 16
19:43:40.552837 write(2, "SIGSEGV", 7SIGSEGV)  = 7
19:43:40.552879 write(2, "; aborting.\n", 12; aborting.
) = 12
19:43:40.552939 exit_group(139)         = ?
19:43:40.553072 +++ exited with 139 +++

Looks like some problem with the backup log /var/lib/nvidia/log

How can I check this?

Check if the file exists, its size, its contents using a text editor.

/var/lib/nvidia/log is a directory and there is nothing inside

Hah! I wonder how that happened. That’s supposed to be a file, not a directory.

I see where the crash is happening: get_installed_driver_version_and_descr opens the log file, maps it, and then tries to read the version number out of it. Because you have a directory there, the open calls succeeds but the mmap call fails, returning MAP_FAILED. The installer incorrectly considers that to be a passing value and continues, instead of failing like it should.

I filed internal bug 2913838 to make the installer more robust against this kind of problem. You should be able to get it to stop crashing by removing the bogus /var/lib/nvidia/log directory, although the installer won’t be able to restore your old configuration without a proper log file.