# Logging that it is about to install /etc/OpenCL/vendors/nvidia.icd
write(1, "\33[34;16H\33[37m\33[44metc/OpenCL/vendors/nvidia.icd\n\33(B\33[0;7m\33[32m\33[40m \33[35;88H\33(B\33[0m\33[32m\33[40m5%\33(B\33[m\33[39;49m\33[37m\33[40m", 119) = 119
rt_sigaction(SIGTSTP, {0x7fc16c203bf0, [], SA_RESTORER|SA_RESTART, 0x7fc16c64e420}, NULL, 8) = 0
# stat()'ing directory structure in case the installer will have to create a directory (which it does not)
stat("/etc", {st_dev=makedev(0, 22), st_ino=1, st_mode=S_IFDIR|0755, st_nlink=52, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=4096, st_atime=2014/05/14-18:19:24, st_mtime=2014/05/14-18:20:02, st_ctime=2014/05/14-18:20:02}) = 0
stat("/etc/OpenCL", {st_dev=makedev(0, 22), st_ino=14, st_mode=S_IFDIR|0700, st_nlink=3, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=4096, st_atime=2014/05/14-18:20:02, st_mtime=2014/05/14-18:20:02, st_ctime=2014/05/14-18:20:02}) = 0
stat("/etc/OpenCL/vendors", {st_dev=makedev(0, 22), st_ino=21, st_mode=S_IFDIR|0700, st_nlink=2, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=4096, st_atime=2014/05/14-18:20:02, st_mtime=2014/05/14-18:21:13, st_ctime=2014/05/14-18:21:13}) = 0
# Here it opens the file to copy with fid=5
open("nvidia.icd", O_RDONLY) = 5
# Here it opens the file location to put the new file. Note O_CREAT is used in case the file does not exist. Note that this is in "/etc" on which is mounted bru.
open("/etc/OpenCL/vendors/nvidia.icd", O_RDWR|O_CREAT|O_TRUNC, 0444) = 6
# Here it gets the size of the nvidia.icd file to copy. It does this in order to set the trailing NULL for the null-terminated string for the output file.
fstat(5, {st_dev=makedev(8, 17), st_ino=6275211, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=22, st_atime=2014/05/14-18:20:25, st_mtime=2013/08/27-04:11:08, st_ctime=2014/05/14-18:20:28}) = 0
# Here it seeks to the relevant location based on the fstat() above to place the NULL
lseek(6, 21, SEEK_SET) = 21
# Write the NULL in place
write(6, "\0", 1) = 1
# Here it mmap()'s the input file
mmap(NULL, 22, PROT_READ, MAP_SHARED, 5, 0) = 0x7fc16cde2000
# Here it mmap()'s the output file, in the /etc directory in bru. Which results in the SIGBUS below.
mmap(NULL, 22, PROT_READ|PROT_WRITE, MAP_SHARED, 6, 0) = 0x7fc16cde1000
--- SIGBUS (Bus error) @ 0 (0) ---
rt_sigaction(SIGTSTP, {SIG_IGN, [], SA_RESTORER|SA_RESTART, 0x7fc16c64e420}, {0x7fc16c203bf0, [], SA_RESTORER|SA_RESTART, 0x7fc16c64e420}, 8) = 0
write(1, "\33[39;49m\33[37m\33[40m\33[H\33[2J", 25) = 25
rt_sigaction(SIGTSTP, {0x7fc16c203bf0, [], SA_RESTORER|SA_RESTART, 0x7fc16c64e420}, NULL, 8) = 0
write(1, "\33[39;49m\33[98d\33[K\33[98;1H\33[?12l\33[?25h", 35) = 35
write(1, "\33[?1049l\r\33[?1l\33>", 16) = 16
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x4000, c_oflags=0x1, c_cflags=0xbf, c_lflags=0x8a31, c_line=0, c_cc[VMIN]=1, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(1, SNDCTL_TMR_STOP or TCSETSW, {c_iflags=0x4100, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {c_iflags=0x4100, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
unlink("/tmp/nv-JbD2dG") = 0
write(2, "Received signal ", 16) = 16
write(2, "SIGBUS", 6) = 6
write(2, "; aborting.\n", 12) = 12
exit_group(135) = ?
Here's the same section of the strace output with bru unmounted (where it completes successfully)
25005 18:48:34 write(1, "\33[3G\33[37m\33[44mBacking up: /etc/OpenCL/vendors/nvidia.icd\n\33[3G\33(B\33[0;7m\33[32m\33[40m \33[13;80H\33(B\33[0m\33[32m\33[40m1%\33(B\33[m\33[39;49m\33[37m\33[40m", 133) = 133
25005 18:48:34 rt_sigaction(SIGTSTP, {0x7fc39c56dbf0, [], SA_RESTORER|SA_RESTART, 0x7fc39c9b8420}, NULL, 8) = 0
25005 18:48:34 open("/var/lib/nvidia/log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 5
25005 18:48:34 fstat(5, {st_dev=makedev(8, 17), st_ino=3515544, st_mode=S_IFREG|0600, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=71, st_atime=2014/05/14-18:48:34, st_mtime=2014/05/14-18:48:34, st_ctime=2014/05/14-18:48:34}) = 0
25005 18:48:34 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc39d14c000
25005 18:48:34 fstat(5, {st_dev=makedev(8, 17), st_ino=3515544, st_mode=S_IFREG|0600, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=71, st_atime=2014/05/14-18:48:34, st_mtime=2014/05/14-18:48:34, st_ctime=2014/05/14-18:48:34}) = 0
25005 18:48:34 lseek(5, 71, SEEK_SET) = 71
25005 18:48:34 lstat("/etc/OpenCL/vendors/nvidia.icd", {st_dev=makedev(8, 17), st_ino=3515567, st_mode=S_IFREG|0400, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=22, st_atime=2014/05/14-18:48:26, st_mtime=2014/05/14-18:20:02, st_ctime=2014/05/14-18:48:26}) = 0
25005 18:48:34 open("/etc/OpenCL/vendors/nvidia.icd", O_RDONLY) = 6
25005 18:48:34 fstat(6, {st_dev=makedev(8, 17), st_ino=3515567, st_mode=S_IFREG|0400, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=22, st_atime=2014/05/14-18:48:26, st_mtime=2014/05/14-18:20:02, st_ctime=2014/05/14-18:48:26}) = 0
25005 18:48:34 mmap(NULL, 22, PROT_READ, MAP_SHARED, 6, 0) = 0x7fc39d14b000
25005 18:48:34 munmap(0x7fc39d14b000, 22) = 0
25005 18:48:34 close(6) = 0
25005 18:48:34 stat("/etc/OpenCL/vendors/nvidia.icd", {st_dev=makedev(8, 17), st_ino=3515567, st_mode=S_IFREG|0400, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=22, st_atime=2014/05/14-18:48:34, st_mtime=2014/05/14-18:20:02, st_ctime=2014/05/14-18:48:26}) = 0
25005 18:48:34 open("/etc/OpenCL/vendors/nvidia.icd", O_RDONLY) = 6
25005 18:48:34 open("/var/lib/nvidia/100", O_RDWR|O_CREAT|O_TRUNC, 0100400) = 7
25005 18:48:34 fstat(6, {st_dev=makedev(8, 17), st_ino=3515567, st_mode=S_IFREG|0400, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=22, st_atime=2014/05/14-18:48:34, st_mtime=2014/05/14-18:20:02, st_ctime=2014/05/14-18:48:26}) = 0
25005 18:48:34 lseek(7, 21, SEEK_SET) = 21
25005 18:48:34 write(7, "\0", 1) = 1
25005 18:48:34 mmap(NULL, 22, PROT_READ, MAP_SHARED, 6, 0) = 0x7fc39d14b000
25005 18:48:34 mmap(NULL, 22, PROT_READ|PROT_WRITE, MAP_SHARED, 7, 0) = 0x7fc39d147000
25005 18:48:34 munmap(0x7fc39d14b000, 22) = 0
25005 18:48:34 munmap(0x7fc39d147000, 22) = 0
25005 18:48:34 fchmod(7, 0100400) = 0
25005 18:48:34 close(6) = 0
25005 18:48:34 close(7) = 0
25005 18:48:34 utime("/var/lib/nvidia/100", [2014/05/14-18:48:34, 2014/05/14-18:20:02]) = 0
25005 18:48:34 unlink("/etc/OpenCL/vendors/nvidia.icd") = 0
25005 18:48:34 write(5, "100: /etc/OpenCL/vendors/nvidia.icd\n4168248298 100400 0 0\n", 58) = 58
25005 18:48:34 close(5) = 0
25005 18:48:34 munmap(0x7fc39d14c000, 4096) = 0
There are work-arounds - the current documentation for installing proprietary Nvidia drivers has some hints - but they're all ugly. It'd be much easier if end users can just run sh NVIDIA-.... --no-kernel-module --no-x-check
to install the drivers in a new client. Plus, whatever is causing this could pop up elsewhere.
To ease debugging, it may be useful to see if this can be repeated with a smaller/simpler program that repeats the relevant system calls rather than use the entire Nvidia driver installer.