lkml.org 
[lkml]   [2021]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: NULL pointer dereference when access /proc/net
> Not really - the crucial part is ->d_count == -128, i.e. it's already past
> __dentry_kill().

Is it possible that dentry is garbage collected due to memory usage,
but it still is stored in the dentry cache.

Available memory is 5% when this crash happens, not sure if this helps.
```
crash> kmem -i
PAGES TOTAL PERCENTAGE
TOTAL MEM 32795194 125.1 GB ----
FREE 1870573 7.1 GB 5% of TOTAL MEM
USED 30924621 118 GB 94% of TOTAL MEM
SHARED 14145523 54 GB 43% of TOTAL MEM
BUFFERS 112953 441.2 MB 0% of TOTAL MEM
CACHED 14362325 54.8 GB 43% of TOTAL MEM
SLAB 664531 2.5 GB 2% of TOTAL MEM

TOTAL HUGE 0 0 ----
HUGE FREE 0 0 0% of TOTAL HUGE

TOTAL SWAP 0 0 ----
SWAP USED 0 0 0% of TOTAL SWAP
SWAP FREE 0 0 0% of TOTAL SWAP

COMMIT LIMIT 16397597 62.6 GB ----
COMMITTED 27786060 106 GB 169% of TOTAL LIMIT
```

On Mon, Apr 26, 2021 at 1:04 AM haosdent <haosdent@gmail.com> wrote:
>
> Hi, Alexander, thanks a lot for your quick reply.
>
> > Not really - the crucial part is ->d_count == -128, i.e. it's already past
> > __dentry_kill().
>
> Thanks a lot for your information, we would check this.
>
> > Which tree is that?
> > If you have some patches applied on top of that...
>
> We use Ubuntu Linux Kernel "4.15.0-42.45~16.04.1" from launchpad directly
> without any modification, the mapping Linux Kernel should be
> "4.15.18" according
> to https://people.canonical.com/~kernel/info/kernel-version-map.html
>
> On Mon, Apr 26, 2021 at 12:50 AM Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > On Sun, Apr 25, 2021 at 11:22:15PM +0800, haosdent wrote:
> > > Hi, Alexander Viro and dear Linux Filesystems maintainers, recently we
> > > encounter a NULL pointer dereference Oops in our production.
> > >
> > > We have attempted to analyze the core dump and compare it with source code
> > > in the past few weeks, currently still could not understand why
> > > `dentry->d_inode` become NULL while other fields look normal.
> >
> > Not really - the crucial part is ->d_count == -128, i.e. it's already past
> > __dentry_kill().
> >
> > > [19521409.514784] RIP: 0010:__atime_needs_update+0x5/0x190
> >
> > Which tree is that? __atime_needs_update() had been introduced in
> > 4.8 and disappeared in 4.18; anything of that age straight on mainline
> > would have a plenty of interesting problems. If you have some patches
> > applied on top of that... Depends on what those are, obviously.
>
>
>
> --
> Best Regards,
> Haosdent Huang



--
Best Regards,
Haosdent Huang

\
 
 \ /
  Last update: 2021-04-25 19:16    [W:0.051 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site