__NR_exit_group for 2.4-O(1)
Hi all...
I am running glibc-2.3.1 on top of a hacked 2.4.21-pre2+aa, and all programs show a curious message at exit when straced:
strace ls:
...SYS_252(0, 0x1000, 0x156ad360, 0x156ae824, 0) = -1 ENOSYS (Function not implemented)_exit(0) = ?
252 is __NR_exit_group. I can not recover anything about this on MARC, is there any pointer to that for 2.4 ? Is it in -ac kernels ?
BTW: I remember to see some posts about this, but _how_ can I make the search engine in MARC to do _not_ convert underscores to spaces ("exit_group" -> "exit group", and results not be half the posts in LKML) ???
TIA
Signature · 4 lines
J.A. Magallon <[email protected]> \ Software is like sex: werewolf.able.es \ It's better when it's free Mandrake Linux release 9.1 (Cooker) for i586 Linux 2.4.21-pre2-jam2 (gcc 3.2.1 (Mandrake Linux 9.1 3.2.1-2mdk))
Quoted 4 lines · J.A. Magallon
Hi all...
I am running glibc-2.3.1 on top of a hacked 2.4.21-pre2+aa, and all programs show a curious message at exit when straced:
strace ls:
Quoted 8 lines
...
SYS_252(0, 0x1000, 0x156ad360, 0x156ae824, 0)= -1 ENOSYS (Function not implemented)_exit(0)= ?
252 is__NR_exit_group. I can not recover anything about this on MARC, is there any pointer to that for 2.4 ? Is it in -ac kernels ?
BTW: I remember to see some posts about this, but _how_ can I make the search engine in MARC to do _not_ convert underscores to spaces ("exit_group" -> "exit group", and results not be half the posts in LKML) ???
This is probably threading-related. They're trying to exit the program as a whole so exit_group() (by divination) would appear to be something that exits an entire thread group instead of that task alone.
It's probably somewhere in 2.5.x kernel source.
Bill
Quoted 4 lines · J.A. Magallon
Hi all...
I am running glibc-2.3.1 on top of a hacked 2.4.21-pre2+aa, and all programs show a curious message at exit when straced:
Maybe it would be a better idea to complain to the glibc folks?
Your libc isn't the one from RH's new beta, is it? :)
Quoted 8 lines · On 2003.01.03 Christoph Hellwig wrote:
Quoted 4 lines · J.A. Magallon
Hi all...
I am running glibc-2.3.1 on top of a hacked 2.4.21-pre2+aa, and all programs show a curious message at exit when straced:
Maybe it would be a better idea to complain to the glibc folks?
Oh, no complain, just trying to add one more feature to 2.4 ;)
Quoted 2 lines
Your libc isn't the one from RH's new beta, is it? :)
Nope, Mandrake Cooker glibc-2.3.1-6.
I understand it is a glibc bug, it should detect at build time if the call is available and omit it in 2.4...
Signature · 4 lines
J.A. Magallon <[email protected]> \ Software is like sex: werewolf.able.es \ It's better when it's free Mandrake Linux release 9.1 (Cooker) for i586 Linux 2.4.21-pre2-jam2 (gcc 3.2.1 (Mandrake Linux 9.1 3.2.1-2mdk))
Quoted 4 lines · J.A. Magallon
Quoted 2 lines
Your libc isn't the one from RH's new beta, is it? :)
Nope, Mandrake Cooker glibc-2.3.1-6.
glibc only tries to use sys_exit_group if the kernel headers it's compiled against define __NR_exit_group. AFAIK only the current RH beta ships a kernel with a 2.4 backport of all the threading changes during 2.5, so it might be worth asking the mdk glibc maintainer we he got his kernel headers from.. (either redhat or 2.5 :))
Quoted 4 lines · On 2003.01.03 Christoph Hellwig wrote:
Quoted 3 lines · J.A. Magallon
Quoted 2 lines
Your libc isn't the one from RH's new beta, is it? :)
Quoted 8 lines
Quoted 1 line
Nope, Mandrake Cooker glibc-2.3.1-6.
glibc only tries to use
sys_exit_groupif the kernel headers it's compiled against define__NR_exit_group. AFAIK only the current RH beta ships a kernel with a 2.4 backport of all the threading changes during 2.5, so it might be worth asking the mdk glibc maintainer we he got his kernel headers from.. (either redhat or 2.5 :))
It is defined in 2.4.20, undefined but reserved:
werewolf:/usr/src/linux-2.4.20> grep -r exit_group *
arch/x86_64/ia32/ia32entry.S: .quad sys_ni_syscall /* exit_group */ arch/i386/kernel/entry.S: .long SYMBOL_NAME(sys_ni_syscall) /* sys_exit_group */
include/asm-x86_64/ia32_unistd.h:#define __NR_ia32_exit_group 252
include/asm-i386/unistd.h:#define __NR_exit_group 252
???
Signature · 4 lines
J.A. Magallon <[email protected]> \ Software is like sex: werewolf.able.es \ It's better when it's free Mandrake Linux release 9.1 (Cooker) for i586 Linux 2.4.21-pre2-jam2 (gcc 3.2.1 (Mandrake Linux 9.1 3.2.1-2mdk))
Context for libc-alpha: current glibc CVS gets tons of -ENOSYS when running on 2.4. That's because it tries to use sys_exit_group if __NR_exit_group is defined.
Quoted 5 lines · J.A. Magallon
werewolf:/usr/src/linux-2.4.20> grep -r
exit_group*arch/x86_64/ia32/ia32entry.S: .quad sys_ni_syscall /* exit_group */ arch/i386/kernel/entry.S: .long SYMBOL_NAME(sys_ni_syscall) /* sys_exit_group */include/asm-x86_64/ia32_unistd.h:#define
__NR_ia32_exit_group252
include/asm-i386/unistd.h:#define__NR_exit_group252
Hmm. It looks like glibc should test for something else than :)
Quoted 1 line · Christoph Hellwig
Hmm. It looks like glibc should test for something else than :)
The code is correct as it is. If the exit_group syscall does not exist the normal exit is used. There is by definition exactly one call to any of these syscalls so who cares?
If there is any problem it is your strace which is far too old.
Signature · 3 lines
--------------. ,-. 444 Castro Street Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA Red Hat `--' drepper at redhat.com `---------------------------