[LU-1878] NULL pointer in ll_readahead() Created: 10/Sep/12 Updated: 29/May/17 Resolved: 29/May/17 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 1.8.x (1.8.0 - 1.8.5) |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Vladimir V. Saveliev | Assignee: | Bob Glossman (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Severity: | 3 |
| Bugzilla ID: | 24,376 |
| Epic: | client |
| Rank (Obsolete): | 9764 |
| Description |
|
Kernel OOPS on a client <1>[1740431.005226] BUG: unable to handle kernel NULL pointer dereference at (null) Stack traceback for pid 839153 |
| Comments |
| Comment by Vladimir V. Saveliev [ 10/Sep/12 ] |
|
The BUG happened because ll_readhead() was called from ll_readpage() with inode = mapping->host At the begining of ll_readpage() page->mapping was not NULL, because the line At first sight it looks like the page kept locked all the time at ll_readpage(). Process 1: Process 2: Process 3: Process 1 continues with page->mapping == NULL and calls ll_readahead() passing NULL as 3rd argument:
ll_readahead() Dump of stacktraces provided by HLRN (https://bugzilla.lustre.org/attachment.cgi?id=33148) contains number of processes:
which shows that the race described above is possible. |
| Comment by Vladimir V. Saveliev [ 10/Sep/12 ] |
|
llap_shrink_cache_internal(): avoid shrinking of pages which are in use |
| Comment by Peter Jones [ 10/Sep/12 ] |
|
Thanks for the patch Vladimir. Could you please upload it into gerrit so that we can review and test it? There are instructions on the whamcloud wiki or I can get an engineer to step you through the process if that helps. |
| Comment by Vladimir V. Saveliev [ 10/Sep/12 ] |
|
Hello, Peter That is what I was planning to do next. From http://wiki.whamcloud.com/display/PUB/Submitting+Changes I hope that my patch matches If I went wrong way or there is simple way, please get someone to help TIA |
| Comment by Peter Jones [ 10/Sep/12 ] |
|
Great! It sounds like you are on the right track. Once the patch is in gerrit then you should post the URL to the changeset as a comment in the JIRA ticket. Thanks! |
| Comment by Vladimir V. Saveliev [ 10/Sep/12 ] |
| Comment by Vladimir V. Saveliev [ 10/Sep/12 ] |
|
the patch is in gerrit (http://review.whamcloud.com/3927), however, I |
| Comment by Peter Jones [ 10/Sep/12 ] |
|
Excellent - thanks Vladimir! Don't worry about the inspectors - we'll organize that. Bob Could you please take care of landing this patch and check in particular its applicability to the master branch Thanks Peter |
| Comment by Vladimir V. Saveliev [ 18/Sep/12 ] |
|
http://review.whamcloud.com/4026 this is updated version accordingly to Jinshan Xiong's inspection. |
| Comment by Andreas Dilger [ 29/May/17 ] |
|
Close old ticket. |