Skip to contentSkip to conversation

wait queues broken?

uml-devel sean whalen 1 participant 1 message Nov 19, 2003 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

Hi All --
Has anyone had any problems with wait queues in 2.6.0-test9 under UML? I have the following in my code:

wait_queue_head_t wq;
init_waitqueue_head(&wq);
interruptible_sleep_on_timeout(&wq, 5*HZ);

And the UML kernel dies when it reaches the interruptible_sleep_on_timeout. Here is a gdb trace:

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 array is a null pointer being dereferenced in sched.c. Am I doing something stupid, could this possibly be a UML bug, or should I forward to lkml? Any help is appreciated.

Thanks,
-Sean

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel