Has anyone run into problems using wait queue's in 2.6.0-test9? I have the following lines in my code:
wait_queue_head_t wq; init_waitqueue_head(&wq); interruptible_sleep_on_timeout(&wq, 5*HZ);
And whenever it reaches the interruptible_sleep_on_timeout call, the kernel crashes. I'm running my kernel using user mode linux, so it just dies without an oops.
Using gdb to step through the function, I get the following:
Program received signal SIGSEGV, Segmentation fault.
schedule () at kernel/sched.c:327
327 array->nr_active--;
(gdb) bt
#0 schedule () at kernel/sched.c:327
#1 0xa004394f in schedule_timeout (timeout=-1608944988) at kernel/ timer.c:1046
#2 0xa0031eab in interruptible_sleep_on_timeout (q=0xa0197354, timeout=500)
at kernel/sched.c:1792
#3 0xa016c42a in wait_for_response () at net/bridge/br_stp_bpdu.c:159
#4 0xa016c63e in br_stp_handle_bpdu (skb=0x1) at net/bridge/ br_stp_bpdu.c:240
#5 0xa016a28f in br_handle_frame (skb=0xa1fd56ec) at net/bridge/ br_input.c:136
#6 0xa0118492 in netif_receive_skb (skb=0xa1fd56ec) at net/core/dev. c:1522
#7 0xa0118637 in process_backlog (backlog_dev=0xa01c5a48, budget=0xa019748c)
at net/core/dev.c:1611
#8 0xa0118746 in net_rx_action (h=0xa01bcd78) at net/core/dev.c:1676
#9 0xa003abfa in do_softirq () at kernel/softirq.c:98
#10 0xa0014fdb in do_IRQ (irq=5, regs=0xa0198e90) at arch/um/kernel/ irq.c:340
#11 0xa00159da in sigio_handler () at wait.h:60
#12 0xa0022551 in sig_handler_common_skas () at wait.h:60
#13 0xa001fc58 in sig_handler () at wait.h:60
#14 <signal handler called>
#15 0x400b0e64 in setitimer () from /lib/libc.so.6
#16 0xa001ea1b in switch_timers () at wait.h:60
#17 0xa0197854 in init_thread_union ()
(gdb) display array
1: array = (prio_array_t *) 0x0
So the array variable is a null pointer and it's being dereferenced. am i doing something to trigger this, or should i forward this to lkml?
Thanks, -Sean -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/