« Archives in July, 2008

Linux CentOS – Kernel panic

This looks like an error with memory by sim. Anyone has a better clue? The kernel version is 2.6.9-67.0.4.EL, then we rebooted and upgraded to 2.6.9-67.0.20.EL. Any kernel bug I should be aware of?

Jul 13 04:03:13 host syslogd 1.4.1: restart.
Jul 16 08:00:01 host kernel: swap_free: Unused swap offset entry 00010000
Jul 16 08:00:01 host kernel: swap_free: Unused swap offset entry 00010000
Jul 16 08:45:01 host kernel: Unable to handle kernel paging request at virtual address 313a3921
Jul 16 08:45:01 host kernel:  printing eip:
Jul 16 08:45:01 host kernel: c015eebb
Jul 16 08:45:01 host kernel: *pde = 00000000
Jul 16 08:45:01 host kernel: Oops: 0000 [#1]
Jul 16 08:45:01 host kernel: Modules linked in: ip_vs_wrr ip_vs md5 ipv6 ipt_TOS iptable_mangle ip_conntrack_ftp ip_conntrack_irc ipt_REJECT ipt_LOG ipt_limit
iptable_filter ipt_multiport ipt_state ip_conntrack ip_tables autofs4 sunrpc dm_mirror dm_mod button battery ac parport_pc parport 8139too mii ext3 jbd
Jul 16 08:45:01 host kernel: CPU:    0
Jul 16 08:45:01 host kernel: EIP:    0060:[]    Not tainted VLI
Jul 16 08:45:01 host kernel: EFLAGS: 00010202   (2.6.9-67.0.4.EL)
Jul 16 08:45:01 host kernel: EIP is at find_vma+0x29/0x4d
Jul 16 08:45:01 host kernel: eax: 313a3919   ebx: 00c8479c   ecx: 313a3931   edx: c97ec6b4
Jul 16 08:45:01 host kernel: esi: de5b40a0   edi: c8929360   ebp: bff08518   esp: c85dcef4
Jul 16 08:45:01 host kernel: ds: 007b   es: 007b   ss: 0068
Jul 16 08:45:01 host kernel: Process sim (pid: 6909, threadinfo=c85dc000 task=c8929360)
Jul 16 08:45:01 host kernel: Stack: de5b40a0 de5b40d0 c011d901 00000000 00c8479c c85dcfc4 c032ebbf 00000007
Jul 16 08:45:01 host kernel:        0000000e 0000000b 00000000 00000000 00000000 00000000 00000000 00030001
Jul 16 08:45:01 host kernel:        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Jul 16 08:45:01 host kernel: Call Trace:
Jul 16 08:45:01 host kernel:  [] do_page_fault+0x114/0x4dc
Jul 16 08:45:01 host kernel:  [] do_page_fault+0x0/0x4dc
Jul 16 08:45:01 host kernel:  [] error_code+0x2f/0x38
Jul 16 08:45:01 host kernel:  [] schedule_tail+0xfd/0x106
Jul 16 08:45:01 host kernel:  [] do_page_fault+0x0/0x4dc
Jul 16 08:45:01 host kernel:  [] error_code+0x2f/0x38
Jul 16 08:45:01 host kernel: Code: 5d c3 56 89 c6 53 89 d3 31 d2 85 c0 74 3c 8b 50 08 85 d2 74 0a 39 5a 08 76 05 39 5a 04 76 2b 8b 4e 04 31 d2 85 c9 74 22 8d 4
1 e8 <39> 58 08 76 0c 39 58 04 89 c2 76 0c 8b 49 0c eb 03 8b 49 08 85
Jul 16 08:45:01 host kernel:  <0>Fatal exception: panic in 5 seconds
Jul 16 10:12:18 host syslogd 1.4.1: restart.

jQuery, Google AJAX APIs

We recently implemented jQuery into our ad server, majorly for future feature expansions and hopefully convert some of the existing JS enhancements using jQuery for a simpler codebase. Google AJAX API is nice but does not support SSL, which is quite inconvenient.

Frustrations with Google AdWords

Google withholds lots of data for their own data-mining purposes. The stated level of click frauds is definitely questionable from our own experience. Don’t forget to check your own click logs and adjust your account promptly or Google and their affiliates are wasting your budget.

Their customer service representative often replies with a very long answer, but use default or template responses. Many times, the answers does not even make any sense or irrelevant to the original issues. They always blame the problems on the clients. They believe their back-end system is the most accurate and should be obeyed at all times. With this kind of quality, I strongly there is a demand for a more human and better ad service.

MySQL – SHOW commands are expensive

It’s convenient to display information about a table, running status, server configurations. However, it is expensive! A simple “SHOW COLUMNS FROM SomeTable” create a disk-based temporary table!!! The same for “SHOW STATUS LIKE ‘Created_%'”. Lesson: avoid these if you don’t want to see “Created_tmp_disk_tables” and “Created_tmp_tables” counters spinning. It’s not a bug but can mislead in debugging. A patch is available on 5.1.12 (not for 5.0.x though). But the lesson here is to avoid frequent calls to SHOW commands. A better solution is to have MySQL support query caching not just for SELECT… but also for SHOW COLUMNS. These queries do not change that often and can be cached effectively. You could write your own cache but having it done MySQL query caching would be a plus as well.

http://bugs.mysql.com/bug.php?id=10210

Issue with MySQL replication

For some reasons I have not been able to pin point exactly which piece goes wrong, if a master has too many slaves, it will have quite a few issues. 1) lighttpd regularly get backend overloaded errors; 2) ping to this server will fluctuate drastically. And I don’t think it’s that many slaves.

Windows Vista Firewall

If I didn’t know, I would say it sucks and install another firewall, like ZoneAlarm for all my other XP computers. However, after an issue with delay and slow connection to localhost, I have identified the problem is with conflicting firewalls. Uninstalled ZoneAlarm, then tweak Vista Firewall, it’s quite powerful (use w/ Advanced Security option). You’ll be able to add/edit rules just like iptables under Linux. For my purpose, I created a trusted zone for local IP addresses (192.168.2.0/24) and things flies again. Don’t use the default settings, but you don’t have to do much. Just block all incoming AND outgoing for all level (Domain, Public, Private) and check those Enable rules. Only let things out/in under your control.

SHOW TABLE STATUS FROM MyDatabaseName;

Run that query if you would like to know basic details about a database, especially the overhead to see if you would need to optimize it.

Name: AdSpeedDB
Engine: MyISAM
Version: 10
Row_format: Dynamic
Rows: 0
Avg_row_length: 0
Data_length: 4676
Max_data_length: 281474976710655
Index_length: 3072
Data_free: 4676
Auto_increment: 221
Create_time: 2007-08-01 17:15:24
Update_time: 2008-06-03 07:26:13
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment: Ad Server