Linux bugs in iometer trunk

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Linux bugs in iometer trunk

Chris Horneck
Greetings,

I would like to point out a few bugs for Linux that I have encountered in the iometer trunk and describe their impact for others who may be encountering them.

1) For Linux IO using libaio, the return value of completed IOs, as returned by io_getevents, is not checked.  If an IO fails due to the user buffer not being properly aligned for O_DIRECT IO or for some other reason, the IO will still appear to succeed, even though it actually failed. In fact, if all your IOs fail, it will appear that you are getting amazing performance because the IOs will complete (with an unchecked error) very quickly.  This leads me to my next item...

2) For Linux IO, the "Full Random" pattern generates IO with buffers that are not properly aligned for O_DIRECT IO.  Hence, all your IOs fail, but due to #1, it will appear that you are getting amazing performance.  IOGrunt aligns the buffer to a DWORD boundary, but this is not sufficient.  It should be sufficient to align the buffer to 512 byte boundary instead.  

3) The IO Grunt destructor frees "write_data".  If you have used "Full Random", write_data may point to some random offset within the actual buffer that was allocated.  Attempting to free this pointer may have undefined results, including a crash.

Regards,
Chris

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Linux bugs in iometer trunk

Vedran Degoricija
Thanks Chris. We will look into this. A proposed code change could be helpful as well. ;)
 
Regards,
Ved

From: Chris Horneck <[hidden email]>
To: iometer-devel <[hidden email]>; iometer-user <[hidden email]>
Sent: Wednesday, May 22, 2013 3:28 PM
Subject: [Iometer-devel] Linux bugs in iometer trunk

Greetings,

I would like to point out a few bugs for Linux that I have encountered in the iometer trunk and describe their impact for others who may be encountering them.

1) For Linux IO using libaio, the return value of completed IOs, as returned by io_getevents, is not checked.  If an IO fails due to the user buffer not being properly aligned for O_DIRECT IO or for some other reason, the IO will still appear to succeed, even though it actually failed. In fact, if all your IOs fail, it will appear that you are getting amazing performance because the IOs will complete (with an unchecked error) very quickly.  This leads me to my next item...

2) For Linux IO, the "Full Random" pattern generates IO with buffers that are not properly aligned for O_DIRECT IO.  Hence, all your IOs fail, but due to #1, it will appear that you are getting amazing performance.  IOGrunt aligns the buffer to a DWORD boundary, but this is not sufficient.  It should be sufficient to align the buffer to 512 byte boundary instead.  

3) The IO Grunt destructor frees "write_data".  If you have used "Full Random", write_data may point to some random offset within the actual buffer that was allocated.  Attempting to free this pointer may have undefined results, including a crash.

Regards,
Chris

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel



------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Linux bugs in iometer trunk

Chris Horneck
I have some code changes in my sandbox.  When I have time, I try to get them in shape for general consumption.

-Chris


On Sat, May 25, 2013 at 5:33 PM, Vedran Degoricija <[hidden email]> wrote:
Thanks Chris. We will look into this. A proposed code change could be helpful as well. ;)
 
Regards,
Ved

From: Chris Horneck <[hidden email]>
To: iometer-devel <[hidden email]>; iometer-user <[hidden email]>
Sent: Wednesday, May 22, 2013 3:28 PM
Subject: [Iometer-devel] Linux bugs in iometer trunk

Greetings,

I would like to point out a few bugs for Linux that I have encountered in the iometer trunk and describe their impact for others who may be encountering them.

1) For Linux IO using libaio, the return value of completed IOs, as returned by io_getevents, is not checked.  If an IO fails due to the user buffer not being properly aligned for O_DIRECT IO or for some other reason, the IO will still appear to succeed, even though it actually failed. In fact, if all your IOs fail, it will appear that you are getting amazing performance because the IOs will complete (with an unchecked error) very quickly.  This leads me to my next item...

2) For Linux IO, the "Full Random" pattern generates IO with buffers that are not properly aligned for O_DIRECT IO.  Hence, all your IOs fail, but due to #1, it will appear that you are getting amazing performance.  IOGrunt aligns the buffer to a DWORD boundary, but this is not sufficient.  It should be sufficient to align the buffer to 512 byte boundary instead.  

3) The IO Grunt destructor frees "write_data".  If you have used "Full Random", write_data may point to some random offset within the actual buffer that was allocated.  Attempting to free this pointer may have undefined results, including a crash.

Regards,
Chris

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel




------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Loading...