How to unload an NVIDIA kernel module 'nvidia' for new driver installation? - tensorflow

I needed to upgrade my nvidia driver so that I have tried running NVIDIA-LInux-x86_64.run file
However, I was seeing following message
ERROR: An NVIDIA kernel module 'nvidia' appears to already be loaded in your kernel. This may be because it is in use (for example, by an X server, a CUDA program, or the NVIDIA Persistence Daemon), but this may also happen if your kernel was configured without support for module unloading. Please be sure to exit any programs that may be using the GPU(s) before attempting to upgrade your driver. If no GPU-based programs are running, you know that your kernel supports module unloading, and you still receive this message, then an error may have occured that has corrupted an NVIDIA kernel module's usage count, for which the simplest remedy is to reboot your computer.
I have already unloaded nvidia-drm and when I tried to unload nvidia
$ sudo modprobe -r nvidia
modprobe: FATAL: Module nvidia is in use.
Can anyone guide me on installing this new driver without any issue?
Thanks

Use lsof /dev/nvidia* to find the processes that are using the old driver. In my case it was "nvidia-persistenced". Just kill the process by pid and retry the installer NVIDIA-***.run
# lsof /dev/nvidia*
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nvidia-pe 1334 nvidia-persistenced 2u CHR 195,255 0t0 420 /dev/nvidiactl
nvidia-pe 1334 nvidia-persistenced 3u CHR 195,0 0t0 421 /dev/nvidia0
nvidia-pe 1334 nvidia-persistenced 5u CHR 195,0 0t0 421 /dev/nvidia0
nvidia-pe 1334 nvidia-persistenced 6u CHR 195,0 0t0 421 /dev/nvidia0
nvidia-pe 1334 nvidia-persistenced 7u CHR 195,0 0t0 421 /dev/nvidia0

I just removed existing driver and reinstalled

Related

running gem5 with SPEC2006

when running GEM5 X86 in SE mode, I am trying to run bzip2 from SPEC2006, at first it was failing because it says it can't run dynamic execution so I compiled it with -static flag.
now I get this error:
gem5 Simulator System. http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.
gem5 compiled Oct 27 2018 00:36:02
gem5 started Dec 22 2018 18:16:40
gem5 executing on Dan
command line: ./build/X86/gem5.opt configs/example/se.py -c /home/dan/SPEC2006/benchspec/CPU2006/401.bzip2/exe/bzip2_base.ia64-gcc42 -i /home/dan/SPEC2006/benchspec/CPU2006/401.bzip2/data/test/input/dryer.jpg
Could not import 03_BASE_FLAT
Could not import 03_BASE_NARROW
Global frequency set at 1000000000000 ticks per second
warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (4096 Mbytes)
0: system.remote_gdb.listener: listening for remote gdb #0 on port 7000
**** REAL SIMULATION ****
info: Entering event queue # 0. Starting simulation...
panic: Tried to write unmapped address 0xffffedd8. Inst is at 0x400da4
# tick 5500
[invoke:build/X86/arch/x86/faults.cc, line 160]
Memory Usage: 4316736 KBytes
Program aborted at tick 5500
Aborted (core dumped)
I am running gem5 on ubuntu 17.10.
I tried to find solutions in google but I didn't see any one referring to this problem, does anyone know how to fix the problem?
Please check your host machine configuration. Bzip2 does not work in a 32-bit machine. My desktop is dual core have 32-bit X86 architecture, I tried to run bzip2 it had shown same error.

redis-cli unix socket - import rcmd failing

I am using redis server 3.0.6 on ubuntu 16.04 desktop. Installed using
apt-get install redis-server
It was working fine for a long time. Today, when I tried to import a rcmd file using unix socket in redis-cli I am getting out of memory error.
$ sudo redis-cli -s /run/redis/redis.sock < a1.rcmd
Error: Out of memory
a1.rcmd contents:
SET Api:Server:Name "server1"
/etc/redis/redis.conf was confiured with /run/redis/redis.sock. All other configurations are default.
GET, SET commands with unix socket option are working fine.
If I run without unix socket, the redis-cli < a1.rcmd command is working fine.
What causes this error?
Will upgrade to latest version of redis resolve this? I dont see apt-get way to install latest redis version 5.
Any help would be really appreciated.
** EDIT **
Some more inputs and GDB logs.
$ which redis-server
/usr/bin/redis-server
$ sudo service redis-server status
● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2018-12-17 11:29:14 EST; 16min ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Process: 8986 ExecStopPost=/bin/run-parts --verbose /etc/redis/redis-server.post-down.d (code=exited, status=0/SUCCESS)
Process: 8981 ExecStop=/bin/kill -s TERM $MAINPID (code=exited, status=0/SUCCESS)
Process: 8977 ExecStop=/bin/run-parts --verbose /etc/redis/redis-server.pre-down.d (code=exited, status=0/SUCCESS)
Process: 9001 ExecStartPost=/bin/run-parts --verbose /etc/redis/redis-server.post-up.d (code=exited, status=0/SUCCESS)
Process: 8997 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=0/SUCCESS)
Process: 8992 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d (code=exited, status=0/SUCCESS)
Main PID: 9000 (redis-server)
Tasks: 3
Memory: 884.0K
CPU: 304ms
CGroup: /system.slice/redis-server.service
└─9000 /usr/bin/redis-server 127.0.0.1:637
$ sudo gdb /usr/bin/redis-server 9000
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/redis-server...(no debugging symbols found)...done.
Attaching to program: /usr/bin/redis-server, process 9000
[New LWP 9002]
[New LWP 9003]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fe8f5158a13 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
84 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) continue
Continuing.
After this step I ran following command in another terminal:
$ sudo redis-cli -s /run/redis/redis.sock < a1.rcmd
Segmentation fault (core dumped)
(gdb) bt
#0 0x00007fe8f5158a13 in epoll_wait () at ../sysdeps/unix/syscall-template.S:84
#1 0x000055b238abe15f in aeProcessEvents ()
#2 0x000055b238abe58b in aeMain ()
#3 0x000055b238abd204 in main ()
(gdb) info registers
rax 0xfffffffffffffffc -4
rbx 0x7fe8f48e5300 140638512108288
rcx 0x7fe8f5158a13 140638520969747
rdx 0x1060 4192
rsi 0x7fe8f4910000 140638512283648
rdi 0x3 3
rbp 0x7fe8f487b068 0x7fe8f487b068
rsp 0x7ffd9a5ca920 0x7ffd9a5ca920
r8 0x284 644
r9 0x284 644
r10 0x64 100
r11 0x293 659
r12 0x7ffd9a5caae8 140727193217768
r13 0x7fe8f480e1a0 140638511227296
r14 0x7fe8f48101f0 140638511235568
r15 0xfffffffe 4294967294
rip 0x7fe8f5158a13 0x7fe8f5158a13 <epoll_wait+51>
eflags 0x293 [ CF AF SF IF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(gdb)

How to set KVM VM use shadow page table?

I want to measure shadow page table performance vs EPT. I know in kvm code path, EPT and shadow page table share some code path. There is a switch to check if EPT is enabled.
So, I turn off EPT, I think this is a way to use shadow page table in KVM VM.
I exec some commands on host:
# cat /sys/module/kvm_intel/parameters/ept
Y //check if EPT is enabled, Yes it is
# rmmod kvm_intel
# modprobe kvm_intel ept=0,vpid=0 //Re-modprobe kvm_intel, but turn off EPT and VPID
# cat /sys/module/kvm_intel/parameters/ept
N // EPT is disabled
# cat /sys/module/kvm_intel/parameters/vpid
Y //VPID is still enabled
After these commads, I expect the EPT is disabled, However, I create a VM with 4 vcpu, but in VM, I use htop in VM only find i vcpu. I don't know why.
So, I turn on ept again, I can see 4 vcpu in vm using htop. But, on another server, I turn off ept, in VM, I still can find 4 vcpu.
In host, I test qemu thread num:
pstree -p | grep qemu
|-qemu-kvm(20594)-+-{qemu-kvm}(20612)
| |-{qemu-kvm}(20613)
| |-{qemu-kvm}(20614)
| |-{qemu-kvm}(20615)
| |-{qemu-kvm}(20618)
| `-{qemu-kvm}(23429)
There are still muti threads.
In KVM VM, I use lscpu to check:
# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0
Off-line CPU(s) list: 1-3
Thread(s) per core: 1
Core(s) per socket: 1
座: 1
NUMA 节点: 1
厂商 ID: GenuineIntel
CPU 系列: 6
型号: 62
型号名称: Intel(R) Xeon(R) CPU E5-2640 v2 # 2.00GHz
步进: 4
CPU MHz: 1999.999
BogoMIPS: 3999.99
超管理器厂商: KVM
虚拟化类型: 完全
L1d 缓存: 32K
L1i 缓存: 32K
L2 缓存: 4096K
NUMA 节点0 CPU: 0
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm fsgsbase tsc_adjust smep erms xsaveopt
VPID is still enabled cause your command format was incorrect
# modprobe kvm_intel ept=0 vpid=0(Use spaces instead of commas)

Can't compile 64bit redis-server

I'm trying to compile the latest stable (2.8.19) version of Redis. Build is successfull as well as all tests, but unexpectedly server runs on 32bit arch.
Log entries:
# Warning: 32 bit instance detected but no memory limit set. Setting 3 GB maxmemory limit with 'noeviction' policy now.
Redis 2.8.19 (00000000/0) 32 bit
Running in stand alone mode
Port: 6582
PID: 2381
Redis-cli INFO display arch_bits:32. Previous instance (version 2.4.6) works well on arch_bits 64, but I don't know which way it was installed.
OS version info:
root:~# uname -a
Linux localhost 2.6.32-5-amd64 #1 SMP Tue Mar 8 22:49:26 UTC 2011 x86_64 GNU/Linux
root:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 6.0.1 (squeeze)
Release: 6.0.1
Codename: squeeze
root:~# arch
x86_64
What are the ways to fix this issue and run latest redis as 64bit?
UPD
Despite above commands output, dpkg --print-architecture returns i386 and all packages in system are all or i386. Only redis-server 2.4.*, installed as a package, is strangely ia64.
What can I do in this situation? The server was setup long time ago by another person, and I is still too newbie in Unix.
It seems, my server needs a full migration from 32 to 64-bit architeture.
Current task solved by downloading compiled 64-bit DEB-package and installing it manually.

TI OMAPL137 U-Boot Error: "No ethernet found."

I am trying to boot a DA830 REV A board that was shipped to me with U-Boot loaded without Linux. I was able to build DaVinci Linux and a root file system, and now I want to load Linux using tftp. I booted the board but am getting an error that "No ethernet was found.". Following is what the board starts up with:
SF: Detected W25Q32 with page size 4 KiB, total 4 MiB
In: serial
Out: serial
Err: serial
Net: Read from EEPROM # 0x50 failed
Board Net Initialization Failed
No ethernet found.
U-Boot >
I found one forum that suggested that the ethernet address was not set, and I checked with:
U-Boot > env print ethaddr
ethaddr=FF:FF:FF:FF:FF:FF
And indeed it is not set. I attempted set it with the following and got an error:
U-Boot > setenv ethaddr 01:02:03:04:05:06
Can't overwrite "ethaddr"
I also attempted to set it with the following, but it still does not set:
U-Boot > env set -f ethaddr 01:02:03:04:05:06
U-Boot > env print ethaddr
ethaddr=FF:FF:FF:FF:FF:FF
I don't know what to try next. Maybe my switches aren't configured properly??