We have a hard-to-reproduce problem and I’m wondering if anyone here has seen this behavior and can offer some insight.
Our pxa270 system logs data to a FAT formatted USB flash stick.
Sometimes in the middle of logging the fprintf() call that writes to the file fails with errno EIO. When this happens the flash stick is no longer visible in the namespace and syslog has errors like this that repeat every 4-5 seconds:
umass_bulk_reset: path 0, devno 1
CLASS_ResetDevicePort: dno 1, vid 3538
USB_SelectConfiguration: Set config devno 1, cfg 1
When the stick is removed and reinserted it mounts correctly and the log file that was being written to is there, but obviously it has been truncated and data lost.
With only QNX components running we wrote a small test that looped, continuously writing data records to a file on the stick, pausing 1ms between writes to simulate the real system, and the same problem happened after about 11M records (stick was only 45% full).
It may well be a bad stick, but we’ve seen it several times on different brands and sizes of sticks so are suspicious of the software.
Any suggestions? We are running QNX 6.3.2, XP hosted Momentics 4.0.1 and using the 4.2.1 compiler.