how are media errors handled?

76 views
Skip to first unread message

Jeff Moyer

unread,
Oct 17, 2014, 4:58:43 PM10/17/14
to pm...@googlegroups.com
Hi,

The documentation makes references to reads returning -1 with errno set
for failures. How are you planning to implement that?

Cheers,
Jeff

Andy Rudoff

unread,
Oct 17, 2014, 6:53:13 PM10/17/14
to Jeff Moyer, pmem
Hi Jeff,

First, the easy case: for non-media errors like the block number
passed to read being invalid or problems acquiring locks, the -1/errno
return will work as expected, and that's really what the man pages
were trying to say. But for media errors the answer is more complex
and an interesting discussion topic:

Reading an uncorrectable error from persistent memory is just like
reading an uncorrectable from DRAM. How exactly these are handled is
platform-specific but taking an Intel EX-class platform as an example,
the application will probably be killed with a SIGBUS. The
information provided with a SIGBUS is sufficient for the application
to catch SIGBUS and learn where the uncorrectable is, although I know
of very few applications that do this for memory today.

Right now, there's nothing in the library that tries to intercept
these media error cases. The library could catch SIGBUS and in the
case you mention turn that into a -1/EIO return. In addition, I've
been talking to the Linux persistent memory folks about having a way
to ask the system if there are known areas in a range of persistent
memory where data has been lost, so you can fail to open the area, or
refuse to access it or something instead of letting the SIGBUS happen.

So what I'm saying is that this is an open area where we need some
experience and welcome advice on how this should be handled by the
library...


-andy
> --
> You received this message because you are subscribed to the Google Groups "pmem" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pmem+uns...@googlegroups.com.
> To post to this group, send email to pm...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pmem/x49lhoeifb2.fsf%40segfault.boston.devel.redhat.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages