Last day I took a task to fix a network issue about Oracle 12c on Windows.
At the beginning, I though it was a misconfiguration issue, and could be fixed within one hour, or in some special situations, maybe need at most half day. But finally I knew the estimation was totally wrong.
First of all, the issue was really strange! When I ran ‘lsnrctl status/stop/start’ t to control the listener, the command would always hang. I guessed maybe some configurations were not correct, and I did found some issues and fixed them, but this problem still existed. I enabled the trace of listener but got nothing, and more strange was that when I run ‘lsnrctl’ in interactive mode, then every commands, like start, stop or status, worked really well, except the command ‘exit’, and I did not tests: run ‘lsnrctl’ to enter interactive mode, then input ‘exit’ directly to quit it, and it would hang forever.
So this issue was not related with listener, but the command lsnrctl itself. I checked the system logs to find some clues, and found many ‘exectask’ issues, and these issues were caused by CVU command. So I googled the key words ‘exectask hang oracle’, and get this post:
The phenomena is exact the same! In fact the subcommands (start, stop or status) have been finished successfully, then the command ‘lsnrctl’ will hang and never return to the command line.
So it seems that the Perl delivered by Oracle has compatibility issue with the newer Intel CPUs. My laptop is T420s, so I cannot duplicate this issue on my VirtualBox VM.
I believe Oracle should provide a patch for this issue, but currently I cannot find it, so I list all the mentioned workarounds below:
For VirtualBox 5 VM:
VBoxManage setextradata VM_NAME "VBoxInternal/CPUM/HostCPUID/Cache/Leaf" "0x4"
VBoxManage setextradata VM_NAME "VBoxInternal/CPUM/HostCPUID/Cache/SubLeaf" "0x4"
VBoxManage setextradata VM_NAME "VBoxInternal/CPUM/HostCPUID/Cache/eax" "0"
VBoxManage setextradata VM_NAME "VBoxInternal/CPUM/HostCPUID/Cache/ebx" "0"
VBoxManage setextradata VM_NAME "VBoxInternal/CPUM/HostCPUID/Cache/ecx" "0"
VBoxManage setextradata VM_NAME "VBoxInternal/CPUM/HostCPUID/Cache/edx" "0"
VBoxManage setextradata VM_NAME "VBoxInternal/CPUM/HostCPUID/Cache/SubLeafMask" "0xffffffff"
Please note this maybe not work on the latest version, so another way is to downgrade to VirtualBox 4.
For VMWare VM need to add below lines to mvx file:
monitor_control.enable_fullcpuid = TRUE
cpuid.4.4.eax = "0000:0000:0000:0000:0000:0000:0000:0000"
For all Linux guests:
rm -rf perl
curl -O http://www.cpan.org/src/5.0/perl-5.14.1.tar.gz
tar -xvzf perl-5.14.1.tar.gz
mv perl/ perl.OLD
./Configure -des -Dprefix=$ORACLE_HOME/perl -Doptimize=-O3 -Dusethreads -Duseithreads -Duserelocatableinc ; make clean ; make ; make install
rm -rf lib/ man/
cp -r ../perl.OLD/lib/ .
cp -r ../perl.OLD/man/ .
cp ../perl.OLD/bin/dbilogstrip bin/
cp ../perl.OLD/bin/dbiprof bin/
cp ../perl.OLD/bin/dbiproxy bin/
cp ../perl.OLD/bin/ora_explain bin/
While I cannot find a temporary solution to replace the Perl of Oracle on Windows platforms, and I also have no such hardware to test it.
Thanks for all the guys who found this issue and provided the workarounds, and list all the web pages I had read: