Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Really strange problem with qnx6 fs: (8 Items)
   
Really strange problem with qnx6 fs  
We're using a Transcend Compact Flash, model TS2GCF266, which is 2G, 266X SLC.  The device does support the FLUSH CACHE 
command, and it works fine with sync=mandatory.

However, if I create a qnx6 fs on the device and then write several megabytes worth of files, it gets a low-level error 
and the device seems to go into some sort of write-protect mode where we have to cycle the power to clear it.

What's odd is that we can do the exact same thing with qnx4 fs, and we can write every sector on the device with dd.  In
 fact, I created a qnx6fs on another similar CF, and dd'ed the entire image to the "bad" flash without any problem.  The
 resulting CF boots up just fine, but any attempt to write a large file to it produces errors in the slog and the device
 stops allowing writes.

I've tried everything I can think of, including sync=none, turning off DMA, etc., and it makes no difference.  "
Something" that qnx6 fs is doing is causing this flash device to give an error.

I've reproduced in in various different machines, with two different CF modules, HOWEVER, it doesn't happen with every 
module.  I have a third CF of the exact same make & model, and it does not exhibit the problem.

I loaded "devb-eide eide verbose=5,master=verbose=5 cam verbose=5" and have the slog output of the resulting error, if 
anyone wants to look at it.  It doesn't seem to have a lot of info, other than that it was doing a write of 64K bytes 
and then the next thing is a "reset completed after ~300ms".

If it was just a single device, I would dismiss it as bad, but two different ones?

Thanks,
lew
Re: Really strange problem with qnx6 fs  
We had similar issue with Transcend IDE flash drive (4G).  Our solution was to give up on this brand all together.  Not 
that there bad but Transcend and QNX don't seem to be compatible for some reason. 

At the time I didn't feel like paying big money to have this issue fix (custom engineering).  Plus from experience, 
through foundry, the feedback from QNX is on the low side.

> We're using a Transcend Compact Flash, model TS2GCF266, which is 2G, 266X SLC.
>   The device does support the FLUSH CACHE command, and it works fine with sync
> =mandatory.
> 
> However, if I create a qnx6 fs on the device and then write several megabytes 
> worth of files, it gets a low-level error and the device seems to go into some
>  sort of write-protect mode where we have to cycle the power to clear it.
> 
> What's odd is that we can do the exact same thing with qnx4 fs, and we can 
> write every sector on the device with dd.  In fact, I created a qnx6fs on 
> another similar CF, and dd'ed the entire image to the "bad" flash without any 
> problem.  The resulting CF boots up just fine, but any attempt to write a 
> large file to it produces errors in the slog and the device stops allowing 
> writes.
> 
> I've tried everything I can think of, including sync=none, turning off DMA, 
> etc., and it makes no difference.  "Something" that qnx6 fs is doing is 
> causing this flash device to give an error.
> 
> I've reproduced in in various different machines, with two different CF 
> modules, HOWEVER, it doesn't happen with every module.  I have a third CF of 
> the exact same make & model, and it does not exhibit the problem.
> 
> I loaded "devb-eide eide verbose=5,master=verbose=5 cam verbose=5" and have 
> the slog output of the resulting error, if anyone wants to look at it.  It 
> doesn't seem to have a lot of info, other than that it was doing a write of 
> 64K bytes and then the next thing is a "reset completed after ~300ms".
> 
> If it was just a single device, I would dismiss it as bad, but two different 
> ones?
> 
> Thanks,
> lew


Re: Really strange problem with qnx6 fs  
> We had similar issue with Transcend IDE flash drive (4G).  Our solution was to
>  give up on this brand all together.  Not that there bad but Transcend and QNX
>  don't seem to be compatible for some reason. 
> 
> At the time I didn't feel like paying big money to have this issue fix (custom
>  engineering).  Plus from experience, through foundry, the feedback from QNX 
> is on the low side.

I hear ya.  We've been using Transcend for many years because, in our experience, their quality has been good, and they 
were the first out with really high-performance CF that supported DMA.

That said, I would think that QNX would be interested in knowing why a standard, off the shelf CFA and ATA compliant 
device is not working properly.  As you say, there appears to be some compatibility problem.

Unfortunately, we have a large number of these already deployed in the field so switching to another brand is not so 
simple.  We discovered the problem while testing a field upgrade image that reformats the filesystem as qnx6, but in 
this case, the box had to be returned to us after the flash died during that process.  Yuck.

Thanks,
lew
Re: Really strange problem with qnx6 fs  
Update..... we took the slog info showing all of the commands that were issued to the drive and wrote a little program 
to reply them, and it reproduces the problem, completely independent from the qnx6 fs.  So it has nothing to do with the
 filesystem, but simple the pattern of writes that was done to the flash.

We then ported the test program to Linux and the problem occurs equally well.

So bottom line, QNX is not at fault and we will pursue this with Transcend.

Thank,

lew
Re: Really strange problem with qnx6 fs  
Hello,

would you be willing to share your test program? We have had issues with Transcend and it's stability lately too.

Regards, PKY

> Update..... we took the slog info showing all of the commands that were issued
>  to the drive and wrote a little program to reply them, and it reproduces the 
> problem, completely independent from the qnx6 fs.  So it has nothing to do 
> with the filesystem, but simple the pattern of writes that was done to the 
> flash.
> 
> We then ported the test program to Linux and the problem occurs equally well.
> 
> So bottom line, QNX is not at fault and we will pursue this with Transcend.
> 
> Thank,
> 
> lew


Re: Really strange problem with qnx6 fs  
> Hello,
> 
> would you be willing to share your test program? We have had issues with 
> Transcend and it's stability lately too.
> 
> Regards, PKY

Sure, no problem, here it is.

On QNX, it was originally simpler with readblock() and writeblock(), but those functions didn't exist on Linux so we 
changed to using lseek() instead.

Compile it with:
  cc -O3 -Wall cftest -ocftest

Run it like this:
  ./cftest /dev/hd0   (or whichever device you want to test)

It's non-destructive because it reads every block before writing it back.

So..... what problems have you been having with Transcend?

lew
Attachment: Text cftest.c 34.89 KB
Re: Really strange problem with qnx6 fs  
Hello,

We have used Advantech Single Board Computers (SBCs) with Transcend 512MB industrial CFs.

Those CFs started to be slow, develop bad blocks and some CFs froze after several days, they were undetectable in BIOS 
nor in card reader.

But it happened only in specific type of SBC (probably different chipset and timing of ATA communication). We have been 
unable to find the reason, so we switched to other brand of CF for a given type of SBC.

We stress tested these CFs in other SBC and they worked fine. Definitely not the problem of writing too much to the CF.

PKY

Re: Really strange problem with qnx6 fs  
Well, if it helps any, I wrote a little q&d program to erase the CF, hoping it might fix the problem.   It didn't have 
any effect, so I never turned it into a "nice" program, but you may find it helpful.

This program just blindly sends erase commands until it gets an error.  Your MUST NOT have devb-eide running at the same
 time as this program because it just writes the controller registers without any regard for other software trying to 
use the device.

lew
Attachment: Text cferase.c 1.68 KB