On Mon, Apr 20, 2009 at 11:36 PM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote: > On Mon, Apr 20, 2009 at 1:03 PM, Lal <learner.kernel@xxxxxxxxx> wrote: >> I have a Linux system, running a couple of third party kernel modules. >> The functionality seems all right except a rare case where kernel >> timers stop expiring. When the system reaches this state, everything >> works fine except the functionalities depending upon kernel timers. >> For example: >> >> - "sleep 3" on shell never returns >> - telnet <to some unreachable host> never returns >> - sample kernel module registers timer using add_timer. But timer never expires >> >> It appears to me that one of third party kernel module is causing >> this. Before I look into the source code, can someone give some hints >> about possible reasons where kernel timers may stop working >> (expiring). > > let's see...I hope it's not the scheduler tick that is not > working..because if it does, surely it will affect process' time slice > expiration. But since now expiration relies on hrtimer (HPET to be > exact), things might go differently... > > > or maybe something is wrong with the way bottom halves are > handled...in this case it could be ksoftirqd or do_softirq(). > > Uhm....could it be because jiffies are not incremented correctly? > well, not the expert here...i am just trying to dump the possibilities > in mind. > > regards, > > Mulyadi. > jiffies is increasing properly (I verified using a test module). The system is running kernel 2.4.21 I suspect some buggy timeout handler function is not returning, that has stopped other timers to expire . But is there a way to confirm this? Following is code snippet from run_timer_list in timer.c file. When timer is expired, corresponding timeout handler is invoked (call to fn in below code). If fn does not return, then I guess no further timer can expire. if (curr != head) { struct timer_list *timer; void (*fn)(unsigned long); unsigned long data; timer = list_entry(curr, struct timer_list, list); fn = timer->function; data= timer->data; detach_timer(timer); timer->list.next = timer->list.prev = NULL; timer_enter(timer); spin_unlock_irq(&timerlist_lock); fn(data); spin_lock_irq(&timerlist_lock); timer_exit(); goto repeat; Any comments would be appreciated. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ