> -----Original Message-----
> From: Linux-nvdimm <[email protected]> On Behalf Of Verma,
> Vishal L
> Sent: Thursday, January 3, 2019 3:27 PM
> To: [email protected]; [email protected]
> Subject: Re: Question on Error Injection
>
>
> On Thu, 2019-01-03 at 20:02 +0000, Kamal Kakri wrote:
> > My device has errors injected:
> > # ndctl inject-error --status namespace2.0
> > {
> > "badblocks":[
> > {
> > "block":35000,
> > "count":10
> > }
> > ]
> > }
> >
> > No problem reading from the bad offsets:
> > # dd if=/dev/pmem2 of=/tmp/pmem_out bs=512 count=10 skip=35000
> > 10+0 records in
> > 10+0 records out
> > 5120 bytes (5.1 kB) copied, 0.000108226 s, 47.3 MB/s
>
> Did you ever read from /dev/pmem2 before injecting the error? There is
> a possibility that the page is already present in the page cache and
> the read gets serviced from there. You can set iflag=direct to ensure
> you're reading from the device.
>
> Other than that, there /should/ have been an MCE/sigbus in this case.
> I'd check with your hardware/platform vendor to ensure machine checks
> are available, and to ensure that injecting error does result in a
> memory error/poison consumption by the CPU.
An application like dd making traditional read() calls should see
them fail and report it this:
dd: error reading '/dev/pmem2': Input/output error
The application itself shouldn't be terminated with SIGBUS - that's
for an application doing memory accesses that cannot be resolved.
---
Robert Elliott, HPE Persistent Memory
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm