Message-ID: <482170A6.60806@domain.hid> Date: Wed, 07 May 2008 11:04:38 +0200 From: =?UTF-8?B?U3TDqXBoYW5lIEFOQ0VMT1Q=?= MIME-Version: 1.0 References: <482060A7.70809@domain.hid> <2ff1a98a0805060650he46466u88dc82fc1567173c@domain.hid> In-Reply-To: <2ff1a98a0805060650he46466u88dc82fc1567173c@domain.hid> Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Xenomai-help] rt_pipe_delete buggy List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: xenomai-help

Gilles Chanteperdrix a =C3=A9crit=C2=A0:
On Tue, May 6, 2008 at 3:44 PM, St=C3=A9phane ANCELOT <san=
celot@domain.hid> wrote:
  
Hi,
 rt_pipe_delete in user space context was working fine in my app in xeno
 2.1.2 using the same call in xeno 2.4.2 crashes the application.
 Any idea ?
    

Please only report a bug if it happens with the latest stable release.

  
I was a little bit succinct about problem description, here is a complete description regarding v2.4.2 :

using the following regression test program :

#include <native/pipe.h>

RT_PIPE pipe_defaut;
int main()
{
int ret;
=C2=A0 mlockall(MCL_CURRENT | MCL_FUTURE);
=C2=A0
if ((ret=3Drt_pipe_create(&pipe_defaut,"fifo_defaut",5,100)) !=3D0) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 printf("unable to create pipe\= n[%s]\n",strerror(-ret));
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 exit(1);
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }
rt_pipe_delete(&pipe_defaut);

}


and the resulting fault at rt_pipe_delete :

BUG: Unhandled exception over domain Xenomai at 0xc013dede - switching to ROOT
Pid: 2440, comm: a.out Tainted: GF=C2=A0=C2=A0=C2=A0=C2=A0 D 2.6.24.3-ipi= pe #1
=C2=A0[<c010e923>] __ipipe_handle_exception+0x1b3/0x1c0
=C2=A0[<c013dede>] __ipipe_restore_root+0x1e/0x30
=C2=A0[<c0113c03>] try_to_wake_up+0xb3/0xc0
=C2=A0[<c036af0b>] error_code+0x6f/0x7c
=C2=A0[<c0120000>] do_timer+0x30/0xf0
=C2=A0[<c013dede>] __ipipe_restore_root+0x1e/0x30
=C2=A0[<c01400f4>] xnheap_destroy+0x54/0xe0
=C2=A0[<c0155cc0>] __pipe_flush_pool+0x0/0x20
=C2=A0[<c015542b>] rt_pipe_delete+0x10b/0x140
=C2=A0[<c015250e>] __rt_pipe_delete+0x4e/0x70
=C2=A0[<c014a769>] hisyscall_event+0x179/0x280
=C2=A0[<c01495e7>] schedule_event+0x287/0x360
=C2=A0[<c014a5f0>] hisyscall_event+0x0/0x280
=C2=A0[<c013e63f>] __ipipe_dispatch_event+0xbf/0x1d0
=C2=A0[<c010e6c0>] __ipipe_syscall_root+0x40/0xf0
=C2=A0[<c0102ad9>] sysenter_past_esp+0x46/0x72
=C2=A0=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
------------[ cut here ]------------
kernel BUG at kernel/ipipe/core.c:321!
invalid opcode: 0000 [#3] PREEMPT
Modules linked in: i915 ibspci(F) rtcan_sja1000(F) usb_storage e100 mii
Pid: 2440, comm: a.out Tainted: GF=C2=A0=C2=A0=C2=A0=C2=A0 D (2.6.24.3-ip= ipe #1)
EIP: 0060:[<c013dede>] EFLAGS: 00010206 CPU: 0
EIP is at __ipipe_restore_root+0x1e/0x30
EAX: 00000000 EBX: cded8000 ECX: cdc006c0 EDX: c11bdb00
ESI: cdd2904c EDI: 00000000 EBP: cdd29028 ESP: cb4b3f04
=C2=A0DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process a.out (pid: 2440, ti=3Dcb4b2000 task=3Dcdc19030 task.ti=3Dcb4b2000)<0>
I-pipe domain Linux
Stack: c01400f4 00000000 00000000 c0155cc0 00000000 cdd29010 cdd29028 00000000
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 c015542b fffffffd cdd29010 cdc19030 = c015250e 0000007d cb4b3fb8 00000000
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 c014a769 0029014e c01495e7 00000004 = 00000000 00000001 000002a8 00000000
Call Trace:
=C2=A0[<c01400f4>] xnheap_destroy+0x54/0xe0
=C2=A0[<c0155cc0>] __pipe_flush_pool+0x0/0x20
=C2=A0[<c015542b>] rt_pipe_delete+0x10b/0x140
=C2=A0[<c015250e>] __rt_pipe_delete+0x4e/0x70
=C2=A0[<c014a769>] hisyscall_event+0x179/0x280
=C2=A0[<c01495e7>] schedule_event+0x287/0x360
=C2=A0[<c014a5f0>] hisyscall_event+0x0/0x280
=C2=A0[<c013e63f>] __ipipe_dispatch_event+0xbf/0x1d0
=C2=A0[<c010e6c0>] __ipipe_syscall_root+0x40/0xf0
=C2=A0[<c0102ad9>] sysenter_past_esp+0x46/0x72
=C2=A0=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 81 3d a0 84 41 c0 00 47 47 c0 75 12 85 c0 74 09 0f ba 2d 40 71 41 c0 00 c3 e9 a2 ff ff ff <0f> 0b eb fe 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00 89 c1 8b EIP: [<c013dede>] __ipipe_restore_root+0x1e/0x30 SS:ESP 0068:cb4b3f04
---[ end trace 3cbecf3ccba7b6fa ]---
sh-3.2$=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0