[LU-843] Several minor issues Created: 14/Nov/11  Updated: 24/Feb/12  Resolved: 06/Feb/12

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.1.0, Lustre 1.8.x (1.8.0 - 1.8.5)
Fix Version/s: Lustre 2.2.0, Lustre 2.1.1

Type: Bug Priority: Minor
Reporter: Bruce Korb (Inactive) Assignee: Minh Diep
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux x86-64 and likely all others


Severity: 3
Rank (Obsolete): 4801

 Description   

shmem_bump() modifies bumped_running without lock

{en,dis}able-ext4 config option is not correctly handled
Redirecting stdin in a while loop can trigger subshell.
get_ec_devno() in libecho mishandles results

Detailed commit messages to private repository:

shmem_bump() modifies bumped_running without lock

Each of several threads could sleep after the shmem_unlock call
allowing following threads to see bumped_running set to false. It
should be set to true inside the guarded "then" clause still under the
shmem_lock() protection. A side effect is that it will only ever be
set to true once.

====

correctly handle –{en,dis}

able-ext4 config option

Some configurations require ext4 use, some prohibit it, and some
can use either. This rewrite enforces constraints and allows
enabling and disabling when either is possible.

Remove dead stores to unused "ldiskfs_is_ext4" variable.

====

Redirecting stdin in a while loop can trigger subshell.

That causes variables changed in the loop to loose their changes.
(POSIX does not require "while" loops in shell scripts to be performed
in the same environment when stdin is redirected. "bash" does not
commit to maintaining current behavior.) Therefore, read input from
fd 3. Also:

  • Eliminate unnecessary fork/exec calls since the analysis
    can readily be done in the same shell process.
  • Ensure that all error paths do emit ERROR to stdout.
  • Ensure "libecho" comes from obdfilter-survey dir.
  • Ignore files created by "patch" program.

====

get_ec_devno() in libecho mishandles results

The results from this function are returned by echoing them to stdout. This
needs to be done more safely because other functions that it invokes
(e.g. "remote_shell") can drop detritus into stdout (viz., a terminal control
escape sequence) that mutilates results.

The fundamental bug is that readline(3GNU) should never emit terminal
control sequences to stdout. It should be stderr, especially when stdin is
not a terminal. We won't be fixing the readline function, but we can mitigate
the bug by dumping unneeded stdout output to stderr or /dev/null.

So, the solution is to clone stdout fd, redirect stdout to an alternate fd
(stderr) and echo results to the cloned fd.

Since this works only as a code fragment with redirected stdout, it must,
perforce, be running in a subshell. The "return" statements need to be "exit"
statements, with the proper success/fail indication. This is not currently
used, but should be more reliable than checking the result count.



 Comments   
Comment by Bruce Korb (Inactive) [ 14/Nov/11 ]

Mostly dead issue: correctly handle –

{en,dis}

able-ext4 config option
"ldiskfs_is_ext4=yes" is still a dead store. The option is gone.

Comment by Bruce Korb (Inactive) [ 14/Nov/11 ]

http://review.whamcloud.com/#change,1699

Comment by Peter Jones [ 14/Dec/11 ]

Landed for 2.2

Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » x86_64,server,el5,ofa #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/libecho
  • lustre-iokit/obdfilter-survey/obdfilter-survey
Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » x86_64,client,el6,inkernel #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/obdfilter-survey
  • lustre-iokit/obdfilter-survey/libecho
Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » i686,server,el6,inkernel #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/obdfilter-survey
  • lustre-iokit/obdfilter-survey/libecho
Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » x86_64,client,el5,inkernel #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/obdfilter-survey
  • lustre-iokit/obdfilter-survey/libecho
Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » x86_64,client,el5,ofa #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/libecho
  • lustre-iokit/obdfilter-survey/obdfilter-survey
Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » x86_64,server,el6,inkernel #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/libecho
  • lustre-iokit/obdfilter-survey/obdfilter-survey
Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » x86_64,client,sles11,inkernel #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/obdfilter-survey
  • lustre-iokit/obdfilter-survey/libecho
Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » x86_64,server,el5,inkernel #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/obdfilter-survey
  • lustre-iokit/obdfilter-survey/libecho
Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » x86_64,client,ubuntu1004,inkernel #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/obdfilter-survey
  • lustre-iokit/obdfilter-survey/libecho
Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » i686,client,el6,inkernel #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/obdfilter-survey
  • lustre-iokit/obdfilter-survey/libecho
Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » i686,server,el5,inkernel #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/libecho
  • lustre-iokit/obdfilter-survey/obdfilter-survey
Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » i686,server,el5,ofa #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/libecho
  • lustre-iokit/obdfilter-survey/obdfilter-survey
Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » i686,client,el5,inkernel #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/libecho
  • lustre-iokit/obdfilter-survey/obdfilter-survey
Comment by Build Master (Inactive) [ 14/Dec/11 ]

Integrated in lustre-master » i686,client,el5,ofa #385
LU-843 iokit: get_ec_devno returns trash (Revision d7e86afb0c64b5107a5aff8c45b962ec0104d255)

Result = SUCCESS
Oleg Drokin : d7e86afb0c64b5107a5aff8c45b962ec0104d255
Files :

  • lustre-iokit/obdfilter-survey/libecho
  • lustre-iokit/obdfilter-survey/obdfilter-survey
Comment by Minh Diep [ 13/Jan/12 ]

reopen to port this to b2_1

Comment by Minh Diep [ 06/Feb/12 ]

landed in b2_1

Generated at Sat Feb 10 01:10:56 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.