[LU-1070] Inconsistent CLIO lock state maybe cause cl_lock cannot be cached Created: 05/Feb/12  Updated: 02/May/12  Resolved: 15/Mar/12

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.2.0
Fix Version/s: Lustre 2.2.0, Lustre 2.3.0

Type: Bug Priority: Blocker
Reporter: nasf (Inactive) Assignee: nasf (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Story Points: 2
Severity: 3
Rank (Obsolete): 4689

 Description   

According to current CLIO lock state machine rules, the last "unuse()" maybe changes the cl_lock state to CLS_CACHED or CLS_NEW, and only the CLS_HELD cl_lock can be changed to CLS_CACHED.

On the other hand, with AGL introduced, the AGL RPC sponsor maybe exits the cl_lock processing without "wait()" called before corresponding OSC lock "upcall()", then it is the last "unuse()" duty to update the cl_lock state according to the low layer osc_lock state. To make the cl_lock interface clean, "wait()" should be called when the last "unuse()" called. Currently, it is done in "lov_lock_unuse()" against toplock. But OSC lock "upcall()" is against sublock. So the sublock state maybe un-updated, and inconsistent with low layer osc_lock state, then when the last "unuse()", its state cannot be changed to CLS_CACHED as expectation.



 Comments   
Comment by Andreas Dilger [ 12/Mar/12 ]

http://review.whamcloud.com/2099

Can you please comment on whether this is a problem that will affect usage of the filesystem (e.g. LBUG/LASSERT failure, deadlock/hang, oops) or if it is just a code style or correctness cleanup that does not affect users?

Comment by nasf (Inactive) [ 12/Mar/12 ]

There are two potencial affect:

1) If cl_lock state cannot be changed to CLS_CACHED when the last user exits, the cl_lock (established by AGL) will be released from memory, although related ldlm lock still cached on client. Then when the real size user (directory traversing thread) comes, it has to re-establish cl_lock and alias the cl_lock to the cached ldlm lock by itself.

2) The inconsistent cl_lock state may trigger LBUG() in osc_lock_enqueue() as following:
===============
LustreError: 19238:0:(osc_lock.c:1179:osc_lock_enqueue()) ASSERTION(ols->ols_state == OLS_NEW) failed: Impossible state: 4^M
LustreError: 19238:0:(osc_lock.c:1179:osc_lock_enqueue()) LBUG^M
Kernel panic - not syncing: LBUG^M
===============
Although it is not easy to be triggered (not reported on maloo until now), I really found the LBUG() in my local test.

So the patch http://review.whamcloud.com/#change,2099 is necessary.

Comment by Andreas Dilger [ 12/Mar/12 ]

Marking this as a potential 2.2 blocker until we can discuss this at the next meeting.

Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » x86_64,client,el6,inkernel #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/lov/lov_lock.c
  • lustre/osc/osc_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » i686,client,el6,ofa #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/lov/lov_lock.c
  • lustre/osc/osc_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » x86_64,client,el6,ofa #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/lov/lov_lock.c
  • lustre/osc/osc_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » i686,client,el6,inkernel #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/osc/osc_lock.c
  • lustre/include/cl_object.h
  • lustre/lov/lov_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » x86_64,client,sles11,inkernel #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/osc/osc_lock.c
  • lustre/include/cl_object.h
  • lustre/lov/lov_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-master » i686,server,el6,inkernel #517
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/lov/lov_lock.c
  • lustre/osc/osc_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » i686,client,el5,inkernel #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/osc/osc_lock.c
  • lustre/include/cl_object.h
  • lustre/lov/lov_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » x86_64,server,el5,ofa #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/osc/osc_lock.c
  • lustre/include/cl_object.h
  • lustre/lov/lov_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-master » i686,client,el6,inkernel #517
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/include/cl_object.h
  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » x86_64,server,el6,inkernel #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
  • lustre/osc/osc_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » i686,client,el5,ofa #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » x86_64,server,el5,inkernel #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-master » i686,client,el5,ofa #517
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/osc/osc_lock.c
  • lustre/include/cl_object.h
  • lustre/lov/lov_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-master » i686,client,el6,ofa #517
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/include/cl_object.h
  • lustre/lov/lov_lock.c
  • lustre/osc/osc_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-master » x86_64,server,el6,ofa #517
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
  • lustre/osc/osc_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » x86_64,client,el5,ofa #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-master » x86_64,client,el6,ofa #517
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/include/cl_object.h
  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » x86_64,client,ubuntu1004,inkernel #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-master » x86_64,server,el5,ofa #517
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
  • lustre/osc/osc_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-master » i686,client,el5,inkernel #517
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-master » x86_64,server,el6,inkernel #517
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/osc/osc_lock.c
  • lustre/include/cl_object.h
  • lustre/lov/lov_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-master » x86_64,server,el5,inkernel #517
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
  • lustre/osc/osc_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » x86_64,client,el5,inkernel #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/include/cl_object.h
  • lustre/lov/lov_lock.c
  • lustre/osc/osc_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-master » x86_64,client,el6,inkernel #517
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/include/cl_object.h
  • lustre/lov/lov_lock.c
  • lustre/osc/osc_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » i686,server,el6,ofa #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
  • lustre/osc/osc_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-master » x86_64,client,el5,inkernel #517
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/include/cl_object.h
  • lustre/lov/lov_lock.c
  • lustre/osc/osc_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-master » x86_64,client,el5,ofa #517
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/include/cl_object.h
  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
Comment by Build Master (Inactive) [ 14/Mar/12 ]

Integrated in lustre-b2_2 » x86_64,server,el6,ofa #10
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/include/cl_object.h
  • lustre/lov/lov_lock.c
  • lustre/osc/osc_lock.c
Comment by Peter Jones [ 15/Mar/12 ]

Landed for 2.2 and 2.3

Comment by Build Master (Inactive) [ 16/Mar/12 ]

Integrated in lustre-master » i686,server,el6,ofa #518
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/include/cl_object.h
  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
Comment by Build Master (Inactive) [ 16/Mar/12 ]

Integrated in lustre-master » x86_64,client,sles11,inkernel #518
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/osc/osc_lock.c
  • lustre/include/cl_object.h
  • lustre/lov/lov_lock.c
Comment by Build Master (Inactive) [ 16/Mar/12 ]

Integrated in lustre-master » x86_64,client,ubuntu1004,inkernel #518
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/lov/lov_lock.c
  • lustre/osc/osc_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 16/Mar/12 ]

Integrated in lustre-master » i686,server,el5,ofa #518
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
  • lustre/osc/osc_lock.c
Comment by Build Master (Inactive) [ 16/Mar/12 ]

Integrated in lustre-master » i686,server,el5,inkernel #518
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 17/Mar/12 ]

Integrated in lustre-b2_2 » i686,server,el6,inkernel #12
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/include/cl_object.h
  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
Comment by Build Master (Inactive) [ 17/Mar/12 ]

Integrated in lustre-b2_2 » i686,server,el5,inkernel #13
LU-1070 agl: update lock state when AGL upcall (Revision f7523b9151a0e9321d1e369a68ff1a48bbf60d30)

Result = SUCCESS
Oleg Drokin : f7523b9151a0e9321d1e369a68ff1a48bbf60d30
Files :

  • lustre/osc/osc_lock.c
  • lustre/include/cl_object.h
  • lustre/lov/lov_lock.c
Comment by Build Master (Inactive) [ 02/May/12 ]

Integrated in lustre-dev » x86_64,client,el5,inkernel #340
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
  • lustre/osc/osc_lock.c
Comment by Build Master (Inactive) [ 02/May/12 ]

Integrated in lustre-dev » i686,client,el6,inkernel #340
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 02/May/12 ]

Integrated in lustre-dev » i686,server,el5,inkernel #340
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
  • lustre/osc/osc_lock.c
Comment by Build Master (Inactive) [ 02/May/12 ]

Integrated in lustre-dev » x86_64,server,el6,inkernel #340
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 02/May/12 ]

Integrated in lustre-dev » i686,client,el5,inkernel #340
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 02/May/12 ]

Integrated in lustre-dev » x86_64,server,el5,inkernel #340
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
Comment by Build Master (Inactive) [ 02/May/12 ]

Integrated in lustre-dev » x86_64,client,el6,inkernel #340
LU-1070 agl: update lock state when AGL upcall (Revision 0125d830821f08854adc587f831d06bf30ccbfe8)

Result = SUCCESS
Oleg Drokin : 0125d830821f08854adc587f831d06bf30ccbfe8
Files :

  • lustre/osc/osc_lock.c
  • lustre/lov/lov_lock.c
  • lustre/include/cl_object.h
Generated at Sat Feb 10 01:13:12 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.