Skip to content

Instantly share code, notes, and snippets.

@TomasKulhanek
Last active October 10, 2016 12:30
Show Gist options
  • Save TomasKulhanek/a50711fdc7d38ef0afba60a3c7aa1c9e to your computer and use it in GitHub Desktop.
Save TomasKulhanek/a50711fdc7d38ef0afba60a3c7aa1c9e to your computer and use it in GitHub Desktop.
Virtuoso unstoppable zombie process on kernel 4.1.x

This is configuration to reproduce unstoppable zombie process in kernel 4 booted from CernVM 3 and CernVM 4. During virtuoso compilation, the server is started and then stopped, however virtuoso server process remains with high cpu utilization, after vm restart, all is ok and virtuoso is installed OK. Seems to be caused by kernel as in older kernel versions the installation went smooth.

Prerequisites:

To reproduce:

  
  download this gist and unzip it into "virtuosoissue" directory
  
  cd virtuosoissue
  
  vagrant up

Possible workaround: Similar issue reported at moby/moby#19166 and a workaround suggest to downgrade kernel to 4.2.0-18 or older.

#!/usr/bin/env bash
# this script downloads/compiles/installs virtuoso tool into /opt/virtuoso
yum -y install net-tools wget unzip autoconf automake libtool flex bison gperf gawk m4 make openssl-devel readline-devel
#yum -y install gperf
wget https://codeload.github.com/openlink/virtuoso-opensource/zip/develop/7 -nv -O virtuoso.zip
#curl -o virtuoso.zip https://codeload.github.com/openlink/virtuoso-opensource/zip/master
unzip -q virtuoso.zip
CFLAGS="-m64 -w"
export CFLAGS
export VIRTUOSOPATH='/opt/virtuoso'
export VIRTUOSOBUILD='virtuoso-opensource-develop-7'
cd $VIRTUOSOBUILD
./autogen.sh
# add sparql endpoint
# maybe also http://opldownload.s3.amazonaws.com/uda/vad-packages/7.2/isparql_dav.vad
# and http://opldownload.s3.amazonaws.com/uda/vad-packages/7.2/fct_dav.vad
# and http://opldownload.s3.amazonaws.com/uda/vad-packages/7.2/pivot_dav.vad
# for options, see ./configure --help
# --program-transform-name="s/isql/isql-vt/" \
./configure \
--enable-silent-rules \
--program-transform-name="s/isql/isql-vt/" \
--with-readline \
--prefix=$VIRTUOSOPATH \
--disable-bpel-vad \
--enable-conductor-vad \
--disable-dbpedia-vad \
--disable-demo-vad \
--disable-fct-vad \
--enable-isparql-vad \
--disable-ods-vad \
--disable-rdfmappers-vad \
--disable-rdb2rdf-vad \
--disable-sparqldemo-vad \
--disable-syncml-vad \
--disable-tutorial-vad
make
make install prefix=$VIRTUOSOPATH
#cd ..
#rm -rf $VIRTUOSOBUILD
#rm virtuoso.zip
nohup /opt/virtuoso/bin/virtuoso-t -f -c /vagrant/virtuoso.ini > /home/vagrant/virtuoso.log 2>&1 &
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "cernvm/3-prod"
config.vm.network "forwarded_port", guest: 8890, host: 8890
# config.ssh.username = "vagrant"
# config.ssh.password = "vagrant"
if Vagrant.has_plugin?("vagrant-proxyconf")
if ENV["http_proxy"]
config.proxy.http = ENV["http_proxy"]
end
if ENV["https_proxy"]
config.proxy.https = ENV["https_proxy"]
end
if ENV["no_proxy"]
config.proxy.no_proxy = ENV["no_proxy"]
end
end
config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
vb.gui = true
#
# # Customize the amount of memory on the VM:
vb.memory = "2048"
vb.cpus = "2"
vb.customize ["modifyvm", :id, "--vram", "16"]
end
config.vm.synced_folder ".", "/vagrant"
config.vm.boot_timeout = 1200
config.vm.network "private_network", type: "dhcp", auto_config: false
config.vm.provision "shell", path: "bootstrap.sh"
end
;
; virtuoso.ini
;
; Configuration file for the OpenLink Virtuoso VDBMS Server
;
; To learn more about this product, or any other product in our
; portfolio, please check out our web site at:
;
; http://virtuoso.openlinksw.com/
;
; or contact us at:
;
; [email protected]
;
; If you have any technical questions, please contact our support
; staff at:
;
; [email protected]
;
;
; Database setup
;
[Database]
DatabaseFile = /opt/virtuoso/var/lib/virtuoso/db/virtuoso.db
ErrorLogFile = /opt/virtuoso/var/lib/virtuoso/db/virtuoso.log
LockFile = /opt/virtuoso/var/lib/virtuoso/db/virtuoso.lck
TransactionFile = /opt/virtuoso/var/lib/virtuoso/db/virtuoso.trx
xa_persistent_file = /opt/virtuoso/var/lib/virtuoso/db/virtuoso.pxa
ErrorLogLevel = 7
FileExtend = 200
MaxCheckpointRemap = 2000
Striping = 0
TempStorage = TempDatabase
[TempDatabase]
DatabaseFile = /opt/virtuoso/var/lib/virtuoso/db/virtuoso-temp.db
TransactionFile = /opt/virtuoso/var/lib/virtuoso/db/virtuoso-temp.trx
MaxCheckpointRemap = 2000
Striping = 0
;
; Server parameters
;
[Parameters]
ServerPort = 1111
LiteMode = 0
DisableUnixSocket = 1
DisableTcpSocket = 0
;SSLServerPort = 2111
;SSLCertificate = cert.pem
;SSLPrivateKey = pk.pem
;X509ClientVerify = 0
;X509ClientVerifyDepth = 0
;X509ClientVerifyCAFile = ca.pem
ServerThreads = 20
CheckpointInterval = 60
O_DIRECT = 0
CaseMode = 2
MaxStaticCursorRows = 5000
CheckpointAuditTrail = 0
AllowOSCalls = 0
SchedulerInterval = 10
DirsAllowed = ., /opt/virtuoso/share/virtuoso/vad
ThreadCleanupInterval = 0
ThreadThreshold = 10
ResourcesCleanupInterval = 0
FreeTextBatchSize = 100000
SingleCPU = 0
VADInstallDir = /opt/virtuoso/share/virtuoso/vad/
PrefixResultNames = 0
RdfFreeTextRulesSize = 100
IndexTreeMaps = 256
MaxMemPoolSize = 200000000
PrefixResultNames = 0
MacSpotlight = 0
IndexTreeMaps = 64
;;
;; When running with large data sets, one should configure the Virtuoso
;; process to use between 2/3 to 3/5 of free system memory and to stripe
;; storage on all available disks.
;;
;; Uncomment next two lines if there is 2 GB system memory free
;NumberOfBuffers = 170000
;MaxDirtyBuffers = 130000
;; Uncomment next two lines if there is 4 GB system memory free
;NumberOfBuffers = 340000
; MaxDirtyBuffers = 250000
;; Uncomment next two lines if there is 8 GB system memory free
;NumberOfBuffers = 680000
;MaxDirtyBuffers = 500000
;; Uncomment next two lines if there is 16 GB system memory free
;NumberOfBuffers = 1360000
;MaxDirtyBuffers = 1000000
;; Uncomment next two lines if there is 32 GB system memory free
;NumberOfBuffers = 2720000
;MaxDirtyBuffers = 2000000
;; Uncomment next two lines if there is 48 GB system memory free
;NumberOfBuffers = 4000000
;MaxDirtyBuffers = 3000000
;; Uncomment next two lines if there is 64 GB system memory free
;NumberOfBuffers = 5450000
;MaxDirtyBuffers = 4000000
;;
;; Note the default settings will take very little memory
;; but will not result in very good performance
;;
NumberOfBuffers = 10000
MaxDirtyBuffers = 6000
[HTTPServer]
ServerPort = 8890
ServerRoot = /opt/virtuoso/var/lib/virtuoso/vsp
ServerThreads = 20
DavRoot = DAV
EnabledDavVSP = 0
HTTPProxyEnabled = 0
TempASPXDir = 0
DefaultMailServer = localhost:25
ServerThreads = 10
MaxKeepAlives = 10
KeepAliveTimeout = 10
MaxCachedProxyConnections = 10
ProxyConnectionCacheTimeout = 15
HTTPThreadSize = 280000
HttpPrintWarningsInOutput = 0
Charset = UTF-8
;HTTPLogFile = logs/http.log
[AutoRepair]
BadParentLinks = 0
[Client]
SQL_PREFETCH_ROWS = 100
SQL_PREFETCH_BYTES = 16000
SQL_QUERY_TIMEOUT = 0
SQL_TXN_TIMEOUT = 0
;SQL_NO_CHAR_C_ESCAPE = 1
;SQL_UTF8_EXECS = 0
;SQL_NO_SYSTEM_TABLES = 0
;SQL_BINARY_TIMESTAMP = 1
;SQL_ENCRYPTION_ON_PASSWORD = -1
[VDB]
ArrayOptimization = 0
NumArrayParameters = 10
VDBDisconnectTimeout = 1000
KeepConnectionOnFixedThread = 0
[Replication]
ServerName = db-LOCALHOST
ServerEnable = 1
QueueMax = 50000
;
; Striping setup
;
; These parameters have only effect when Striping is set to 1 in the
; [Database] section, in which case the DatabaseFile parameter is ignored.
;
; With striping, the database is spawned across multiple segments
; where each segment can have multiple stripes.
;
; Format of the lines below:
; Segment<number> = <size>, <stripe file name> [, <stripe file name> .. ]
;
; <number> must be ordered from 1 up.
;
; The <size> is the total size of the segment which is equally divided
; across all stripes forming the segment. Its specification can be in
; gigabytes (g), megabytes (m), kilobytes (k) or in database blocks
; (b, the default)
;
; Note that the segment size must be a multiple of the database page size
; which is currently 8k. Also, the segment size must be divisible by the
; number of stripe files forming the segment.
;
; The example below creates a 200 meg database striped on two segments
; with two stripes of 50 meg and one of 100 meg.
;
; You can always add more segments to the configuration, but once
; added, do not change the setup.
;
[Striping]
Segment1 = 100M, db-seg1-1.db, db-seg1-2.db
Segment2 = 100M, db-seg2-1.db
;...
;[TempStriping]
;Segment1 = 100M, db-seg1-1.db, db-seg1-2.db
;Segment2 = 100M, db-seg2-1.db
;...
;[Ucms]
;UcmPath = <path>
;Ucm1 = <file>
;Ucm2 = <file>
;...
[Zero Config]
ServerName = virtuoso (LOCALHOST)
;ServerDSN = ZDSN
;SSLServerName =
;SSLServerDSN =
[Mono]
;MONO_TRACE = Off
;MONO_PATH = <path_here>
;MONO_ROOT = <path_here>
;MONO_CFG_DIR = <path_here>
;virtclr.dll =
[URIQA]
DynamicLocal = 0
DefaultHost = localhost:8890
[SPARQL]
;ExternalQuerySource = 1
;ExternalXsltSource = 1
;DefaultGraph = http://localhost:8890/dataspace
;ImmutableGraphs = http://localhost:8890/dataspace
ResultSetMaxRows = 10000
MaxQueryCostEstimationTime = 400 ; in seconds
MaxQueryExecutionTime = 60 ; in seconds
DefaultQuery = select distinct ?Concept where {[] a ?Concept} LIMIT 100
DeferInferenceRulesInit = 0 ; controls inference rules loading
;PingService = http://rpc.pingthesemanticweb.com/
[Plugins]
LoadPath = /opt/virtuoso/lib/virtuoso/hosting
Load1 = plain, wikiv
Load2 = plain, mediawiki
Load3 = plain, creolewiki
;Load4 = plain, im
;Load5 = plain, wbxml2
;Load6 = plain, hslookup
;Load7 = attach, libphp5.so
;Load8 = Hosting, hosting_php.so
;Load9 = Hosting,hosting_perl.so
;Load10 = Hosting,hosting_python.so
;Load11 = Hosting,hosting_ruby.so
;Load12 = msdtc,msdtc_sample
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment