It's been some time since I have been working on the OpenAnimator project, but recently I observed a strange memory leak. After drilling down into a lot of the javascript, I found the problem with a snippet of code that was something like this:
a = function() {
try {
setTimeout('a()',1);
}catch(e) { error(e); }
};
a();
At first look this looks like a fairly, okay bit of code, and not any variables were being created except the setTimeout call. After a lot of google hunting here is what I have now:
a = function() {
try {
setTimeout(function() {a();},1);
}catch(e) { error(e); }
}
a();
Apparently this solved the problem (atleast it appears so now). I am still not able to figure out why there was a problem with the earlier code. the 'a()' is causing a implicit eval to be executed, but how that leads to memory leaks is still unknown to me. I hope I'll get this one someday.
Saturday, July 16, 2011
Monday, July 11, 2011
OIM - Find resources assigned to user
Wanna dig through OIM (Oracle Identity Manager) for resources assigned to users? Here is a query to solve it:
SELECT DISTINCT oiu.oiu_key,
oiu.req_key,
oiu.oiu_offlined_date,
obi.obi_key,
obi.obi_status, obj.obj_key,
obj.obj_name,
orc.orc_key,
orc.orc_create,
orc.orc_update,
orc.orc_status, orc.orc_tos_instance_key,
ORC_TASKS_ARCHIVED,
ost_status,
obj.sdk_key AS OBJECTFORMKEY, '0' AS OBJECTFORMCOUNT,
objsdk.sdk_name AS OBJECTFORMNAME, tos.sdk_key AS PROCESSFORMKEY,
'0' AS PROCESSFORMCOUNT, procsdk.sdk_name AS PROCESSFORMNAME,
oiu.oiu_serviceaccount
FROM obj obj
LEFT OUTER JOIN sdk objsdk
ON obj.sdk_key=objsdk.sdk_key, oiu oiu
LEFT OUTER JOIN orc orc
ON oiu.orc_key=orc.orc_key
LEFT OUTER JOIN tos tos
ON orc.tos_key=tos.tos_key
LEFT OUTER JOIN sdk procsdk
ON tos.sdk_key=procsdk.sdk_key, obi obi, ost ost
WHERE oiu.obi_key=obi.obi_key
AND oiu.ost_key =ost.ost_key
AND obi.obj_key =obj.obj_key
AND oiu.usr_key IN (
select usr_key from usr where usr_status = 'Active'
)
This query will show you the same result as getObjects API call for all active OIM users.
SELECT DISTINCT oiu.oiu_key,
oiu.req_key,
oiu.oiu_offlined_date,
obi.obi_key,
obi.obi_status, obj.obj_key,
obj.obj_name,
orc.orc_key,
orc.orc_create,
orc.orc_update,
orc.orc_status, orc.orc_tos_instance_key,
ORC_TASKS_ARCHIVED,
ost_status,
obj.sdk_key AS OBJECTFORMKEY, '0' AS OBJECTFORMCOUNT,
objsdk.sdk_name AS OBJECTFORMNAME, tos.sdk_key AS PROCESSFORMKEY,
'0' AS PROCESSFORMCOUNT, procsdk.sdk_name AS PROCESSFORMNAME,
oiu.oiu_serviceaccount
FROM obj obj
LEFT OUTER JOIN sdk objsdk
ON obj.sdk_key=objsdk.sdk_key, oiu oiu
LEFT OUTER JOIN orc orc
ON oiu.orc_key=orc.orc_key
LEFT OUTER JOIN tos tos
ON orc.tos_key=tos.tos_key
LEFT OUTER JOIN sdk procsdk
ON tos.sdk_key=procsdk.sdk_key, obi obi, ost ost
WHERE oiu.obi_key=obi.obi_key
AND oiu.ost_key =ost.ost_key
AND obi.obj_key =obj.obj_key
AND oiu.usr_key IN (
select usr_key from usr where usr_status = 'Active'
)
This query will show you the same result as getObjects API call for all active OIM users.
Sunday, May 15, 2011
Intel VT-d and Xen
Joanna's team posted an interesting vulnerability on their blog, related to use of Intel VT-d in Xen. Although the root cause is at the hardware layer, I hope there are patches for it soon. Here the full research http://www.invisiblethingslab.com/resources/2011/Software%20Attacks%20on%20Intel%20VT-d.pdf
Friday, April 22, 2011
DNS configuration for your server
If you want to configure your own DNS server here is a good guide:
http://ubuntuforums.org/showthread.php?t=236093
http://ubuntuforums.org/showthread.php?t=236093
CouchDB v1.0.2.on Ubuntu 10.10
1. Get Spidermonkey from (http://ftp.mozilla.org/pub/mozilla.org/js/js-1.8.0-rc1.tar.gz)
2. Compile and setup Spidermonkey
6. Run couchdb
2. Compile and setup Spidermonkey
cd js/src
make BUILD_OPT=1 -f Makefile.ref
make BUILD_OPT=1 JS_DIST=/opt/app/spidermonkey180rc1 -f Makefile.ref export
3. Install the packages from ubuntu archives
apt-get install build-essential erlang libicu-dev libcurl4-openssl-dev
4. Compile CouchDB
./configure --prefix=/install/couchdb --with-js-lib=/opt/app/spidermonkey180rc1/lib64 --with-js-include=/opt/app/spidermonkey180rc1/include
make
make install
make
make install
5. Start CouchDB
/install/couchdb/etc/init.d/couchdb start
Note: If you don't want to run the couchdb server as user couchdb then change the config file located at /install/couchdb/etc/default/couchdb. Edit the COUCHDB_USER field and specify the user it should run with.
If you want to change the port on which FUTON/CouchDB's web UI runs then edit the file /install/couchdb/etc/couchdb/default.ini. Set the port value under [httpd] to the new value that you want.
6. Run couchdb
/install/couchdb/etc/init.d/couchdb start
Saturday, January 29, 2011
Monday, October 18, 2010
My Etymonline.com Firefox addon
Here is a small addon that I created for Firefox. https://addons.mozilla.org/en-US/firefox/addon/242705
Pretty handy if you like to know the root of words
Pretty handy if you like to know the root of words
Subscribe to:
Posts (Atom)