Friday, March 20, 2009

Irritating bugs in Google Chrome

Its been a while since I blogged, didnt get enough motivation to write on a particular topic. But using Google chrome on a daily basis and facing large number of bugs motivated me enough to write this topic.

Heres a list. (Will write this as a non technical user)

1. Google chrome claims tabs donot share information By keeping each tab in an isolated "sandbox" .. then how come if I sign in to gmail in a incognito tab, I am able to again access my gmail from another incognito window?? .. :0

2. Assume you have a normal window and an incognito window open with many tabs. Now change your DNS IP to some IP which is not a DNS server (or one which doesnot exist) .. now browse any site in the incognito window .. you will recieve an error "This webpage is not available" now change back your DNS server to the original one and try to browse from the incognito window .. You can't .. it will give you the same error. Now try browsing using the normal window, you will be able to. Now try browsing by opening a new incognito window, still you cant !! .. remember just a while ago we heard By keeping each tab in an isolated "sandbox" ... Good Job!!

3. In Orkut I could not post comments on friends profile using google chrome .. imagine this is after seeing this once you sign in to orkut ..

Awesome, you're using Google Chrome! Don't forget to feed it donuts!

4. Try typing in a multiline text box (you will find these generally in forums) now in between the content press backspace .. you will be amused .. it gobbles/jumbles up the text and you have to press the right arrow multiple times .. this is basic, even this has not been tested .. Very very good job!!

All these bugs were found in Google chrome 1.0.154.48
Moral of the story: It's opensource, you fix it!!!

Sunday, June 24, 2007

Linux Memory Blues

You might have often noticed that the memory utilization of your linux box
is full and you get irritated and tempted to reboot the system. 'top' and 'ps'
comes of no help and u seen no process eating up the memory. The result is
you spend hours cursing the developer for not testing the memory leaks when
actually there is none.

Linux kernel doesn't like to waste RAM and it caches disk I/O onto the
cache.. leading to a much theoretical efficiency.

hmm the efficiency can very well be proved.. for eg:
type this command..

for i in 1 2; do free -o; time grep -r foo /usr/bin >/dev/null
2>/dev/null; done

what the command does is that it searches for "foo" in/usr/bin directory
resulting in a heavy Disk I/O utilization. Now lets check the output..

total used free shared buffers cached
Mem: 1019400 255496 763904 0 15852 131700
Swap: 1044184 0 1044184

real 2m2.018s
user 0m20.930s
sys 0m8.110s
total used free shared buffers cached
Mem: 1019400 476712 542688 0 19292 326480
Swap: 1044184 0 1044184

real 0m23.644s
user 0m21.000s
sys 0m0.560s

What does this output signifies?
Look at the first iteration .. you can see that the system has 1GB RAM of
which 763MB is free and 131MB is used by the cache, before the grep
command. The grep command executes and not surprisingly it took a little
more that 2 mins to execute .. quite a good job, considering the amount of
Disk I/O it had to do.
Now look at the second iteration .. you may now have noticed the increase in
the cached memory .. about 200 MB rise in cached memory and 200MB decrease
in free memory. Now look at the output time of the grep command.. WOW only
23 Secs!! thats quite a lot of reduction .. thats wonderful .. kudos to
the developer :) .. it seems to be the right way to go about it..

But wait... is it the right time to rejoice?? .. hmm will there be any
problems with this ?? after all I am facing memory issues from the past
few months even after increasing my RAM. Now what may be the cause? If
cached mem is a boon then why my machine slows down dramatically? May be the
caching is causing thrashing in my machine.. ok lets not get into
conclusions .. a quick glance through internet revealed to me

"When an application needs memory and all the RAM is fully occupied, the
kernel has two ways to free some memory at its disposal: it can either
reduce the disk cache in the RAM by eliminating the oldest data or it may
swap some less used portions (pages) of programs out to the swap partition
on disk. It is not easy to predict which method would be more efficient.
The kernel makes a choice by roughly guessing the effectiveness of the two
methods at a given instant, based on the recent history of activity."

"Based on the recent history of acitivity"?? thats seems to be pretty
unclear and irrelevant .. worst cases cannot be predicted..

Ok lets check what happens when I use up the entire cache memory available
.. ie I am gonna use my entire RAM,leaving no free space. Lets scan a huge
file. Scanning a 4.4 GB file in my machine ate up the entire RAM within no
time..

total used free shared buffers cached
Mem: 995 986 8 0 23 831
-/+ buffers/cache: 132 863
Swap: 1019 2 1017

vmstat 1 2
procs memory swap io system
cpu
r b swpd free buff cache si so bi bo in cs us sy
wa id
4 1 2232 8844 23780 850824 0 1 796 29 274 631 11 7
15 66
1 1 2232 8528 23784 851120 0 0 1076 0 249 342 7 5
20 68

Looks good as still the system isnt swapping.. But the performance has
degraded drastically as i am unable to move my mouse freely :)

Now what may be the reason .. is it that the system is swapping in & out
of the cached memory, keeping the processor busy? Lets check our first
example now that the cache is heavily used..

for i in 1 2; do free -o; time grep -r foo /usr/bin >/dev/null
2>/dev/null; done
total used free shared buffers cached
Mem: 1019400 1010088 9312 0 24136 850864
Swap: 1044184 2232 1041952

real 3m2.794s
user 0m23.110s
sys 0m12.930s
total used free shared buffers cached
Mem: 1019400 1008400 11000 0 24516 849568
Swap: 1044184 3464 1040720

real 2m52.996s
user 0m21.980s
sys 0m8.860s

hmm not much of a difference in the 2 iterations.. but the significant
thing is the increase in the system time. This time indicates the
processor time used up by the processor in handling the big cache memory
it had used up.

Ok till now we have been dealing with read operations wherein the cached
memory just had to be discarded.. now what happens if there is also a
heavy write operation?

What should be the tradeoff in allowing the processor to cache I/O .. how
much space should I allocate for DISK I/O to achieve optimal performance
with my system? Luckily if you have kernel 2.6 then there is a parameter
called Swappiness.

Heres what a quick glance over the net revealed..
Since 2.6, there has been a way to tune how much Linux favors swapping out
to disk compared to shrinking the caches when memory gets full.

Before the 2.6 kernels, the user had no possible means to influence the
calculations and there could happen situations where the kernel often made
the wrong choice, leading to thrashing and slow performance. The addition
of swappiness in 2.6 changes this. Thanks, ghoti!

Swappiness takes a value between 0 and 100 to change the balance between
swapping applications and freeing cache. At 100, the kernel will always
prefer to find inactive pages and swap them out; in other cases, whether a
swapout occurs depends on how much application memory is in use and how
poorly the cache is doing at finding and releasing inactive items.

The default swappiness is 60. A value of 0 gives something close to the
old behavior where applications that wanted memory could shrink the cache
to a tiny fraction of RAM. For laptops which would prefer to let their
disk spin down, a value of 20 or less is recommended.

As a sysctl, the swappiness can be set at runtime with either of the
following commands:

sysctl -w vm.swappiness=30
echo 30 >/proc/sys/vm/swappiness

I Personally felt keeping the swappiness value to 10 has helped me achieve better performance in my desktop Linux system as I have only a single IDE slot and my CDROM and HDD are connected in the same bus.. so it was better to keep the disk utilization down.

More on how to achieve this with kernel 2.4 .. shortly :)

Friday, January 06, 2006

A Strange but true phenomenon!!!

A strange phenomenon happened with me today... While watching a video in my XP machine through Windows Media Player 10, i thought of taking a screenshot of a particular screen in that video.. what i did was, i navigated to that particular screen and pressed ALT+PRT SCR to take the screen shot, opened up MS Paint, and pasted the screenshot.. to make it lossless i saved it in png format.. continued watching the rest of the video, after sometime, i paused the video and thought of opening the picture and to my surprise Image the picture showed the screen which was paused on the Windows Media Player 10 rather than what was saved onto it.. Image

haha i am very much surprised .. thats not all ... i resumed the video and simultaneously opened up the pic in windows pic and fax viewer, again to my surprise, the windows pic and fax viewer was playing the entire video in sync with the Windows Media Player 10 (only the border of the player and the timestamp was static (ie it was showing me the details of when i took the screenshot ))

Wow does this happen often??.. YES

I will explain the phenomenon...

1> Open up windows media player, maximise it and take a screen shot.. save the screen shot thru mspaint.

2> Open any video thru windows media player

3> Open the pic using any ms product (pic&fax viewer or mspaint or ms picture manager) .. i havent seen using any other product cos i havent any

4> Make sure that u r overlapping the pic window with that of windows media player ie with the same x and y coordinates and same size of the 2 windows, make the z index of pic viewer higher than that of media player..

5> Now u can see the underlying video thru the pic

now i am .. as to whether this is a feature or is it a bug...

Has anyone seen this phenomenon?? ... please respond ur views and experience about the same :)

I am in a state of

Ready Launch Tour 2005 - Mumbai 13/12/2005

My Experience at the LAUNCH...

Reached Grand Hyatt at 10:20... At the entrance a person greeted me .. it was by mistake, he thought that am someone else Image Image ..


*Inside the Lobby*

Went inside (downstairs) and registered for the event... i had the printout of the confirmation that made my registration quicker Image ) .. after the registration, they asked me the seminar i wished to attend, i said SQL Server 2005 ..

Had a cup of coffee (didnt have the cake and biscuits .. was preparing myself for the bigger event Image *haha u guessed it rt* Image )

After having the coffee, visited the AMD, INTEL, HP etc stalls (got bored and then proceeded to see whats happening at the AAC - Asian Aerosol Conference, which was being conducted in a nearby adjacent hall .. stared at some chinese girls Image and came back to MS event Image )

*At the Hands-on LAB*

Then a lady came and asked me to attend the "Hands On" Lab session till the seminar begins (she might have seen me wandering around Image ) .. went to hands on lab and seated myself in front of a pc( intel 3.something Ghz, 2 GB Ram)..b4 i could do anything, a lady came in and announced that the seminar has begun and requested everyone to attend it Image

*Inside the Seminar Hall*

->11:10 - 11:20

Seated myself in the front rows, and saw some opening videos (Theme: Get Ready To Rock)…

->11:20 - 12:15

Sanjay Parthasarthy (IDC head) walked in to deliver "keynote by microsoft", he started with the Cricket Score Image Image

Then there was a demo by Ashutosh and Gaurav Khanna which was *ditto* to demo shown in the webcast..

->12:15 - 13:30

There were some more keynotes and conversations, which was not interesting for me ;) so didnt pay attention :)

->13:30 - 13:35

Host announced the respective boardrooms for the further tracks (SQL Server(DBA Track) & VS2005 (Developer Track) and requested everyone to proceed for lunch.


*Lunch & Dessert*

->13:35 - 14:40

Wow it was fantastic!! Ate till my eyes bulged out Image

*SQL Seminar* - DBA Track

->14:40 - 16:00

Ramkumar K walked in to speak on "Building Mission Critical databases with SQL server 2005" … was interesting and learned some new techniques and enhancements... one thing that annoyed me in this session was the use of shortcut keys.. Image

->16:00 - 17:40

It was Govind Khansi's turn to speak on "Delivering Business insights(BI)" .. Govind Introduced Shivakumar H, who was amongst the audience as an expert in BI (currently writing 2 books on the same).. Couldnt listen to much of the seminar, was in deep sleep from 16:15 to 17:30 .. woke up at 17:30 and hurriedly filled in the Feedback form. Govind Khansi finished and announced a QA session with Shivakumar…

*The QA - a wonderful experience*

The QA session started with very few having the queries.. Those who asked good (relevant) questions were given a T-Shirt (Rockstar, MVP T-shirt).. i too wanted a T-Shirt , but didnt have any queries regarding SQL Server. Eventually when only 2 Shirts were left, i stood up, walked near shiva and said "Shiva , i am being frank with you, can i have one of those T-Shirts??"... he laughed and handed me over one Image , "Mission Accomplished" Image *that was the most happiest moment of the day* ... talked with him a bit more about his new book.. and came back a happy man :)


Thats all folks...

Tuesday, December 06, 2005

Preparing for a .Net Interview

Pray god, its my first chance, after 6 months (of sitting at home), to appear for an interview and that too on .net, something i had longed wished for.. but there is a little apprehension about it..
will i be able to clear this interview??
what if i dont clear?? and above all that..
what questions can i expect?? both the above questions depend on this particular question, so was on a search for the same...

O ZEN, please help thy disciple...
The first thing that came to my mind is to visit www.computerzen.com , the blog of Scott Hanselman, and did an extensive search and found this lifeline.

Yes this is what i wanted, and this is what i will prepare..
I am saving these questions here, so that i could keep it for my reference

I like to take this oppurtunity to Congratulate Scott Hanselman all the very best on becoming a happy father :)

Thursday, November 24, 2005

16 PF Psychometric or Personality test

Check your Personality by giving a 16PF psychometric or personality test.
16PF stands for the 16 Personality Factors or 'source traits' that were identified by Raymond Cattell in the 1930s as being the main set of factors whereby a person can be classified.

I gave the 16 PF personality test Here, and the result is as shown below.


Cattell's 16 Factor Test Results

Warmth ||||||||||||||||||||| 70%
Intellect |||||||||||||||||||||||||||| 90%
Emotional Stability |||||||||||||||||||||||| 78%
Aggressiveness |||||||||||||||||| 54%
Liveliness ||||||||||||||||||||| 62%
Dutifulness ||||||||||||||||||||| 70%
Social Assertiveness |||||||||||||||||||||||||||| 82%
Sensitivity ||||||||| 22%
Paranoia |||||||||||| 34%
Abstractness |||||||||||||||||||||||||||| 86%
Introversion ||||||||||||||| 42%
Anxiety |||||||||||| 38%
Openmindedness |||||||||||||||||||||||| 78%
Independence ||||||||||||||| 46%
Perfectionism |||||||||||||||||| 58%
Tension ||||||||| 26%
Take Cattell 16 Factor Test (similar to 16pf)
personality tests by similarminds.com

OK, now what these results mean??

Found explanation from here.

The 16 Primary Factors

These are Cattells' original personality factors.

Tuesday, November 22, 2005

USA, The top gaming nation

The US has been declared the top gaming nation at the World Cyber Games 2005 (16 to 20 November 2005) at singapore.

More information here.

Even this en route...: The Microsoft launch vehicle of choice: an Auto rickshaw

Even this en route...: The Microsoft launch vehicle of choice: an Auto rickshaw

Office 12 Preview

Check out The New Microsoft Office User Interface Overview

Code name MAX

Another software for sharing photos with your friends .. this time from Microsoft, its codenamed MAX, and is available for download free of charge. Max can be downloaded from http://www.microsoft.com/max/

Max helps you to make slide shows(from the list of your photos) to share among your friends. Sharing photos(or slide shows) is simple, you just need a Microsoft Passport® network or MSN® Hotmail account.

Max based on a WinFX Runtime Component, provides a 3D Mantle View™ which helps you to create some stylish and ostentate works.

You can visit the Max Blog for more information, latest news and for troubleshooting..

Dont forget to give your feedback about Max...

Monday, November 21, 2005

Con for a directory

Creating Folders in WinXP is a piece of cake, but tried creating a folder named con??

A mail stating that a directory named con cannot be created is being circulated nowadays..

Researching on the same, i found these facts..

Actually , con is a device name and is reserved by the MSDOS system..
The other reserved device names that cannot be used as a filename or directory name are:

PRN, AUX, CLOCK$, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9.

These words are reseverved by the MSDOS system for system purposes and are handled by the system only, to avoid duplicates being created and to mess up the OS..

If you would like to check each and every one in the list i mentioned above, try renaming a folder with any of the names mentioned above...and guess what?? they all reset themselves as 'new folder'!!!

Well to spice up this discussion, there is a way to create a folder named con (or any of the reserved names above)..

Type in this command at command prompt to get a folder named con or say prn




WOW u got a folder named con, Cross check it by opening the explorer, u will see a folder named con and prn at your c drive :)

haha , now the funny part is... try deleting the con folder from ur machine ...

Ok , to delete the folder you will have to again type in commands at command prompt

Type this command to delete the con and prn folders u just created..



Wondering how these commands achieved, what seemed to be impossible?

These command syntaxes are used to create folders across network, in this case, we are redirecting it back to the local machine by using '\\' in our command, in a way, tricking the O.S, which probably somehow allows the creation of directory names with that of MSDOS reserved names.

Sequel to Yukon - Katmai!!!

Another exciting code name.. The Next version of Microsoft SQL Server is code named Katmai ( national park in Alaska )Image


Feeling familiar with the code name? yes you are correct, even the Intel Pentium III chip had the same code name..


Check this out for more info.

Who is Faking it??

Are you good at spoting a fake smile??  You can try over here  BBC - Science & Nature - Human Body and Mind - Spot The Fake Smile  ...


I tried and my score was 16 :)   (hmm , i think i am pretty good at spoting a fake smile Image )