From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gilles Chanteperdrix MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17871.38937.833989.444025@domain.hid> Date: Sun, 11 Feb 2007 23:26:33 +0100 Subject: Re: [Xenomai-core] [BUG] trunk: screwed Linux irq state In-Reply-To: <45CF951B.8080404@domain.hid> References: <45CF951B.8080404@domain.hid> List-Id: "Xenomai life and development \(bug reports, patches, discussions\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: xenomai-core Jan Kiszka wrote: > Hi, > > while testing 2.6.20 with RTnet, I got this kernel BUG during the slave > startup procedure: > > <4>[ 137.799234] TDMA: calibrated master-to-slave packet delay: 34 us (min/max: 33/38 us) > <4>[ 142.291455] BUG: at kernel/fork.c:993 copy_process() > <4>[ 142.291585] [] show_trace_log_lvl+0x1f/0x40 > <4>[ 142.291767] [] show_trace+0x17/0x20 > <4>[ 142.291896] [] dump_stack+0x1b/0x20 > <4>[ 142.292026] [] copy_process+0x914/0x13d0 > <4>[ 142.292190] [] do_fork+0x70/0x1b0 > <4>[ 142.292323] [] sys_clone+0x38/0x40 > <4>[ 142.292620] [] syscall_call+0x7/0xb > <4>[ 142.292747] ======================= > <3>[ 142.292860] BUG: sleeping function called from invalid context at mm/slab.c:3034 > <4>[ 142.293052] in_atomic():0, irqs_disabled():1 > <4>[ 142.293152] no locks held by init/1. > <4>[ 142.293244] irq event stamp: 500992 > <4>[ 142.293335] hardirqs last enabled at (500991): [] __ipipe_handle_exception+0xdc/0x188 > <4>[ 142.293737] hardirqs last disabled at (500992): [] ret_from_exception+0xe/0x20 > <4>[ 142.293967] softirqs last enabled at (500868): [] __do_softirq+0xab/0xc0 > <4>[ 142.294189] softirqs last disabled at (500861): [] do_softirq+0x95/0xa0 > <4>[ 142.294562] [] show_trace_log_lvl+0x1f/0x40 > <4>[ 142.294743] [] show_trace+0x17/0x20 > <4>[ 142.294897] [] dump_stack+0x1b/0x20 > <4>[ 142.295050] [] __might_sleep+0xcd/0x100 > <4>[ 142.295220] [] kmem_cache_alloc+0xa1/0xc0 > <4>[ 142.295527] [] dup_fd+0x29/0x2d0 > <4>[ 142.295689] [] copy_files+0x49/0x70 > <4>[ 142.295851] [] copy_process+0x6af/0x13d0 > <4>[ 142.296019] [] do_fork+0x70/0x1b0 > <4>[ 142.296178] [] sys_clone+0x38/0x40 > <4>[ 142.296326] [] syscall_call+0x7/0xb > <4>[ 142.296641] ======================= > > I'm seeing this with Xenomai trunk + the xnpod_suspend_thread patch. I > attached my .config. The interesting thing is that this doesn't show up > with v2.3.x head (kernel & config identical). Switching back to 2.6.19 > doesn't change the picture. > > Anyone any idea? No-COW is now both in trunk and 2.3.x, right? In order to see if it is the effect of the no-cow patch, comment out the I-pipe portion in copy_one_pte, in mm/memory.c. This code should have an effect only if you are forking in a real-time application, though. -- Gilles Chanteperdrix.