NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/47172: ast-ksh vs. posix_spawn



>Number:         47172
>Category:       kern
>Synopsis:       ast-ksh vs. posix_spawn
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 08 09:05:00 +0000 2012
>Originator:     Martin Husemann
>Release:        NetBSD 6.99.14
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD whoever-brings-the-night.aprisoft.de 6.99.14 NetBSD 6.99.14 
(WHOEVER) #7: Sat Oct 27 14:11:49 CEST 2012 
martin%emmas.aprisoft.de@localhost:/usr/src/sys/arch/sparc64/compile/WHOEVER 
sparc64
Architecture: sparc64
Machine: sparc64
>Description:

When building pkgsrc/shells/ast-ksh on a NetBSD version that has posix_spawn
(6 or newer), the resulting shell misbehaves:

[/tmp] martin@whoever-brings-the-night > /usr/pkg/bin/ksh93
$ ls
[1] +                          ls
$ dbus-wfVo2LqkzB     dump                ktrace.out          ssh-0000000494aa
^D

The problem does not show up when ast-ksh does not detect posix_spawn.

Likely part of the problem is the failing setpgid here:
 12901      1 ksh93    CALL  
posix_spawn(0xffffffffffffa478,0x40385bd1,0,0xffffffffffffa448,0x403859f8,0x40385ae0)
 12901      1 ksh93    NAMI  "/bin/ls"
 12901      1 ksh93    NAMI  "/libexec/ld.elf_so"
 12296      1 ls       EMUL  "netbsd"
 12901      1 ksh93    RET   posix_spawn 0, 1077435345/0x40385bd1
 12901      1 ksh93    CALL  
__sigaction_sigtramp(SIGTTIN,0xffffffffffffaf90,0xffffffffffffaf70,0x40b4b6a0,2)
 12901      1 ksh93    RET   __sigaction_sigtramp 0, -20592/0xffffffffffffaf90
 12901      1 ksh93    CALL  
__sigaction_sigtramp(SIGTTOU,0xffffffffffffaf90,0xffffffffffffaf70,0x40b4b6a0,2)
 12901      1 ksh93    RET   __sigaction_sigtramp 0, -20592/0xffffffffffffaf90
 12901      1 ksh93    CALL  setpgid(0x3008,0x3008)
 12901      1 ksh93    RET   setpgid -1 errno 13 Permission denied


Failure has been pointed out on netbsd-users:
  http://mail-index.netbsd.org/netbsd-users/2012/11/06/msg011840.html

>How-To-Repeat:
s/a
>Fix:
n/a



Home | Main Index | Thread Index | Old Index