*Synopsis*: read(2) can return EIO if called via ksh built-in exec with stderr
closed and auditing enabled
CR 6764531 changed on Feb 22 2009 by <User 1-5Q-5159>
=== Field ============ === New Value ============= === Old Value =============
Commit to Fix in Build snv_110 snv_109
Hook 6 <email address omitted>
====================== =========================== ===========================
*Change Request ID*: 6764531
*Synopsis*: read(2) can return EIO if called via ksh built-in exec with stderr
closed and auditing enabled
Product: solaris
Category: shell
Subcategory: korn
Type: Defect
Subtype:
Status: 7-Fix in Progress
Substatus:
Priority: 3-Medium
Introduced In Release: solaris_2.0
Introduced In Build: solaris_2.0
Responsible Engineer: <User 1-5Q-5159>
Keywords:
=== *Description* ============================================================
The conjunction of following factors kills ksh login shell :
Solaris 5.8 + BSM active + ksh login shell + 'exec' to run a program that
does blocking IO + stderr redirection.
Change one of these factors and the pb disappears.
Comparing trusses, the pb seems to come from the fact that the read() is done in
non blocking mode when it fails, for an unknown reason .
no_bsm :
-> libc:read(0x0, 0x58018, 0x400, 0x0)
-> libc:_read(0x0, 0x58018, 0x400, 0x0)
read(0, 0x00058018, 1024) (sleeping...)
read(0, " a a\n", 1024) = 3
<- libc:read() = 3
-> libc:wcschr(0x54920, 0x61, 0x0, 0x2)
bsm :
-> libc:read(0x0, 0x58018, 0x400, 0x0)
-> libc:_read(0x0, 0x58018, 0x400, 0x0)
read(0, 0x00058018, 1024) Err#5 EIO
-> libc:_cerror(0x5, 0x58018, 0x400, 0x0)
-> libc:___errno(0x0, 0x0, 0x0, 0x0)
-> libc:thr_main(0x0, 0x24050, 0x0, 0x0)
The pb has been reproduced in my lab with a standard BSM config , either with
the following shell script or with a C prog. that does blocking IO.
/etc/passwd contains :
jbrialt:x:1000000:1:Jocelyn Brial case 38164917:/usr/tmp/jbrial:/bin/ksh
/etc/audit_user contains :
root:lo:no
jbrialt:all:no
$ cat test.ksh
#!/bin/ksh
#
#
echo "Insert a string: \c"
read value
echo "You've inserted the string "$valore
$
$ exec test.ksh 2>/dev/null
Insert a string: You've inserted the string
Connection to s4u-8-gmp02.uk.Sun.COM closed.
sr1-epar01-03%
( the user was not allowed time to enter a string )
*** (#1 of 1): 2008-10-28 14:52:43 GMT+00:00 <User 1-5Q-2332>
=== *Public Comments* ========================================================
=== *Workaround* =============================================================
=== *Additional Details* =====================================================
Targeted Release: solaris_nevada
Commit To Fix In Build: snv_110
Fixed In Build:
Integrated In Build:
Verified In Build:
See Also:
Duplicate of:
Hooks:
Hook1:
Hook2:
Hook3:
Hook4:
Hook5:
Hook6:
Program Management:
Root Cause: Inadequate Algorithm
Fix Affects Documentation: No
Fix Affects Localization: No
=== *History* ================================================================
Date Submitted: 2008-10-28 14:52:43 GMT+00:00
Submitted By: <User 1-5Q-2332>
Status Changed Date Updated Updated By
3-Accepted 2008-12-08 17:31:10 GMT+00:00 <User 1-5Q-5159>
7-Fix in Progress 2009-01-19 15:48:46 GMT+00:00 <User 1-5Q-5159>
=== *Service Request* ========================================================
Impact: Significant
Functionality: Secondary
Severity: 3
Product Name: solaris
Product Release: solaris_8
Product Build: 5.8
Operating System: 2.8
Hardware: generic
Submitted Date: 2008-10-28 14:52:44 GMT+00:00
=== *Multiple Release (MR) Cluster* - 0 ======================================