Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C8042F.723E9EA1" Date: Mon, 1 Oct 2007 15:32:00 +0200 Message-ID: <6EB3AFE7F3632E4BA457E506E6DAF4F61451A2@domain.hid> References: <46F9167F.20008@domain.hid><46FA26ED.4070505@domain.hid> <46FF 78DF.7090104@domain.hid><1191149545.5989.7.camel@domain.hid> <46FF81BA.1020506@domain.hid .de><46FF8BB9.9080207@domain.hid> <1191156133.5989.17.camel@domain.hid><46FFC139.6 0905@domain.hid> <2ff1a98a0710010204x60178291u9633e61a89d49921@domain.hid> <4700BB1C.8040007@domain.hid><2ff1a98a0710010223k1304739w2321e83c6e060ca3@ mail.gmail.com><4700BE99.5050501@domain.hid> <6EB3AFE7F3632E4BA457E506E6DAF4F61451A1@domain.hid> From: "Labozzetta, Saverio" Subject: Re: [Xenomai-core] crashing 2.6.22 List-Id: "Xenomai life and development \(bug reports, patches, discussions\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Labozzetta, Saverio" , Jan Kiszka , Gilles Chanteperdrix Cc: xenomai-core This is a multi-part message in MIME format. ------_=_NextPart_001_01C8042F.723E9EA1 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable -----Original Message----- From: xenomai-core-bounces@domain.hid on behalf of Labozzetta, Saverio Sent: Mon 2007-10-01 2:42 PM To: Jan Kiszka; Gilles Chanteperdrix Cc: xenomai-core Subject: Re: [Xenomai-core] crashing 2=2E6=2E22 =20 >>-----Original Message----- >>From: xenomai-core-bounces@domain.hid on behalf of Jan Kiszka >>Sent: Mon 2007-10-01 11:32 AM >>To: Gilles Chanteperdrix >>Cc: xenomai-core >Subject: Re: [Xenomai-core] crashing 2=2E6=2E22 >>=20 >>Gilles Chanteperdrix wrote: >>> On 10/1/07, Jan Kiszka wrote: >>>> Gilles Chanteperdrix wrote: >>>>> On 9/30/07, Jan Kiszka wrote: >>>>>> Philippe Gerum wrote: >>>>>>> On Sun, 2007-09-30 at 13:42 +0200, Jan Kiszka wrote: >>>>>>>> Jan Kiszka wrote: >>>>>>>>> Philippe Gerum wrote: >>>>>>>>>> On Sun, 2007-09-30 at 12:22 +0200, Jan Kiszka wrote: >>>>>>>> =2E=2E=2E >>>>>>>>>>> And a third >>>>>>>>>>> one only gives me "Detected illicit call from domain Xenomai"= before the >>>>>>>>>>> box reboots=2E :( >>>>>>>>>> Grmff=2E=2E=2E Do you run with your smp_processor_id()= instrumentation in? >>>>>>>>> Yes, but I suspect this is just a symptom of some severe memory >>>>>>>>> corruption that (also?) hits I-pipe data structures=2E I just put= in some >>>>>>>>> different instrumentation, and that warning is gone, the box just= hangs >>>>>>>>> hard at a different point=2E Very unfriendly=2E >>>>>>>> Hah! Got some crash log by hacking a raw printk-to-uart: >>>>>>>> >>>>>>>> [=2E=2E=2E] >>>>>>>> <6>Xenomai: starting RTDM services=2E >>>>>>>> <6>NET: Registered protocol family 10 >>>>>>>> <6>lo: Disabled Privacy Extensions >>>>>>>> <6>ADDRCONF(NETDEV_UP): eth0: link is not ready >>>>>>>> <3>I-pipe: Detected illicit call from domain 'Xenomai' >>>>>>>> <3> into a service reserved for domain 'Linux' and below=2E >>>>>>>> f3a6bc18 00000000 00000000 c05dad6c f3a6bc3c c0105fc3= c03513c7 c05dc100 >>>>>>>> 00000009 f3a6bc54 c01479cb c03592f8 c0357ae2 c035e069= f3a6bc88 f3a6bc70 >>>>>>>> c0127224 c0111df8 00000000 f3a6bd74 00000000 f3a6bd74= f3a6bc80 c012727f >>>>>>>> Call Trace: >>>>>>>> [] show_trace_log_lvl+0x1f/0x40 >>>>>>>> [] show_stack_log_lvl+0xb1/0xe0 >>>>>>>> [] show_stack+0x33/0x40 >>>>>>>> [] ipipe_check_context+0x7b/0x90 >>>>>>>> [] __atomic_notifier_call_chain+0x24/0x60 >>>>>>>> [] atomic_notifier_call_chain+0x1f/0x30 >>>>>>>> [] notify_die+0x32/0x40 >>>>>>>> [] do_invalid_op+0x59/0xa0 >>>>>>>> [] __ipipe_handle_exception+0x7b/0x144 >>>>>>>> [] error_code+0x6f/0x7c >>>>>>> Wow=2E Why that? >>>>>>> >>>>>>>> [] __ipipe_handle_exception+0x83/0x144 >>>>>>>> [] error_code+0x6f/0x7c >>>>>>> And this? We should not get any exception over an IPI3 handler=2E I= guess >>>>>>> the double fault may be explained by this root cause=2E >>>>>>> >>>>>>>> [] __ipipe_handle_irq+0x4f/0x140 >>>>>>>> [] ipipe_ipi3+0x26/0x40 >>>>>>> Our LAPIC timer vector=2E Are you running full modular or= statically btw? >>>>>> Fully modular=2E Compiling the nucleus in makes the lock-up move to >>>>>> another, once again invisible spot=2E >>>>> >>>>>> I nailed down the fault address in the scenario above=2E It's in the >>>>>> nucleus module, at the first byte of xntimer_tick_aperiodic=2E Are= we >>>>>> loosing module text pages over the time? This functions must have= been >>>>>> executed before as the timer was armed while I collected the >>>>>> /proc/modules and then triggered the crash=2E >>>>> There is a pending issue about vmalloced areas, which I completely= forgot: >>>>> https://mail=2Egna=2Eorg/public/xenomai-core/2007-02/msg00138=2Ehtml >>>>> >>>> Would this explain my problems which are already visible without any >>>> Xenomai application running (and also without unloading the modules >>>> again, to answer Philippe's question)? Hell, I would love to find the >>>> reason here, debugging this stuff stopped being fun a long time ago=2E= =2E=2E >>>=20 >>> It would explain bugs involving a race between task creation and >>> vmalloc/ioremap=2E But the bug would only happen with Xenomai tasks >>> running, >> >>I don't need to start any Xenomai task to trigger the problem=2E >> >>> otherwise, the vmalloced/ioremaped area would be mapped lazily as usual= =2E >> >>I guess module text pages are not mapped lazily, otherwise quite a lot=20 >>of things would have fallen apart much earlier, right? > > AFAIK Once inserted module text pages are part of the kernel, so have >to be reliably ready as long as the servicies offered are registred, >is the insertion function which allocates memory, access it to write=20 >the text of the module and make it part of the kernel, so is keep in=20 >main memory=2E > I've been silly: the pages are directly allocated in kernel space= (GFP_KERNEL), and some of their addresses are pointed by the function offered in some kernel tables=2E=2E=2E BTW: sorry about the following nasty copiright abuse patch, is= automatically attached to any mail I send outside, an sorry also for the filthy email= client I use, but I've not found other ways since they put exchange on=2E=2E=2E=20 > Saverio > >> >>Jan >> >>--=20 >>Siemens AG, Corporate Technology, CT SE 2 >>Corporate Competence Center Embedded Linux >> This message contains information that may be privileged or confidential= and is the property of the Capgemini Group=2E It is intended only for the= person to whom it is addressed=2E If you are not the intended recipient, = you are not authorized to read, print, retain, copy, disseminate, = distribute, or use this message or any part thereof=2E If you receive this= message in error, please notify the sender immediately and delete all = copies of this message=2E ------_=_NextPart_001_01C8042F.723E9EA1 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: [Xenomai-core] crashing 2=2E6=2E22


-----Original Message-----
From: xenomai-core-bounces@domain.hid on behalf of Labozzetta, Saverio
Sent: Mon 2007-10-01 2:42 PM
To: Jan Kiszka; Gilles Chanteperdrix
Cc: xenomai-core
Subject: Re: [Xenomai-core] crashing 2=2E6=2E22





>>-----Original Message-----
>>From: xenomai-core-bounces@domain.hid on behalf of Jan Kiszka
>>Sent: Mon 2007-10-01 11:32 AM
>>To: Gilles Chanteperdrix
>>Cc: xenomai-core
>Subject: Re: [Xenomai-core] crashing 2=2E6=2E22
>>
>>Gilles Chanteperdrix wrote:
>>> On 10/1/07, Jan Kiszka <jan=2Ekiszka@domain.hid>= wrote:
>>>> Gilles Chanteperdrix wrote:
>>>>> On 9/30/07, Jan Kiszka <jan=2Ekiszka@domain.hid>= wrote:
>>>>>> Philippe Gerum wrote:
>>>>>>> On Sun, 2007-09-30 at 13:42 +0200, Jan Kiszka= wrote:
>>>>>>>> Jan Kiszka wrote:
>>>>>>>>> Philippe Gerum wrote:
>>>>>>>>>> On Sun, 2007-09-30 at 12:22 +0200,= Jan Kiszka wrote:
>>>>>>>> =2E=2E=2E
>>>>>>>>>>>  And a third
>>>>>>>>>>> one only gives me= "Detected illicit call from domain Xenomai" before the
>>>>>>>>>>> box reboots=2E :(
>>>>>>>>>> Grmff=2E=2E=2E Do you run with= your smp_processor_id() instrumentation in?
>>>>>>>>> Yes, but I suspect this is just a= symptom of some severe memory
>>>>>>>>> corruption that (also?) hits I-pipe= data structures=2E I just put in some
>>>>>>>>> different instrumentation, and that= warning is gone, the box just hangs
>>>>>>>>> hard at a different point=2E Very= unfriendly=2E
>>>>>>>> Hah! Got some crash log by hacking a raw= printk-to-uart:
>>>>>>>>
>>>>>>>> [=2E=2E=2E]
>>>>>>>> <6>Xenomai: starting RTDM services= =2E
>>>>>>>> <6>NET: Registered protocol family= 10
>>>>>>>> <6>lo: Disabled Privacy= Extensions
>>>>>>>> <6>ADDRCONF(NETDEV_UP): eth0: link= is not ready
>>>>>>>> <3>I-pipe: Detected illicit call= from domain 'Xenomai'
>>>>>>>>= <3>        into a service= reserved for domain 'Linux' and below=2E
>>>>>>>>       = f3a6bc18 00000000 00000000 c05dad6c f3a6bc3c c0105fc3 c03513c7= c05dc100
>>>>>>>>       = 00000009 f3a6bc54 c01479cb c03592f8 c0357ae2 c035e069 f3a6bc88= f3a6bc70
>>>>>>>>       = c0127224 c0111df8 00000000 f3a6bd74 00000000 f3a6bd74 f3a6bc80= c012727f
>>>>>>>> Call Trace:
>>>>>>>>  [<c010520f>]= show_trace_log_lvl+0x1f/0x40
>>>>>>>>  [<c01052e1>]= show_stack_log_lvl+0xb1/0xe0
>>>>>>>>  [<c0105fc3>]= show_stack+0x33/0x40
>>>>>>>>  [<c01479cb>]= ipipe_check_context+0x7b/0x90
>>>>>>>>  [<c0127224>]= __atomic_notifier_call_chain+0x24/0x60
>>>>>>>>  [<c012727f>]= atomic_notifier_call_chain+0x1f/0x30
>>>>>>>>  [<c0131e02>]= notify_die+0x32/0x40
>>>>>>>>  [<c0105d29>]= do_invalid_op+0x59/0xa0
>>>>>>>>  [<c0111d0b>]= __ipipe_handle_exception+0x7b/0x144
>>>>>>>>  [<c02dfaeb>]= error_code+0x6f/0x7c
>>>>>>> Wow=2E Why that?
>>>>>>>
>>>>>>>>  [<c0111d13>]= __ipipe_handle_exception+0x83/0x144
>>>>>>>>  [<c02dfaeb>]= error_code+0x6f/0x7c
>>>>>>> And this? We should not get any exception over= an IPI3 handler=2E I guess
>>>>>>> the double fault may be explained by this root= cause=2E
>>>>>>>
>>>>>>>>  [<c01117df>]= __ipipe_handle_irq+0x4f/0x140
>>>>>>>>  [<c0104c5e>]= ipipe_ipi3+0x26/0x40
>>>>>>> Our LAPIC timer vector=2E Are you running full= modular or statically btw?
>>>>>> Fully modular=2E Compiling the nucleus in makes= the lock-up move to
>>>>>> another, once again invisible spot=2E
>>>>>
>>>>>> I nailed down the fault address in the scenario= above=2E It's in the
>>>>>> nucleus module, at the first byte of= xntimer_tick_aperiodic=2E Are we
>>>>>> loosing module text pages over the time? This= functions must have been
>>>>>> executed before as the timer was armed while I= collected the
>>>>>> /proc/modules and then triggered the crash=2E
>>>>> There is a pending issue about vmalloced areas, which= I completely forgot:
>>>>> https://mail=2Egna= =2Eorg/public/xenomai-core/2007-02/msg00138=2Ehtml
>>>>>
>>>> Would this explain my problems which are already visible= without any
>>>> Xenomai application running (and also without unloading= the modules
>>>> again, to answer Philippe's question)? Hell, I would love= to find the
>>>> reason here, debugging this stuff stopped being fun a long= time ago=2E=2E=2E
>>>
>>> It would explain bugs involving a race between task creation= and
>>> vmalloc/ioremap=2E But the bug would only happen with Xenomai= tasks
>>> running,
>>
>>I don't need to start any Xenomai task to trigger the problem= =2E
>>
>>> otherwise, the vmalloced/ioremaped area would be mapped lazily= as usual=2E
>>
>>I guess module text pages are not mapped lazily, otherwise quite a= lot
>>of things would have fallen apart much earlier, right?
>
> AFAIK Once inserted module text pages are part of the kernel, so= have
>to be reliably ready as long as the servicies offered are= registred,
>is the insertion function which allocates memory, access it to= write
>the text of the module and make it part of the kernel, so is keep= in
>main memory=2E
>

I've been silly: the pages are directly allocated in kernel space= (GFP_KERNEL),
and some of their addresses are pointed by the function offered in some
kernel tables=2E=2E=2E

BTW: sorry about the following nasty copiright abuse patch, is= automatically
attached to any mail I send outside, an sorry also for the filthy email= client
I use, but I've not found other ways since they put exchange on=2E=2E= =2E

>  Saverio
>
>>
>>Jan
>>
>>--
>>Siemens AG, Corporate Technology, CT SE 2
>>Corporate Competence Center Embedded Linux
>>


This message= contains information that may be privileged or confidential and is the= property of the Capgemini Group=2E It is intended only for the person to= whom it is addressed=2E If you are not the intended recipient, you are= not authorized to read, print, retain, copy, disseminate, distribute, or= use this message or any part thereof=2E If you receive this message in= error, please notify the sender immediately and delete all copies of this= message=2E

------_=_NextPart_001_01C8042F.723E9EA1--