Tracking bug for static code analysis fixes.
(LU-2753)
|
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.4.0 |
| Fix Version/s: | Lustre 2.6.0 |
| Type: | Technical task | Priority: | Minor |
| Reporter: | Sebastien Buisson (Inactive) | Assignee: | Liang Zhen (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | coverity | ||
| Rank (Obsolete): | 7449 |
| Description |
|
By running the Coverity tool on the Lustre code, we may have found a possible thread deadlock. In function put_pages_on_daemon_list(), the loop with cfs_tcd_for_each_type_lock() acquires the lock "cfs_trace_cpu_data.tcd_lock". And inside this loop, the call to put_pages_on_tcd_daemon_list() acquires the lock "page_collection.pc_lock". However, we have two other cases where the locks tcd_lock and pc_lock are taken in reverse order. In the end it seems a thread deadlock could occur. What do you think? Sebastien. |
| Comments |
| Comment by Peter Jones [ 28/Mar/13 ] |
|
Liang Are you able to comment? Thanks Peter |
| Comment by Liang Zhen (Inactive) [ 15/Sep/13 ] |
|
This code is not very clean, but it's impossible to deadlock:
so @pc is not going to be shared between different threads. |
| Comment by Liang Zhen (Inactive) [ 05/Oct/13 ] |
|
patch is ready to land: http://review.whamcloud.com/#/c/7660/ |
| Comment by Peter Jones [ 25/Oct/13 ] |
|
Landed for 2.6 |