On Fri, Sep 7, 2012 at 2:53 PM, Irek Szczesniak <iszczesn...@gmail.com> wrote:
> On Fri, Sep 7, 2012 at 1:47 PM, Irek Szczesniak <iszczesn...@gmail.com> wrote:
>> David, I've tried the new ast-ksh.20120831 yesterday and hit these
>> errors when running the alias.sh tests on Solaris 11:
>> ./src/cmd/ksh93/tests/shtests: line 307: write to 1 failed [Bad file number]
>> ./src/cmd/ksh93/tests/shtests: line 307: open file limit exceeded [Bad
>> file number]
>>
>> truss reports that the fd 1 is closed immediately after the open() in
>> the shtests process (the process running alias.sh is not involved):
>> 23914:  
>> open("/home/irek/work/ksh/astksh20120831/build/arch/sol11.i386-64/src/cmd/ksh93/.paths",
>> O_RDONLY) Err#2 ENOENT
>> 23914:  open("/bin/.paths", O_RDONLY)                   Err#2 ENOENT
>> 23914:  close(12)                                       = 0
>> 23914:  close(1)                                        = 0
>> 23914:  open("/tmp/test001/sf34.c85", O_RDWR|O_CREAT|O_EXCL, 0666) = 1
>> 23914:  close(1)                                        = 0
>> 23914:  close(4)                                        = 0
>> 23914:  close(1)                                        = 0
>> 23914:  read(3, " 2 4\n", 8192)                         = 3
>> 23914:  read(3, 0xFFFFFD7FFFDFB490, 8192)               = 0
>> 23914:  close(3)                                        = 0
>> 23914:  open("/usr/lib/locale/en_US.UTF-8/LC_MESSAGES/SUNW_OST_OSLIB.mo",
>> O_RDONLY) Err#2 ENOENT
>> 23914:  write(1, " 2 4\n", 3)                           Err#9 EBADF
>> 23914:  write(2, " . / s r c / c m d / k s".., 77)      = 77
>> 23914:  close(11)                                       = 0
>>
>> Any quick or dirty cure would be appreciated.
>
> I can't reproduce the problem with ast-ksh.20120824.

This fails:
./arch/sol11.i386\-64/bin/ksh -c 'x=$( /bin/true ; true ; )''
./arch/sol11.i386-64/bin/ksh: open file limit exceeded [Bad file number]

This does not fail:
./arch/sol11.i386\-64/bin/ksh -c 'x=${ /bin/true ; true ; }''

truss reports some suspicious syscalls:
fcntl(1, 4294967197, 0x0000000A)                Err#22 EINVAL
fcntl(4294967295, F_SETFD, 0x00000001)          Err#9 EBADF
close(1)                                        = 0

My guess is that the new emulation for F_DUPFD_CLOEXEC is not
intercepted properly.

OS is Opensolaris 2011.05 (an early version of Solaris 11), which
didn't have F_DUPFD_CLOEXEC

Irek
_______________________________________________
ast-developers mailing list
ast-developers@research.att.com
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to