From: "Daniel Merrill" References: <52337BA2.4080106@xenomai.org> In-Reply-To: Date: Fri, 13 Sep 2013 14:45:14 -0700 (MST) Message-ID: <86e45894.00001e70.0000000c@dmerrill_win764.PERF.PERFORMANCESOFTWARE> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-us Subject: Re: [Xenomai] psos t_delete causing a SIGSEGV in suspended task. List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Gilles Chanteperdrix' Cc: xenomai@xenomai.org Ok, good catch :) that was a stupid mistake I made while trying to condense the problem down to a more manageable size. Which apparently when I do it works, so I'm obviously not understanding the real issue here. So much for trying to look smart. How about a stack trace from the real issue. #0 0xb7d474f6 in __gnat_is_handled_by_others () from /usr/lib/i386-linux-gnu/libgnat-4.6.so.1 #1 0xb7ec4822 in __gnat_personality_v0 () from /usr/lib/i386-linux-gnu/libgnat-4.6.so.1 #2 0xb7c65056 in ?? () from /lib/i386-linux-gnu/libgcc_s.so.1 #3 0xb7c65448 in _Unwind_ForcedUnwind () from /lib/i386-linux-gnu/libgcc_s.so.1 #4 0xb7f788c2 in _Unwind_ForcedUnwind () from /lib/i386-linux-gnu/libpthread.so.0 #5 0xb7f76381 in __pthread_unwind () from /lib/i386-linux-gnu/libpthread.so.0 #6 0xb7f6e5eb in sigcancel_handler () from /lib/i386-linux-gnu/libpthread.so.0 #7 #8 0xb7fdd424 in __kernel_vsyscall () #9 0xb7fd7541 in t_suspend () from /usr/lib/libpsos.so.0 As soon as we call t_delete on the suspended task, we see this issue popping up. Any ideas? -----Original Message----- From: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org] Sent: Friday, September 13, 2013 1:55 PM To: Daniel Merrill Cc: xenomai@xenomai.org Subject: Re: [Xenomai] psos t_delete causing a SIGSEGV in suspended task. On 09/13/2013 10:48 PM, Daniel Merrill wrote: > void main() > > { > > mlockall(MCL_CURRENT | MCL_FUTURE); > > u_long TID, TID2; > > u_long args[4] = {TID, 0, 0, 0}; TID here is an uninitialized value, and this is what you pass to t_delete. I admit the segmentation does not seem like the best reaction, but the program looks faulty. > (...) > t_start(TID2, T_PREEMPT | T_TSLICE, &deleter, args); -- Gilles.