From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74731 invoked by alias); 19 Apr 2016 15:21:01 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Received: (qmail 74711 invoked by uid 89); 19 Apr 2016 15:21:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_20,RP_MATCHES_RCVD,SPF_PASS,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 spammy=Hx-languages-length:2346, HDKIM-Filter:OpenDKIM, HDKIM-Filter:Filter, Architecture X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 19 Apr 2016 15:20:50 +0000 Received: by mail.ecoscentric.com (Postfix, from userid 512) id EFE24A8A319; Tue, 19 Apr 2016 16:20:46 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.ecoscentric.com EFE24A8A319 From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: unassigned@bugs.ecos.sourceware.org Subject: [Bug 1002142] New: sigtimedwait not POSIX compliant, crash when passing NULL info parameter. Date: Tue, 19 Apr 2016 15:21:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter qa_contact cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00042.txt.bz2 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002142 Bug ID: 1002142 Summary: sigtimedwait not POSIX compliant, crash when passing NULL info parameter. Product: eCos Version: 3.0 Target: All Architecture/Host_ Other OS: Status: UNCONFIRMED Severity: enhancement Priority: low Component: POSIX Assignee: unassigned@bugs.ecos.sourceware.org Reporter: ehoffman@positronaccess.com QA Contact: ecos-bugs@ecos.sourceware.org CC: ecos-bugs@ecos.sourceware.org Hi, I think found a bug in POSIX compatibility package. For the function sigtimedwait, and also affecting the function sigwaitinfo (which just wrap sigtimedwait), if you pass a NULL pointer to the info parameter, eCos crash because it tries to blindly write to that reference (without checking if it's NULL or not). POSIX say: [...] The sigwaitinfo() function shall be equivalent to the sigwait() function if= the info argument is NULL. If the info argument is non-NULL, the sigwaitinfo() function shall be equivalent to sigwait(), except that the selected signal number shall be stored in the si_signo member, and the cause of the signal shall be stored in the si_code member. If any value is queued to the select= ed signal, the first such queued value shall be dequeued and, if the info argu= ment is non-NULL, the value shall be stored in the si_value member of info. The system resource used to queue the signal shall be released and returned to = the system for other use. If no value is queued, the content of the si_value me= mber is undefined. If no further signals are queued for the selected signal, the pending indication for that signal shall be reset. [...] So, according to the description, it should be allowed to pass NULL for the info parameter, and indeed, it is quite common to just wait for a signal wi= th timeout, without needing the info (just needing the return value). Error is in packages/compat/posix/current/src/signal.cxx function sigtimedwait. At a few places, it sets *info to some values without checki= ng if info is null. Also, the return value is took directly from info->si_sig= no (that is set in the function). Regards, Eric Hoffman --=20 You are receiving this mail because: You are the assignee for the bug. >>From ecos-bugs-return-11103-listarch-ecos-bugs=sources.redhat.com@sourceware.org Wed Apr 20 04:41:10 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 21270 invoked by alias); 20 Apr 2016 04:41:10 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 21243 invoked by uid 89); 20 Apr 2016 04:41:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_20,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=awaken, ecosdiscuss, ecos-discuss, Architecture X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Apr 2016 04:40:59 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 7C430A8A016 for ; Wed, 20 Apr 2016 05:40:56 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (albus.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VsTQptXSxNsX for ; Wed, 20 Apr 2016 05:40:56 +0100 (BST) From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: ecos-bugs@ecos.sourceware.org Subject: [Bug 1002143] New: sigwait does not wake up on blocked signals. Date: Wed, 20 Apr 2016 04:41:00 -0000 X-Bugzilla-Reason: QAcontact CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter qa_contact cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00044.txt.bz2 Content-length: 4990 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002143 Bug ID: 1002143 Summary: sigwait does not wake up on blocked signals. Product: eCos Version: 3.0 Target: All Architecture/Host_ Other OS: Status: UNCONFIRMED Severity: enhancement Priority: low Component: POSIX Assignee: unassigned@bugs.ecos.sourceware.org Reporter: ehoffman@positronaccess.com QA Contact: ecos-bugs@ecos.sourceware.org CC: ecos-bugs@ecos.sourceware.org Hello I came into the same problem as discussed in 2009 in the mailing list Ref: https://sourceware.org/ml/ecos-discuss/2009-09/msg00159.html The discussion thread ended up short with no real satisfactory answer, and = I do think the original question is really pointing a bug. Basically, the issue is that if you have a pthread, and in that POSIX thread you block some signals (SIGUSR1 for example), and you do a sigwait, waiting= for that signal, then the thread is supposed to wait for that signal to be in t= he signal queue, and return when the signal is present in the queue (removing = it from the signal queue). It is normal behavior to wait on blocked signals, sigwait POSIX documentation say that the signal should be blocked before calling sigwait. This is to prevent signal handler from dispatching the si= gnal and removing it from the queue: [...]If no signal in set is pending at the time of the call, the thread sha= ll be suspended until one or more becomes pending. The signals defined by set shall have been blocked at the time of the call to sigwait(); otherwise, the behavior is undefined[...] So, the normal usage is is as follow: - Thread X (pthread) block a specific signal, using pthread_sigmask(). - Thread X call sigwait(), waiting for that signal to be present in the sig= nal set/queue. - Thread Y call pthread_kill(), sending signal to thread X. - Thread X get the signal in the queue (or from the signal set). Since the signal is blocked, no signal handler is called. However, since you have ca= lled sigwait(), the sigwait() function returns and remove the signal from the qu= eue. If thread Y sends the signal to thread X before thread X call sigwait(), the signal is set in thread X. Nothing happen since it's blocked in thread X w= ith the previous call to pthread_sigmask(). However, as soon as thread X call sigwait(), sigwait() returns immediately (removing the signal from the queu= e).=20 That behavior is properly respected by eCos. If thread X call sigwait() before it receive a signal, it goes to sleep, waiting for signal. When thread Y send signal to thread X (using pthread_kill), the signal is then put in thread Y signal queue (or signal s= et). Thread Y then wake up and "consume" the signal, returning from sigwait().= =20 That is NOT working in eCos, and it's what's discussed in the mailing list I mentioned above. I also checked and confirmed that this behavior seem to be related to the c= ode in signal.cxx: if( thread !=3D NULL ) { sigaddset( &thread->sigpending, signo ); // just wake the thread up now if it's blocked somewhere if ((thread->sigpending & ~thread->sigmask) !=3D 0) { thread->thread->set_asr_pending(); thread->thread->release(); } } This code will wake up the thread ONLY if the signal is not blocked in the thread. This behavior is erroneous. If the signal is blocked in the recei= ving thread, it MUST be awaken if the receiving thread is waiting for signal (sigwait/sigtimedwait). However the behavior is correct if the receiving thread is sleeping for other reasons. So, to correct the behavior, a new state variable is required on the receiv= ing thread to indicate that the thread is actively waiting for signal. The thr= ead must be awaken if either the signal is unblocked, or if the thread is waiti= ng for the specified signal. Something that goes like: if ((thread->sigpending & (~thread->sigmask | thread->sigwaitset)) !=3D 0) ... thread->sigwaitset should be set before putting thread to sleep (before cal= ling signal_sigwait.wait()), and cleared after awaking from sleep. This is applicable to both cyg_sigqueue() function and in cyg_posix_pthread_release_thread() function in signal.cxx. Also, the sigwait family can return EAGAIN in case of timeout (sigtimedwait) and EINTR in case of interruption by a signal other than the signals the sigwait/sigtimedwait was waiting for (which wasn't blocked). eCos now only have hardcoded EAGAIN. EAGAIN must only be used for when timeout occur.=20 Otherwise, EINTR must be returned. So when returning from the signal_sigwait.wait() function, the wake reason must be checked (and not ju= st hardcode EGAIN). Regards, Eric Hoffman --=20 You are receiving this mail because: You are the QA Contact for the bug. You are on the CC list for the bug. >>From ecos-bugs-return-11102-listarch-ecos-bugs=sources.redhat.com@sourceware.org Tue Apr 19 15:21:01 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 74740 invoked by alias); 19 Apr 2016 15:21:01 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 74710 invoked by uid 89); 19 Apr 2016 15:21:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 spammy=Hx-languages-length:2384, non-null, Architecture, ecos X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 19 Apr 2016 15:20:50 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id E68C4A8A684 for ; Tue, 19 Apr 2016 16:20:46 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (albus.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P2gaIbaiFH94 for ; Tue, 19 Apr 2016 16:20:46 +0100 (BST) From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: ecos-bugs@ecos.sourceware.org Subject: [Bug 1002142] New: sigtimedwait not POSIX compliant, crash when passing NULL info parameter. Date: Wed, 20 Apr 2016 04:41:00 -0000 X-Bugzilla-Reason: QAcontact CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter qa_contact cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00043.txt.bz2 Content-length: 2493 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002142 Bug ID: 1002142 Summary: sigtimedwait not POSIX compliant, crash when passing NULL info parameter. Product: eCos Version: 3.0 Target: All Architecture/Host_ Other OS: Status: UNCONFIRMED Severity: enhancement Priority: low Component: POSIX Assignee: unassigned@bugs.ecos.sourceware.org Reporter: ehoffman@positronaccess.com QA Contact: ecos-bugs@ecos.sourceware.org CC: ecos-bugs@ecos.sourceware.org Hi, I think found a bug in POSIX compatibility package. For the function sigtimedwait, and also affecting the function sigwaitinfo (which just wrap sigtimedwait), if you pass a NULL pointer to the info parameter, eCos crash because it tries to blindly write to that reference (without checking if it's NULL or not). POSIX say: [...] The sigwaitinfo() function shall be equivalent to the sigwait() function if= the info argument is NULL. If the info argument is non-NULL, the sigwaitinfo() function shall be equivalent to sigwait(), except that the selected signal number shall be stored in the si_signo member, and the cause of the signal shall be stored in the si_code member. If any value is queued to the select= ed signal, the first such queued value shall be dequeued and, if the info argu= ment is non-NULL, the value shall be stored in the si_value member of info. The system resource used to queue the signal shall be released and returned to = the system for other use. If no value is queued, the content of the si_value me= mber is undefined. If no further signals are queued for the selected signal, the pending indication for that signal shall be reset. [...] So, according to the description, it should be allowed to pass NULL for the info parameter, and indeed, it is quite common to just wait for a signal wi= th timeout, without needing the info (just needing the return value). Error is in packages/compat/posix/current/src/signal.cxx function sigtimedwait. At a few places, it sets *info to some values without checki= ng if info is null. Also, the return value is took directly from info->si_sig= no (that is set in the function). Regards, Eric Hoffman --=20 You are receiving this mail because: You are the QA Contact for the bug. You are on the CC list for the bug. >>From ecos-bugs-return-11105-listarch-ecos-bugs=sources.redhat.com@sourceware.org Wed Apr 20 04:58:43 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 112904 invoked by alias); 20 Apr 2016 04:58:42 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 112889 invoked by uid 89); 20 Apr 2016 04:58:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:817, Contact X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Apr 2016 04:58:32 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 6DCE4A8A6E6 for ; Wed, 20 Apr 2016 05:58:29 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (albus.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mP-tLTHB0Oub for ; Wed, 20 Apr 2016 05:58:29 +0100 (BST) From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: ecos-bugs@ecos.sourceware.org Subject: [Bug 1002143] sigwait does not wake up on blocked signals. Date: Wed, 20 Apr 2016 04:58:00 -0000 X-Bugzilla-Reason: QAcontact CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00046.txt.bz2 Content-length: 772 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002143 --- Comment #1 from Eric Hoffman --- I also found a few other places where the "sigwaitset" state variable shoul= d be checked. Probably most of the places where "sigmask" is checked. In fact, sigmask should probably always be "masked" by the bits present in "sigwaits= et". When such a bit is present in sigwait set, normal signal dispatch routines should take places as if the sigmask bit wasn't set, with the exception that the end result is the same as if the signal action handler was set to SIG_I= GN. --=20 You are receiving this mail because: You are the QA Contact for the bug. You are on the CC list for the bug. >>From ecos-bugs-return-11104-listarch-ecos-bugs=sources.redhat.com@sourceware.org Wed Apr 20 04:41:11 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 21278 invoked by alias); 20 Apr 2016 04:41:10 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 21245 invoked by uid 89); 20 Apr 2016 04:41:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_40,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=awaken, ecosdiscuss, ecos-discuss, Architecture X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Apr 2016 04:40:59 +0000 Received: by mail.ecoscentric.com (Postfix, from userid 512) id 85208A8914F; Wed, 20 Apr 2016 05:40:56 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.ecoscentric.com 85208A8914F X-Original-To: unassigned@bugs.ecos.sourceware.org Delivered-To: unassigned@bugs.ecos.sourceware.org From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: unassigned@bugs.ecos.sourceware.org Subject: [Bug 1002143] New: sigwait does not wake up on blocked signals. Date: Wed, 20 Apr 2016 04:58:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter qa_contact cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00045.txt.bz2 Content-length: 4952 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002143 Bug ID: 1002143 Summary: sigwait does not wake up on blocked signals. Product: eCos Version: 3.0 Target: All Architecture/Host_ Other OS: Status: UNCONFIRMED Severity: enhancement Priority: low Component: POSIX Assignee: unassigned@bugs.ecos.sourceware.org Reporter: ehoffman@positronaccess.com QA Contact: ecos-bugs@ecos.sourceware.org CC: ecos-bugs@ecos.sourceware.org Hello I came into the same problem as discussed in 2009 in the mailing list Ref: https://sourceware.org/ml/ecos-discuss/2009-09/msg00159.html The discussion thread ended up short with no real satisfactory answer, and = I do think the original question is really pointing a bug. Basically, the issue is that if you have a pthread, and in that POSIX thread you block some signals (SIGUSR1 for example), and you do a sigwait, waiting= for that signal, then the thread is supposed to wait for that signal to be in t= he signal queue, and return when the signal is present in the queue (removing = it from the signal queue). It is normal behavior to wait on blocked signals, sigwait POSIX documentation say that the signal should be blocked before calling sigwait. This is to prevent signal handler from dispatching the si= gnal and removing it from the queue: [...]If no signal in set is pending at the time of the call, the thread sha= ll be suspended until one or more becomes pending. The signals defined by set shall have been blocked at the time of the call to sigwait(); otherwise, the behavior is undefined[...] So, the normal usage is is as follow: - Thread X (pthread) block a specific signal, using pthread_sigmask(). - Thread X call sigwait(), waiting for that signal to be present in the sig= nal set/queue. - Thread Y call pthread_kill(), sending signal to thread X. - Thread X get the signal in the queue (or from the signal set). Since the signal is blocked, no signal handler is called. However, since you have ca= lled sigwait(), the sigwait() function returns and remove the signal from the qu= eue. If thread Y sends the signal to thread X before thread X call sigwait(), the signal is set in thread X. Nothing happen since it's blocked in thread X w= ith the previous call to pthread_sigmask(). However, as soon as thread X call sigwait(), sigwait() returns immediately (removing the signal from the queu= e).=20 That behavior is properly respected by eCos. If thread X call sigwait() before it receive a signal, it goes to sleep, waiting for signal. When thread Y send signal to thread X (using pthread_kill), the signal is then put in thread Y signal queue (or signal s= et). Thread Y then wake up and "consume" the signal, returning from sigwait().= =20 That is NOT working in eCos, and it's what's discussed in the mailing list I mentioned above. I also checked and confirmed that this behavior seem to be related to the c= ode in signal.cxx: if( thread !=3D NULL ) { sigaddset( &thread->sigpending, signo ); // just wake the thread up now if it's blocked somewhere if ((thread->sigpending & ~thread->sigmask) !=3D 0) { thread->thread->set_asr_pending(); thread->thread->release(); } } This code will wake up the thread ONLY if the signal is not blocked in the thread. This behavior is erroneous. If the signal is blocked in the recei= ving thread, it MUST be awaken if the receiving thread is waiting for signal (sigwait/sigtimedwait). However the behavior is correct if the receiving thread is sleeping for other reasons. So, to correct the behavior, a new state variable is required on the receiv= ing thread to indicate that the thread is actively waiting for signal. The thr= ead must be awaken if either the signal is unblocked, or if the thread is waiti= ng for the specified signal. Something that goes like: if ((thread->sigpending & (~thread->sigmask | thread->sigwaitset)) !=3D 0) ... thread->sigwaitset should be set before putting thread to sleep (before cal= ling signal_sigwait.wait()), and cleared after awaking from sleep. This is applicable to both cyg_sigqueue() function and in cyg_posix_pthread_release_thread() function in signal.cxx. Also, the sigwait family can return EAGAIN in case of timeout (sigtimedwait) and EINTR in case of interruption by a signal other than the signals the sigwait/sigtimedwait was waiting for (which wasn't blocked). eCos now only have hardcoded EAGAIN. EAGAIN must only be used for when timeout occur.=20 Otherwise, EINTR must be returned. So when returning from the signal_sigwait.wait() function, the wake reason must be checked (and not ju= st hardcode EGAIN). Regards, Eric Hoffman --=20 You are receiving this mail because: You are the assignee for the bug. >>From ecos-bugs-return-11107-listarch-ecos-bugs=sources.redhat.com@sourceware.org Wed Apr 20 12:36:03 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 116895 invoked by alias); 20 Apr 2016 12:36:03 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 116538 invoked by uid 89); 20 Apr 2016 12:36:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Block, Hx-languages-length:1739, Contact X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Apr 2016 12:35:52 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id B5B3DA8A6F3 for ; Wed, 20 Apr 2016 13:35:49 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (albus.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FYwm0YWqUsIb for ; Wed, 20 Apr 2016 13:35:48 +0100 (BST) From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: ecos-bugs@ecos.sourceware.org Subject: [Bug 1002144] New: pthread created from eCos thread have all signals disabled Date: Wed, 20 Apr 2016 12:36:00 -0000 X-Bugzilla-Reason: QAcontact CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter qa_contact cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00048.txt.bz2 Content-length: 1961 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002144 Bug ID: 1002144 Summary: pthread created from eCos thread have all signals disabled Product: eCos Version: 3.0 Target: All Architecture/Host_ Other OS: Status: UNCONFIRMED Severity: enhancement Priority: low Component: POSIX Assignee: unassigned@bugs.ecos.sourceware.org Reporter: ehoffman@positronaccess.com QA Contact: ecos-bugs@ecos.sourceware.org CC: ecos-bugs@ecos.sourceware.org When creating a POSIX thread from an eCos thread (by specifying PTHREAD_EXPLICIT_SCHED attribute and filling the appropriate attribute fiel= ds), the pthread is created with all signals blocked. externC void cyg_posix_thread_siginit( pthread_info *thread, pthread_info *parentthread ) { // Clear out signal masks sigemptyset( &thread->sigpending ); // but threads inherit signal masks if ( NULL =3D=3D parentthread ) { //sigemptyset( &thread->sigmask ); // Block all the signals if thread don't use signal sigfillset( &thread->sigmask ); } else thread->sigmask =3D parentthread->sigmask; cyg_pthread_exception_init( thread ); } when parent thread is NULL (which is the case when parent is eCos thread), sigmask is filled to "all blocked". This probably is not in line with what a user would expect, and make porting existing code error-prone. User (programmer) could have some hard figuring= why the thread is not responding to signals unless explicitly unmasking them.. I would suggest using sigemptyset instead of sigfillset. Regards, Eric Hoffman --=20 You are receiving this mail because: You are the QA Contact for the bug. You are on the CC list for the bug. >>From ecos-bugs-return-11106-listarch-ecos-bugs=sources.redhat.com@sourceware.org Wed Apr 20 04:58:53 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 113068 invoked by alias); 20 Apr 2016 04:58:53 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 113051 invoked by uid 89); 20 Apr 2016 04:58:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Apr 2016 04:58:32 +0000 Received: by mail.ecoscentric.com (Postfix, from userid 512) id 768B6A8A6B8; Wed, 20 Apr 2016 05:58:29 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.ecoscentric.com 768B6A8A6B8 X-Original-To: unassigned@bugs.ecos.sourceware.org Delivered-To: unassigned@bugs.ecos.sourceware.org From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: unassigned@bugs.ecos.sourceware.org Subject: [Bug 1002143] sigwait does not wake up on blocked signals. Date: Wed, 20 Apr 2016 12:36:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00047.txt.bz2 Content-length: 734 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002143 --- Comment #1 from Eric Hoffman --- I also found a few other places where the "sigwaitset" state variable shoul= d be checked. Probably most of the places where "sigmask" is checked. In fact, sigmask should probably always be "masked" by the bits present in "sigwaits= et". When such a bit is present in sigwait set, normal signal dispatch routines should take places as if the sigmask bit wasn't set, with the exception that the end result is the same as if the signal action handler was set to SIG_I= GN. --=20 You are receiving this mail because: You are the assignee for the bug. >>From ecos-bugs-return-11109-listarch-ecos-bugs=sources.redhat.com@sourceware.org Wed Apr 20 12:42:37 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 87861 invoked by alias); 20 Apr 2016 12:42:37 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 85780 invoked by uid 89); 20 Apr 2016 12:42:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:691, Contact X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Apr 2016 12:42:26 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 9F8F1A8A6F8 for ; Wed, 20 Apr 2016 13:42:23 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (albus.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bccE5dWkLWnP for ; Wed, 20 Apr 2016 13:42:23 +0100 (BST) From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: ecos-bugs@ecos.sourceware.org Subject: [Bug 1002144] pthread created from eCos thread have all signals disabled Date: Wed, 20 Apr 2016 12:42:00 -0000 X-Bugzilla-Reason: QAcontact CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: NOTABUG X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00050.txt.bz2 Content-length: 719 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002144 Eric Hoffman changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |NOTABUG --- Comment #1 from Eric Hoffman --- It seem this source was taken from a branch where the author modified that file. It's correct in eCos original branch. --=20 You are receiving this mail because: You are the QA Contact for the bug. You are on the CC list for the bug. >>From ecos-bugs-return-11108-listarch-ecos-bugs=sources.redhat.com@sourceware.org Wed Apr 20 12:36:05 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 118121 invoked by alias); 20 Apr 2016 12:36:05 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 117678 invoked by uid 89); 20 Apr 2016 12:36:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Block, Contact X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Apr 2016 12:35:52 +0000 Received: by mail.ecoscentric.com (Postfix, from userid 512) id BFE67A8A6F4; Wed, 20 Apr 2016 13:35:49 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.ecoscentric.com BFE67A8A6F4 X-Original-To: unassigned@bugs.ecos.sourceware.org Delivered-To: unassigned@bugs.ecos.sourceware.org From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: unassigned@bugs.ecos.sourceware.org Subject: [Bug 1002144] New: pthread created from eCos thread have all signals disabled Date: Wed, 20 Apr 2016 12:42:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter qa_contact cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00049.txt.bz2 Content-length: 1923 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002144 Bug ID: 1002144 Summary: pthread created from eCos thread have all signals disabled Product: eCos Version: 3.0 Target: All Architecture/Host_ Other OS: Status: UNCONFIRMED Severity: enhancement Priority: low Component: POSIX Assignee: unassigned@bugs.ecos.sourceware.org Reporter: ehoffman@positronaccess.com QA Contact: ecos-bugs@ecos.sourceware.org CC: ecos-bugs@ecos.sourceware.org When creating a POSIX thread from an eCos thread (by specifying PTHREAD_EXPLICIT_SCHED attribute and filling the appropriate attribute fiel= ds), the pthread is created with all signals blocked. externC void cyg_posix_thread_siginit( pthread_info *thread, pthread_info *parentthread ) { // Clear out signal masks sigemptyset( &thread->sigpending ); // but threads inherit signal masks if ( NULL =3D=3D parentthread ) { //sigemptyset( &thread->sigmask ); // Block all the signals if thread don't use signal sigfillset( &thread->sigmask ); } else thread->sigmask =3D parentthread->sigmask; cyg_pthread_exception_init( thread ); } when parent thread is NULL (which is the case when parent is eCos thread), sigmask is filled to "all blocked". This probably is not in line with what a user would expect, and make porting existing code error-prone. User (programmer) could have some hard figuring= why the thread is not responding to signals unless explicitly unmasking them.. I would suggest using sigemptyset instead of sigfillset. Regards, Eric Hoffman --=20 You are receiving this mail because: You are the assignee for the bug. >>From ecos-bugs-return-11110-listarch-ecos-bugs=sources.redhat.com@sourceware.org Wed Apr 20 12:42:37 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 88817 invoked by alias); 20 Apr 2016 12:42:37 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 85779 invoked by uid 89); 20 Apr 2016 12:42:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:653 X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Apr 2016 12:42:26 +0000 Received: by mail.ecoscentric.com (Postfix, from userid 512) id A8ABEA8A6BA; Wed, 20 Apr 2016 13:42:23 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.ecoscentric.com A8ABEA8A6BA X-Original-To: unassigned@bugs.ecos.sourceware.org Delivered-To: unassigned@bugs.ecos.sourceware.org From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: unassigned@bugs.ecos.sourceware.org Subject: [Bug 1002144] pthread created from eCos thread have all signals disabled Date: Wed, 20 Apr 2016 12:43:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: NOTABUG X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00051.txt.bz2 Content-length: 681 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002144 Eric Hoffman changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |NOTABUG --- Comment #1 from Eric Hoffman --- It seem this source was taken from a branch where the author modified that file. It's correct in eCos original branch. --=20 You are receiving this mail because: You are the assignee for the bug. >>From ecos-bugs-return-11111-listarch-ecos-bugs=sources.redhat.com@sourceware.org Wed Apr 20 12:43:05 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 1036 invoked by alias); 20 Apr 2016 12:43:05 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 1015 invoked by uid 89); 20 Apr 2016 12:43:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Apr 2016 12:42:55 +0000 Received: by mail.ecoscentric.com (Postfix, from userid 512) id 6F52CA8A6F4; Wed, 20 Apr 2016 13:42:52 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.ecoscentric.com 6F52CA8A6F4 X-Original-To: unassigned@bugs.ecos.sourceware.org Delivered-To: unassigned@bugs.ecos.sourceware.org From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: unassigned@bugs.ecos.sourceware.org Subject: [Bug 1002144] pthread created from eCos thread have all signals disabled Date: Wed, 20 Apr 2016 12:43:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: CLOSED X-Bugzilla-Resolution: NOTABUG X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00052.txt.bz2 Content-length: 529 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002144 Eric Hoffman changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #2 from Eric Hoffman --- Closing it. Regards, Eric --=20 You are receiving this mail because: You are the assignee for the bug. >>From ecos-bugs-return-11113-listarch-ecos-bugs=sources.redhat.com@sourceware.org Thu Apr 21 03:29:08 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 80795 invoked by alias); 21 Apr 2016 03:29:08 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 80770 invoked by uid 89); 21 Apr 2016 03:29:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1031 X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 21 Apr 2016 03:28:55 +0000 Received: by mail.ecoscentric.com (Postfix, from userid 512) id 4DE8DA891D0; Thu, 21 Apr 2016 04:28:51 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.ecoscentric.com 4DE8DA891D0 X-Original-To: unassigned@bugs.ecos.sourceware.org Delivered-To: unassigned@bugs.ecos.sourceware.org From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: unassigned@bugs.ecos.sourceware.org Subject: [Bug 1002143] sigwait does not wake up on blocked signals. Date: Thu, 21 Apr 2016 03:29:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00054.txt.bz2 Content-length: 989 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002143 --- Comment #2 from Eric Hoffman --- Created attachment 2691 --> http://bugs.ecos.sourceware.org/attachment.cgi?id=3D2691&action=3Dedit pthread fix for bug 1002142 and 1002143 I made a patch for bug 1002142 and 1002143. Basically this create a new state variable that track when you do a sigwait/sigtimedwait/sigwaitinfo. When queuing a signal, it will wake the target thread not only if the signal is unmasked, but also even if it's mas= ked, but the target thread is sleeping waiting for signals. Also fix the EAGAIN and EINTR return codes for sigwait functions (POSIX compliant). And fixed the issue with crash when passing NULL info parameter to sigwaiti= nfo and sigtimedwait. POSIX do allow to pass NULL info parameter. So this is open for review :-) --=20 You are receiving this mail because: You are the assignee for the bug. >>From ecos-bugs-return-11112-listarch-ecos-bugs=sources.redhat.com@sourceware.org Wed Apr 20 12:43:06 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 1044 invoked by alias); 20 Apr 2016 12:43:05 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 1013 invoked by uid 89); 20 Apr 2016 12:43:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Contact X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Apr 2016 12:42:54 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 662E2A89869 for ; Wed, 20 Apr 2016 13:42:52 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (albus.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k8BlWBguMRAp for ; Wed, 20 Apr 2016 13:42:52 +0100 (BST) From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: ecos-bugs@ecos.sourceware.org Subject: [Bug 1002144] pthread created from eCos thread have all signals disabled Date: Thu, 21 Apr 2016 03:29:00 -0000 X-Bugzilla-Reason: QAcontact CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: CLOSED X-Bugzilla-Resolution: NOTABUG X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00053.txt.bz2 Content-length: 567 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002144 Eric Hoffman changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #2 from Eric Hoffman --- Closing it. Regards, Eric --=20 You are receiving this mail because: You are the QA Contact for the bug. You are on the CC list for the bug. >>From ecos-bugs-return-11114-listarch-ecos-bugs=sources.redhat.com@sourceware.org Thu Apr 21 03:29:09 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 80801 invoked by alias); 21 Apr 2016 03:29:08 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 80771 invoked by uid 89); 21 Apr 2016 03:29:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Contact X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 21 Apr 2016 03:28:55 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 403D9A8A02F for ; Thu, 21 Apr 2016 04:28:51 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (albus.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DW5SYVaxuL16 for ; Thu, 21 Apr 2016 04:28:50 +0100 (BST) From: bugzilla-daemon@ecoscentric.com Authentication-Results: mail.ecoscentric.com; dkim=permerror (bad message/signature format) To: ecos-bugs@ecos.sourceware.org Subject: [Bug 1002143] sigwait does not wake up on blocked signals. Date: Sun, 24 Apr 2016 22:55:00 -0000 X-Bugzilla-Reason: QAcontact CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: POSIX X-Bugzilla-Version: 3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ehoffman@positronaccess.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2016/txt/msg00055.txt.bz2 Content-length: 1027 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002143 --- Comment #2 from Eric Hoffman --- Created attachment 2691 --> http://bugs.ecos.sourceware.org/attachment.cgi?id=3D2691&action=3Dedit pthread fix for bug 1002142 and 1002143 I made a patch for bug 1002142 and 1002143. Basically this create a new state variable that track when you do a sigwait/sigtimedwait/sigwaitinfo. When queuing a signal, it will wake the target thread not only if the signal is unmasked, but also even if it's mas= ked, but the target thread is sleeping waiting for signals. Also fix the EAGAIN and EINTR return codes for sigwait functions (POSIX compliant). And fixed the issue with crash when passing NULL info parameter to sigwaiti= nfo and sigtimedwait. POSIX do allow to pass NULL info parameter. So this is open for review :-) --=20 You are receiving this mail because: You are the QA Contact for the bug. You are on the CC list for the bug. >>From ecos-bugs-return-11115-listarch-ecos-bugs=sources.redhat.com@sourceware.org Sun Apr 24 22:55:18 2016 Return-Path: Delivered-To: listarch-ecos-bugs@sources.redhat.com Received: (qmail 83637 invoked by alias); 24 Apr 2016 22:55:17 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org Delivered-To: mailing list ecos-bugs@sourceware.org Received: (qmail 83628 invoked by uid 89); 24 Apr 2016 22:55:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=HAL, urls, ethernet, viewed X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 24 Apr 2016 22:55:06 +0000 Received: by mail.ecoscentric.com (Postfix, from userid 512) id 779B1A8A700; Sun, 24 Apr 2016 23:55:02 +0100 (BST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.ecoscentric.com 779B1A8A700 X-Original-To: unassigned@bugs.ecos.sourceware.org Delivered-To: unassigned@bugs.ecos.sourceware.org Content-Transfer-Encoding: quoted-printable DKIM-Filter: OpenDKIM Filter v2.10.3 mail.ecoscentric.com A5C70A8A700 Content-Type: text/plain; charset="UTF-8" From: bugzilla-daemon@ecoscentric.com To: unassigned@bugs.ecos.sourceware.org Subject: Your Bugzilla bug list needs attention. X-Bugzilla-Type: whine Date: Sun, 01 May 2016 22:55:00 -0000 X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 Message-Id: <20160424225501.A5C70A8A700@mail.ecoscentric.com> X-SW-Source: 2016/txt/msg00056.txt.bz2 Content-length: 3567 [This e-mail has been automatically generated.] You have one or more bugs assigned to you in the Bugzilla bug tracking syst= em (http://bugs.ecos.sourceware.org/) that require attention. All of these bugs are in the CONFIRMED state, and have not been touched in 7 days or more. You need to take a look at them, and decide on an initial action. Generally, this means one of three things: (1) You decide this bug is really quick to deal with (like, it's INVALID), and so you get rid of it immediately. (2) You decide the bug doesn't belong to you, and you reassign it to someone else. (Hint: if you don't know who to reassign it to, make sure that the Component field seems reasonable, and then use the "Reset Assignee to default" option.) (3) You decide the bug belongs to you, but you can't solve it this moment. Accept the bug by setting the status to IN_PROGRESS. To get a list of all CONFIRMED bugs, you can use this URL (bookmark it if you like!): http://bugs.ecos.sourceware.org/buglist.cgi?bug_status=3DCONFIRMED&assigned= _to=3Dunassigned@bugs.ecos.sourceware.org Or, you can use the general query page, at=20 http://bugs.ecos.sourceware.org/query.cgi Appended below are the individual URLs to get to all of your CONFIRMED bugs that haven't been touched for 7 days or more. You will get this message once a day until you've dealt with these bugs! STM32 USB driver unplugging/replugging issue -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001084 Navigation of the documentation using PREV NEXT PARENT arrows broken -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001146 help documentation tree does not correspond to viewed document -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001148 documentation tree in navigation panel does not open at viewed document -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001149 CAN loopback driver requires CYGPKG_DEVS_CAN_LOOP_CAN[01] -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001211 eCos GNU tools 4.6.3 -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001468 Fix compiler warnings about mismatch between log() format string and argum= ent values. -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001510 Array index out of bounds in tftp_server.c -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001522 Cortex-M: Remote 'g' packet reply is too long -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001524 BSD nc_test_slave chrashes -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001586 [RFC] eCos FLASH startup from RedBoot -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001623 Kinetis variant HAL patch: mostly cosmetic and descriptive improvements -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001783 Kinetis DSPI, flash and platform HAL tidies -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001784 Data not relocated to RAM during ROMINT startup -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001864 Freescale ENET support fot little endian. -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002114 KSZ8081 Ethernet PHY driver. -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002115 Prepare Kinetis for Gen2 K -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002116 Freescale UART - some macros for advanced serial buffers. -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002117 outdated expectations in documentation -> http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1002126