Running custom Mono/GTK Sharp application. Application used to work on RT kernel and uses SCHED_RR priority.
Now it crashes the moment it tries to create pthread threads that will run at some priortiy using SCHED_RR
'Full' crashreport from syslog:
Dec 17 16:32:02 wmc016 kernel: [ 1308.894129] BUG: scheduling while atomic: myapp/0x00000001/3340, CPU#0
Dec 17 16:32:02 wmc016 kernel: [ 1308.894132] Modules linked in: binfmt_misc vboxnetflt vboxnetadp vboxdrv nls_cp437 cifs snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss iptable_filter ip_tables x_tables snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device snd ppdev lp parport_pc soundcore heci(C) snd_page_alloc parport led_class usbhid radeon ttm drm i2c_algo_bit e1000e floppy intel_agp
Dec 17 16:32:02 wmc016 kernel: [ 1308.894180] Pid: 3340, comm: myapp Tainted: G C 2.6.31-9-rt #152-Ubuntu
Dec 17 16:32:02 wmc016 kernel: [ 1308.894184] Call Trace:
Dec 17 16:32:02 wmc016 kernel: [ 1308.894189] [<ffffffff8104f92a>] __schedule_bug+0x6a/0x70
Dec 17 16:32:02 wmc016 kernel: [ 1308.894195] [<ffffffff8153bfb9>] thread_return+0x278/0x3cf
Dec 17 16:32:02 wmc016 kernel: [ 1308.894201] [<ffffffff8153c394>] schedule+0x14/0x30
Dec 17 16:32:02 wmc016 kernel: [ 1308.894206] [<ffffffff8153d41a>] rt_spin_lock_slowlock+0x1ba/0x290
Dec 17 16:32:02 wmc016 kernel: [ 1308.894213] [<ffffffff8153de46>] rt_spin_lock+0x36/0x60
Dec 17 16:32:02 wmc016 kernel: [ 1308.894218] [<ffffffff8153b807>] wait_for_common+0xc7/0x180
Dec 17 16:32:02 wmc016 kernel: [ 1308.894224] [<ffffffff8105a770>] ? default_wake_function+0x0/0x20
Dec 17 16:32:02 wmc016 kernel: [ 1308.894230] [<ffffffff8106f243>] ? signal_wake_up+0x43/0x50
Dec 17 16:32:02 wmc016 kernel: [ 1308.894236] [<ffffffff8153b958>] wait_for_completion+0x18/0x20
Dec 17 16:32:02 wmc016 kernel: [ 1308.894241] [<ffffffff81128fa4>] coredump_wait+0x1f4/0x230
Dec 17 16:32:02 wmc016 kernel: [ 1308.894247] [<ffffffff811298a6>] do_coredump+0x146/0x490
Dec 17 16:32:02 wmc016 kernel: [ 1308.894253] [<ffffffff8153bd94>] ? thread_return+0x53/0x3cf
Dec 17 16:32:02 wmc016 kernel: [ 1308.894259] [<ffffffff810774d9>] ? __task_pid_nr_ns+0x69/0xc0
Dec 17 16:32:02 wmc016 kernel: [ 1308.894265] [<ffffffff810717ea>] get_signal_to_deliver+0x19a/0x330
Dec 17 16:32:02 wmc016 kernel: [ 1308.894271] [<ffffffff81011a9d>] do_signal+0x8d/0x1f0
Dec 17 16:32:02 wmc016 kernel: [ 1308.894277] [<ffffffff8106e761>] ? sys_rt_sigaction+0x81/0xc0
Dec 17 16:32:02 wmc016 kernel: [ 1308.894283] [<ffffffff81011c4f>] do_notify_resume+0x4f/0x60
Dec 17 16:32:02 wmc016 kernel: [ 1308.894288] [<ffffffff81012c1c>] retint_signal+0x48/0x8c
Dec 17 16:32:02 wmc016 kernel: [ 1308.894311] note: wmcs_core2[3340] exited with preempt_count 1
Running Karmic 9.10 AMD64 on Intel processor with all recent patches.
Running custom Mono/GTK Sharp application. Application used to work on RT kernel and uses SCHED_RR priority.
Now it crashes the moment it tries to create pthread threads that will run at some priortiy using SCHED_RR
'Full' crashreport from syslog:
Dec 17 16:32:02 wmc016 kernel: [ 1308.894129] BUG: scheduling while atomic: myapp/0x0000000 1/3340, CPU#0 codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss iptable_filter ip_tables x_tables snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device snd ppdev lp parport_pc soundcore heci(C) snd_page_alloc parport led_class usbhid radeon ttm drm i2c_algo_bit e1000e floppy intel_agp 92a>] __schedule_ bug+0x6a/ 0x70 fb9>] thread_ return+ 0x278/0x3cf 394>] schedule+0x14/0x30 41a>] rt_spin_ lock_slowlock+ 0x1ba/0x290 e46>] rt_spin_ lock+0x36/ 0x60 807>] wait_for_ common+ 0xc7/0x180 770>] ? default_ wake_function+ 0x0/0x20 243>] ? signal_ wake_up+ 0x43/0x50 958>] wait_for_ completion+ 0x18/0x20 fa4>] coredump_ wait+0x1f4/ 0x230 8a6>] do_coredump+ 0x146/0x490 d94>] ? thread_ return+ 0x53/0x3cf 4d9>] ? __task_ pid_nr_ ns+0x69/ 0xc0 7ea>] get_signal_ to_deliver+ 0x19a/0x330 a9d>] do_signal+ 0x8d/0x1f0 761>] ? sys_rt_ sigaction+ 0x81/0xc0 c4f>] do_notify_ resume+ 0x4f/0x60 c1c>] retint_ signal+ 0x48/0x8c
Dec 17 16:32:02 wmc016 kernel: [ 1308.894132] Modules linked in: binfmt_misc vboxnetflt vboxnetadp vboxdrv nls_cp437 cifs snd_hda_
Dec 17 16:32:02 wmc016 kernel: [ 1308.894180] Pid: 3340, comm: myapp Tainted: G C 2.6.31-9-rt #152-Ubuntu
Dec 17 16:32:02 wmc016 kernel: [ 1308.894184] Call Trace:
Dec 17 16:32:02 wmc016 kernel: [ 1308.894189] [<ffffffff8104f
Dec 17 16:32:02 wmc016 kernel: [ 1308.894195] [<ffffffff8153b
Dec 17 16:32:02 wmc016 kernel: [ 1308.894201] [<ffffffff8153c
Dec 17 16:32:02 wmc016 kernel: [ 1308.894206] [<ffffffff8153d
Dec 17 16:32:02 wmc016 kernel: [ 1308.894213] [<ffffffff8153d
Dec 17 16:32:02 wmc016 kernel: [ 1308.894218] [<ffffffff8153b
Dec 17 16:32:02 wmc016 kernel: [ 1308.894224] [<ffffffff8105a
Dec 17 16:32:02 wmc016 kernel: [ 1308.894230] [<ffffffff8106f
Dec 17 16:32:02 wmc016 kernel: [ 1308.894236] [<ffffffff8153b
Dec 17 16:32:02 wmc016 kernel: [ 1308.894241] [<ffffffff81128
Dec 17 16:32:02 wmc016 kernel: [ 1308.894247] [<ffffffff81129
Dec 17 16:32:02 wmc016 kernel: [ 1308.894253] [<ffffffff8153b
Dec 17 16:32:02 wmc016 kernel: [ 1308.894259] [<ffffffff81077
Dec 17 16:32:02 wmc016 kernel: [ 1308.894265] [<ffffffff81071
Dec 17 16:32:02 wmc016 kernel: [ 1308.894271] [<ffffffff81011
Dec 17 16:32:02 wmc016 kernel: [ 1308.894277] [<ffffffff8106e
Dec 17 16:32:02 wmc016 kernel: [ 1308.894283] [<ffffffff81011
Dec 17 16:32:02 wmc016 kernel: [ 1308.894288] [<ffffffff81012
Dec 17 16:32:02 wmc016 kernel: [ 1308.894311] note: wmcs_core2[3340] exited with preempt_count 1
Running Karmic 9.10 AMD64 on Intel processor with all recent patches.
Excerpt of c code (-m64):
pthread_t my_thread;
struct sched_param param;
pthread_attr_t threadAttr;
param. sched_priority = 2; setscheduler( 0, SCHED_RR, ¶m) != 0) {
if (sched_
exit(-1);
}
param. sched_priority = 90; attr_init( &threadAttr) ; attr_setschedpo licy(&threadAtt r, SCHED_RR); attr_setschedpa ram(&threadAttr , ¶m);
pthread_
pthread_
pthread_
if (pthread_ create( &my_thread, &threadAttr, my_task, (void *) 10) != 0) { attr_destroy( &threadAttr) ;
exit(-1);
}
pthread_
ProblemType: Bug 2.6.31- 9-rt 2.6.31-9.152 ature: Ubuntu 2.6.31- 16.53-generic
Architecture: amd64
Date: Mon Dec 21 13:44:10 2009
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
Package: linux-image-
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: linux-rt
Uname: Linux 2.6.31-16-generic x86_64