Re: Do anyone has any problem with sem_open() crash?

2006-10-23 Thread Robert Watson


On Sun, 22 Oct 2006, Kris Kennaway wrote:


On Sun, Oct 22, 2006 at 08:48:20PM -0500, Jeremy Messenger wrote:

I guess I am safe then as I can ignore these cores.. Thanks! Isn't kernel 
supposed to be avoid the crash? I don't see any of crash before I upgraded 
to last night of RELENG_6.


It's not a crash, it's a configure script testing whether the syscall 
exists, and the the test program gets the signal 12 to tell it that it 
doesn't. This is expected behaviour.


We have several levels of "But that's not implemented".  The level used for 
system calls that are simply not defined is SIGSYS+ENOSYS.  By default, 
application calling these (undefined) system calls can catch the error if they 
choose to, but will exit otherwise.  The next level is to provide ENOSYS stubs 
that return ENOSYS without generating SIGSYS; in some situations, this is 
preferred.  For example, we use this when AUDIT isn't compiled into the kernel 
but login(1) calls an audit system call to see if audit is present.  Finally, 
there are a number of situations where a system call is implemented, but the 
underlying object doesn't support the operation, in which case we often return 
EOPNOTSUPP or variations on that them.


The SIGSYS+ENOSYS error code isn't a bug, but it seems likely that configure 
would be a lot happier if we returned ENOSYS without SIGSYS.  Right now, that 
means hand-defining a stub that's conditionally compiled based on the feature 
not being present.  It might be nicer if we had a way to indicate that in the 
system call table.


Robert N M Watson
Computer Laboratory
University of Cambridge
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Do anyone has any problem with sem_open() crash?

2006-10-22 Thread Jeremy Messenger
On Sun, 22 Oct 2006 21:01:19 -0500, Kris Kennaway <[EMAIL PROTECTED]>  
wrote:



On Sun, Oct 22, 2006 at 08:48:20PM -0500, Jeremy Messenger wrote:

I guess I am safe then as I can ignore these cores.. Thanks! Isn't  
kernel
supposed to be avoid the crash? I don't see any of crash before I  
upgraded

to last night of RELENG_6.


It's not a crash, it's a configure script testing whether the syscall
exists, and the the test program gets the signal 12 to tell it that it
doesn't. This is expected behaviour.


Ok, thanks for explain.

Cheers,
Mezz


Kris



--
[EMAIL PROTECTED]  -  [EMAIL PROTECTED]
FreeBSD GNOME Team  -  FreeBSD Multimedia Hat (ports, not src)
http://www.FreeBSD.org/gnome/  -  [EMAIL PROTECTED]
http://wiki.freebsd.org/multimedia  -  [EMAIL PROTECTED]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Do anyone has any problem with sem_open() crash?

2006-10-22 Thread Kris Kennaway
On Sun, Oct 22, 2006 at 08:48:20PM -0500, Jeremy Messenger wrote:

> I guess I am safe then as I can ignore these cores.. Thanks! Isn't kernel  
> supposed to be avoid the crash? I don't see any of crash before I upgraded  
> to last night of RELENG_6.

It's not a crash, it's a configure script testing whether the syscall
exists, and the the test program gets the signal 12 to tell it that it
doesn't. This is expected behaviour.

Kris


pgpFRCa01BPKt.pgp
Description: PGP signature


Re: Do anyone has any problem with sem_open() crash?

2006-10-22 Thread Jeremy Messenger

On Sun, 22 Oct 2006 20:40:54 -0500, Jeremy Messenger <[EMAIL PROTECTED]> wrote:

On Sun, 22 Oct 2006 20:30:40 -0500, Kris Kennaway <[EMAIL PROTECTED]>  
wrote:



On Sun, Oct 22, 2006 at 08:09:30PM -0500, Jeremy Messenger wrote:

Hello folks,

Last night, I have upgraded from July RELENG_6 to last night. I have
reinstalled all of ports and I noticed that the log/messages is  
collecting
a few of 'pid 14699 (conftest), uid 0: exited on signal 12 (core  
dumped)'.

I dig in the configure and found a location of crash. It is from
sem_open(). I don't get that before I upgraded the RELENG_6.

http://people.freebsd.org/~mezz/test-sem_open.cc (took from configure's
conftest)


That's "bad system call" - probably you don't have SYSVSEM support
enabled.


I have not change kernel config for a very long time. I have these  
enabled:


options SYSVSHM # SYSV-style shared memory
options SYSVMSG # SYSV-style message queues
options SYSVSEM # SYSV-style semaphores

More: http://people.freebsd.org/~mezz/OUTLAWS

As for the /boot/loader.conf:

kern.maxfiles="25000"
linux_load="YES"
nvidia_load="YES"


Just to fill out one more detail. ;-)

/etc/sysctl.conf:

vfs.usermount=1
kern.ipc.shmmax=67108864
kern.ipc.shmall=32768

Cheers,
Mezz


Cheers,
Mezz


Kris



--
[EMAIL PROTECTED]  -  [EMAIL PROTECTED]
FreeBSD GNOME Team  -  FreeBSD Multimedia Hat (ports, not src)
http://www.FreeBSD.org/gnome/  -  [EMAIL PROTECTED]
http://wiki.freebsd.org/multimedia  -  [EMAIL PROTECTED]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Do anyone has any problem with sem_open() crash?

2006-10-22 Thread Jeremy Messenger
On Sun, 22 Oct 2006 20:36:08 -0500, Joe Marcus Clarke  
<[EMAIL PROTECTED]> wrote:



On Sun, 2006-10-22 at 20:09 -0500, Jeremy Messenger wrote:

Hello folks,

Last night, I have upgraded from July RELENG_6 to last night. I have
reinstalled all of ports and I noticed that the log/messages is  
collecting
a few of 'pid 14699 (conftest), uid 0: exited on signal 12 (core  
dumped)'.

I dig in the configure and found a location of crash. It is from
sem_open(). I don't get that before I upgraded the RELENG_6.

http://people.freebsd.org/~mezz/test-sem_open.cc (took from configure's
conftest)

===
% c++ -o test-sem_open -O2 -fno-strict-aliasing -pipe -g -pthread -pipe
test-sem_open.cc
% ./test-sem_open
[1]5761 invalid system call (core dumped)  ./test-sem_open

% grep sem_open /var/log/messages
Oct 22 19:44:35 mezz kernel: pid 5761 (test-sem_open), uid 1001: exited  
on

signal 12 (core dumped)
Oct 22 20:00:45 mezz kernel: pid 6140 (test-sem_open), uid 1001: exited  
on

signal 12 (core dumped)
===

I have decided to login in a jail that has RELENG_6 from July in the  
same

local machine that have most debug enable.

===
$ gdb test-sem_open test-sem_open.core

Core was generated by `test-sem_open'.
Program terminated with signal 12, Bad system call.

#0  0x281bf297 in ksem_open () at ksem_open.S:2
2   ksem_open.S: No such file or directory.
 in ksem_open.S
[New LWP 100120]


(gdb) bt
#0  0x281bf297 in ksem_open () at ksem_open.S:2
#1  0x281b5cd8 in __sem_open (name=0x804868e "ace_semaphore_foo",
oflag=2560)
 at /usr/src/lib/libc/gen/sem.c:217
#2  0x080485ee in main () at test-sem_open.cc:168
Current language:  auto; currently asm


(gdb) bt full
#0  0x281bf297 in ksem_open () at ksem_open.S:2
No locals.
#1  0x281b5cd8 in __sem_open (name=0x804868e "ace_semaphore_foo",
oflag=2560)
 at /usr/src/lib/libc/gen/sem.c:217
 sem = (sem_t *) 0xbfbfec9c
 s = 0x4e
 semid = 1
 mode = 78
 value = 1
#2  0x080485ee in main () at test-sem_open.cc:168
 s = (sem_t *) 0xa00
===

BTW: Please add me in CC, I am not on the list.


You need to make sure you have "options P1003_1B_SEMAPHORES" in your
kernel.  These POSIX IPC constructs are labeled as being very
experimental, and this is not a default option.


I guess I am safe then as I can ignore these cores.. Thanks! Isn't kernel  
supposed to be avoid the crash? I don't see any of crash before I upgraded  
to last night of RELENG_6.


Cheers,
Mezz


Joe



--
[EMAIL PROTECTED]  -  [EMAIL PROTECTED]
FreeBSD GNOME Team  -  FreeBSD Multimedia Hat (ports, not src)
http://www.FreeBSD.org/gnome/  -  [EMAIL PROTECTED]
http://wiki.freebsd.org/multimedia  -  [EMAIL PROTECTED]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Do anyone has any problem with sem_open() crash?

2006-10-22 Thread Jeremy Messenger
On Sun, 22 Oct 2006 20:30:40 -0500, Kris Kennaway <[EMAIL PROTECTED]>  
wrote:



On Sun, Oct 22, 2006 at 08:09:30PM -0500, Jeremy Messenger wrote:

Hello folks,

Last night, I have upgraded from July RELENG_6 to last night. I have
reinstalled all of ports and I noticed that the log/messages is  
collecting
a few of 'pid 14699 (conftest), uid 0: exited on signal 12 (core  
dumped)'.

I dig in the configure and found a location of crash. It is from
sem_open(). I don't get that before I upgraded the RELENG_6.

http://people.freebsd.org/~mezz/test-sem_open.cc (took from configure's
conftest)


That's "bad system call" - probably you don't have SYSVSEM support
enabled.


I have not change kernel config for a very long time. I have these enabled:

options SYSVSHM # SYSV-style shared memory
options SYSVMSG # SYSV-style message queues
options SYSVSEM # SYSV-style semaphores

More: http://people.freebsd.org/~mezz/OUTLAWS

As for the /boot/loader.conf:

kern.maxfiles="25000"
linux_load="YES"
nvidia_load="YES"

Cheers,
Mezz


Kris



--
[EMAIL PROTECTED]  -  [EMAIL PROTECTED]
FreeBSD GNOME Team  -  FreeBSD Multimedia Hat (ports, not src)
http://www.FreeBSD.org/gnome/  -  [EMAIL PROTECTED]
http://wiki.freebsd.org/multimedia  -  [EMAIL PROTECTED]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Do anyone has any problem with sem_open() crash?

2006-10-22 Thread Joe Marcus Clarke
On Sun, 2006-10-22 at 20:09 -0500, Jeremy Messenger wrote:
> Hello folks,
> 
> Last night, I have upgraded from July RELENG_6 to last night. I have  
> reinstalled all of ports and I noticed that the log/messages is collecting  
> a few of 'pid 14699 (conftest), uid 0: exited on signal 12 (core dumped)'.  
> I dig in the configure and found a location of crash. It is from  
> sem_open(). I don't get that before I upgraded the RELENG_6.
> 
> http://people.freebsd.org/~mezz/test-sem_open.cc (took from configure's  
> conftest)
> 
> ===
> % c++ -o test-sem_open -O2 -fno-strict-aliasing -pipe -g -pthread -pipe  
> test-sem_open.cc
> % ./test-sem_open
> [1]5761 invalid system call (core dumped)  ./test-sem_open
> 
> % grep sem_open /var/log/messages
> Oct 22 19:44:35 mezz kernel: pid 5761 (test-sem_open), uid 1001: exited on  
> signal 12 (core dumped)
> Oct 22 20:00:45 mezz kernel: pid 6140 (test-sem_open), uid 1001: exited on  
> signal 12 (core dumped)
> ===
> 
> I have decided to login in a jail that has RELENG_6 from July in the same  
> local machine that have most debug enable.
> 
> ===
> $ gdb test-sem_open test-sem_open.core
> 
> Core was generated by `test-sem_open'.
> Program terminated with signal 12, Bad system call.
> 
> #0  0x281bf297 in ksem_open () at ksem_open.S:2
> 2   ksem_open.S: No such file or directory.
>  in ksem_open.S
> [New LWP 100120]
> 
> 
> (gdb) bt
> #0  0x281bf297 in ksem_open () at ksem_open.S:2
> #1  0x281b5cd8 in __sem_open (name=0x804868e "ace_semaphore_foo",  
> oflag=2560)
>  at /usr/src/lib/libc/gen/sem.c:217
> #2  0x080485ee in main () at test-sem_open.cc:168
> Current language:  auto; currently asm
> 
> 
> (gdb) bt full
> #0  0x281bf297 in ksem_open () at ksem_open.S:2
> No locals.
> #1  0x281b5cd8 in __sem_open (name=0x804868e "ace_semaphore_foo",  
> oflag=2560)
>  at /usr/src/lib/libc/gen/sem.c:217
>  sem = (sem_t *) 0xbfbfec9c
>  s = 0x4e
>  semid = 1
>  mode = 78
>  value = 1
> #2  0x080485ee in main () at test-sem_open.cc:168
>  s = (sem_t *) 0xa00
> ===
> 
> BTW: Please add me in CC, I am not on the list.

You need to make sure you have "options P1003_1B_SEMAPHORES" in your
kernel.  These POSIX IPC constructs are labeled as being very
experimental, and this is not a default option.

Joe

-- 
PGP Key : http://www.marcuscom.com/pgp.asc


signature.asc
Description: This is a digitally signed message part


Re: Do anyone has any problem with sem_open() crash?

2006-10-22 Thread Kris Kennaway
On Sun, Oct 22, 2006 at 08:09:30PM -0500, Jeremy Messenger wrote:
> Hello folks,
> 
> Last night, I have upgraded from July RELENG_6 to last night. I have  
> reinstalled all of ports and I noticed that the log/messages is collecting  
> a few of 'pid 14699 (conftest), uid 0: exited on signal 12 (core dumped)'.  
> I dig in the configure and found a location of crash. It is from  
> sem_open(). I don't get that before I upgraded the RELENG_6.
> 
> http://people.freebsd.org/~mezz/test-sem_open.cc (took from configure's  
> conftest)

That's "bad system call" - probably you don't have SYSVSEM support
enabled.

Kris


pgpgUd5fxymm4.pgp
Description: PGP signature