BERTRAND Joël | 15 Apr 21:23 2008
Picon

sigpending

	Hello,

	I have written a subroutine that perfectly work on several Unices 
(Solaris, Linux, Tru64, HP-UX). This subroutine can be compiled on 
NetBSD 4.0 without any error, but doesn't work. I have done some test 
and I have see that sigsuspend seems to return 0 even if a signal is 
caught. I have seen that sigsuspend doesn't work in NetBSD 3.1, but I 
haven't found any information about sigsuspend on NetBSD 4.0. Any news ?

	Regards,

	JKB

Manuel Bouyer | 15 Apr 21:56 2008

Re: sigpending

On Tue, Apr 15, 2008 at 09:23:04PM +0200, BERTRAND Joël wrote:
> 	Hello,
> 
> 	I have written a subroutine that perfectly work on several Unices 
> (Solaris, Linux, Tru64, HP-UX). This subroutine can be compiled on 
> NetBSD 4.0 without any error, but doesn't work. I have done some test 
> and I have see that sigsuspend seems to return 0 even if a signal is 
> caught. I have seen that sigsuspend doesn't work in NetBSD 3.1, but I 
> haven't found any information about sigsuspend on NetBSD 4.0. Any news ?

sigsuspend seems to work fine for me, on both NetBSD 3.1 and 4.0, using
the test program below (that is, sigsuspend returns -1 when SIGUSR1
is sent to the process)

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>

void handler(int sig)
{
        printf("signal %d\n", sig);
}

main()
{
        sigset_t sigset;
        struct sigaction act;
        int ret;

(Continue reading)

BERTRAND Joël | 15 Apr 22:06 2008
Picon

Re: sigpending

Manuel Bouyer a écrit :
> On Tue, Apr 15, 2008 at 09:23:04PM +0200, BERTRAND Joël wrote:
>> 	Hello,
>>
>> 	I have written a subroutine that perfectly work on several Unices 
>> (Solaris, Linux, Tru64, HP-UX). This subroutine can be compiled on 
>> NetBSD 4.0 without any error, but doesn't work. I have done some test 
>> and I have see that sigsuspend seems to return 0 even if a signal is 
>> caught. I have seen that sigsuspend doesn't work in NetBSD 3.1, but I 
>> haven't found any information about sigsuspend on NetBSD 4.0. Any news ?
> 
> sigsuspend seems to work fine for me, on both NetBSD 3.1 and 4.0, using
> the test program below (that is, sigsuspend returns -1 when SIGUSR1
> is sent to the process)

	Sorry, not sigsuspend, sigpending. Sigsuspend works fine.

	Regards,

	JKB

Manuel Bouyer | 15 Apr 22:29 2008

Re: sigpending

On Tue, Apr 15, 2008 at 10:06:05PM +0200, BERTRAND Joël wrote:
> Manuel Bouyer a écrit :
> >On Tue, Apr 15, 2008 at 09:23:04PM +0200, BERTRAND Joël wrote:
> >>	Hello,
> >>
> >>	I have written a subroutine that perfectly work on several Unices 
> >>(Solaris, Linux, Tru64, HP-UX). This subroutine can be compiled on 
> >>NetBSD 4.0 without any error, but doesn't work. I have done some test 
> >>and I have see that sigsuspend seems to return 0 even if a signal is 
> >>caught. I have seen that sigsuspend doesn't work in NetBSD 3.1, but I 
> >>haven't found any information about sigsuspend on NetBSD 4.0. Any news ?
> >
> >sigsuspend seems to work fine for me, on both NetBSD 3.1 and 4.0, using
> >the test program below (that is, sigsuspend returns -1 when SIGUSR1
> >is sent to the process)
> 
> 	Sorry, not sigsuspend, sigpending. Sigsuspend works fine.

Hum. When you says it always returns 0, do you mean the integer returned
by the function, or the sigset_t passed as pointer ?
Reading the man page it seems OK for the function to always return 0.

--

-- 
Manuel Bouyer <bouyer <at> antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--

Manuel Bouyer | 15 Apr 22:37 2008

Re: sigpending

On Tue, Apr 15, 2008 at 10:29:35PM +0200, Manuel Bouyer wrote:
> Hum. When you says it always returns 0, do you mean the integer returned
> by the function, or the sigset_t passed as pointer ?
> Reading the man page it seems OK for the function to always return 0.

It seems I couldn't get sigpending() working either :(

--

-- 
Manuel Bouyer <bouyer <at> antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--

BERTRAND Joël | 16 Apr 08:38 2008
Picon

Re: sigpending

Manuel Bouyer a écrit :
> On Tue, Apr 15, 2008 at 10:29:35PM +0200, Manuel Bouyer wrote:
>> Hum. When you says it always returns 0, do you mean the integer returned
>> by the function, or the sigset_t passed as pointer ?
>> Reading the man page it seems OK for the function to always return 0.
> 
> It seems I couldn't get sigpending() working either :(

	I was tired when I have written this mail. Of course, on NetBSD, 
sigpending always returns 0. On Solaris and Linux, it can returns -1. 
Thus, I have written :

         if (sigpending(&set) != 0)
         {
             (*s_etat_processus).erreur_systeme = d_es_processus;
         }
         else if (sigismember(&set, SIGSTART) == 0)
         {
             while(sigismember(&set, SIGSTART) == 0)
             {
                 if (sigpending(&set) != 0)
                 {
                     (*s_etat_processus).erreur_systeme = d_es_processus;
                 }

                 nanosleep(&attente, NULL);
             }
         }

and 'set' is not modified by sigpending even if I send a blocked signal 
(Continue reading)

Manuel Bouyer | 1 May 15:55 2008

MP kernel doesn't boot

Hi,
An up-to-date current fails to boot on a dual-CPU ss10
(SPARCstation 10 MP (2 X 390Z55), No Keyboard):

Rebooting with command:                                               
Boot device: /iommu/sbus/espdma <at> f,400000/esp <at> f,800000/sd <at> 3,0  File and args: 
>> NetBSD/sparc Secondary Boot, Revision 1.15
>> (builds <at> b0.netbsd.org, Mon Apr 28 21:05:09 UTC 2008)
Booting netbsd
3444696+99664+327156 [228144+216910]=0x42e170
OBP version 3, revision 2.25 (plugin rev 2)
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 4.99.62 (GENERIC.MP) #1: Thu May  1 15:09:15 CEST 2008
        bouyer <at> rock:/dsk/l1/misc/bouyer/tmp/sparc/obj/dsk/l1/misc/bouyer/current/src/sys/arch/sparc/compile/GENERIC.MP
total memory = 111 MB
avail memory = 104 MB
data fault: pc=0xf01de5c0 addr=0x0 sfsr=126<PERR=0,LVL=1,AT=1,FT=1,FAV,OW>
data fault: pc=0xf01e3c00 addr=0x0 sfsr=126<PERR=0,LVL=1,AT=1,FT=1,FAV,OW>
data fault: pc=0xf01e3c00 addr=0x0 sfsr=126<PERR=0,LVL=1,AT=1,FT=1,FAV,OW>
[...]
data fault: pc=0xf01e3c00 addr=0x0 sfsr=126<PERR=0,LVL=1,AT=1,FT=1,FAV,OW>
trap type 0x2: pc=0xf0002000 npc=0xf0002004 psr=40000fc4<S,PS>
trap type 0x2: pc=0xf0002000 npc=0xf0002004 psr=40000fc1<S,PS>
trap type 0x2: pc=0xf0002000 npc=0xf0002004 psr=40000fc6<S,PS>
trap type 0x2: pc=0xf0002000 npc=0xf0002004 psr=40000fc3<S,PS>
(Continue reading)

Steven F Siirila | 1 May 17:34 2008
Picon

Re: MP kernel doesn't boot

On Thu, May 01, 2008 at 03:55:11PM +0200, Manuel Bouyer wrote:
> Hi,
> An up-to-date current fails to boot on a dual-CPU ss10
> (SPARCstation 10 MP (2 X 390Z55), No Keyboard):

FWIW, I'll register my interest in this being resolved as well.

> Rebooting with command:                                               
> Boot device: /iommu/sbus/espdma <at> f,400000/esp <at> f,800000/sd <at> 3,0  File and args: 
> >> NetBSD/sparc Secondary Boot, Revision 1.15
> >> (builds <at> b0.netbsd.org, Mon Apr 28 21:05:09 UTC 2008)
> Booting netbsd
> 3444696+99664+327156 [228144+216910]=0x42e170
> OBP version 3, revision 2.25 (plugin rev 2)
> Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
>     2006, 2007, 2008
>     The NetBSD Foundation, Inc.  All rights reserved.
> Copyright (c) 1982, 1986, 1989, 1991, 1993
>     The Regents of the University of California.  All rights reserved.
> 
> NetBSD 4.99.62 (GENERIC.MP) #1: Thu May  1 15:09:15 CEST 2008
>         bouyer <at> rock:/dsk/l1/misc/bouyer/tmp/sparc/obj/dsk/l1/misc/bouyer/current/src/sys/arch/sparc/compile/GENERIC.MP
> total memory = 111 MB
> avail memory = 104 MB
> data fault: pc=0xf01de5c0 addr=0x0 sfsr=126<PERR=0,LVL=1,AT=1,FT=1,FAV,OW>
> data fault: pc=0xf01e3c00 addr=0x0 sfsr=126<PERR=0,LVL=1,AT=1,FT=1,FAV,OW>
> data fault: pc=0xf01e3c00 addr=0x0 sfsr=126<PERR=0,LVL=1,AT=1,FT=1,FAV,OW>
> [...]
> data fault: pc=0xf01e3c00 addr=0x0 sfsr=126<PERR=0,LVL=1,AT=1,FT=1,FAV,OW>
> trap type 0x2: pc=0xf0002000 npc=0xf0002004 psr=40000fc4<S,PS>
(Continue reading)


Gmane