ioctl to sg device fails with ENOMEM when it is under load

Solution Verified - Updated -

Issue

We develop a library to accesses and configure 3310/3320 raid controller by sending commands to one of the /dev/sg device interfaces that the raid controller presents to the host.
If a /dev/sg device is being used that is under any load, occasional failures happen of an ioctl call. The call that is occasionally failing is "ioctl(fd, SG_IO, &io_hdr)", and the errno returned is 12, which is ENOMEM (out of memory).

When run a disk load test on that device, which is on sg2, we see more often failures from our raid commands. The behavior is the same, when changing the device to sg1 to access the raid controller and put some load on that device.

It works on any of the 5 sg devices (sg0, sg1, ag2, sg3 and sg4) when the sg in question is idle. As more load is being send to the device (e.g. run disk load tests which read/write to that device) the more often the command fails.

Environment

  • Red Hat Enterprise Linux 5.8
  • 3310/3320 raid controller

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content