Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Hello everyone,

We have a very complex android application where we use Utlralite 16 and Mobilink 16 as DBMS/sync products.

The field has reported some I/O errors while using the device and despite looking at the documentation (http://dcx.sap.com/index.html#sa160/en/saerrors/errm305.html), we don't really get what can be the root cause of this and help would be greatly appreciated.

Those come in two flavors : - I/O Error 200019 - I/O Error 200020

The devices concerned still have free space on the disk and we ensure a device goes not to sleep by taking a partial wake lock.

Does anybody have any idea of what's going on under the hood / have already experienced such errors ?

asked 08 Jun '16, 05:56

yan's gravatar image

yan
806712
accept rate: 0%

edited 08 Jun '16, 05:56

The I/O Error 20019 is a read failure and the 200020 error is a write failure. Where are you storing the database?

(08 Jun '16, 08:46) Chris Keating
Replies hidden

We're storing in a folder on /sdcard/<application-name>/. /sdcard/ is an internal drive on our devices.

Maybe another note : the app seems to run pretty smoothly on 3000 devices but we are experiencing this issue on a few of them.

(08 Jun '16, 08:59) yan

When you say a few, what percentage would be failing? Could be a bad set of SD cards perhaps?

(08 Jun '16, 09:45) Chris Keating
Replies hidden

I can't tell an exact percentage as we gathered bug reports containing those failures on, actually, 6 devices (out of 3K).

We can't exclude errors on their internal disk. But it doesn't happen systematically. When installing a fresh DB, it starts again as if the problem never appeared.

Could it be any other cause, i.e. locking ? Transaction not finished in a clean way ? Index refresh interrupted ?

(08 Jun '16, 09:58) yan

It is an indicator that the database I/O has not worked during read and write. It may be that the database file has some sort of corruption and replacing the database resolves that corruption. If you have retained copies of the database from the problem devices, you may want to run ulvalid to check the health of the database file.

(08 Jun '16, 11:11) Chris Keating

As Chris commented, these indicate a read or a write error -- meaning the system call returned an error code when UltraLite tried to read or write a page in the database or temporary file.

These do not indicate any database/SQL level issues, like locking or uncommitted transactions or indexing operations.

These do not necessarily indicate a corrupt database. When UltraLite receives the error, it will suspend operations on the database file in order to avoid corruption. When restarted, the database will recover to the last committed transaction. The error could be transient or recurring, depending on the cause.

Typically this is caused by some kind of hardware or file system problem.

If the application/database is restarted, does the error occur again? (Note that if you don't close and reopen the database, the same error will be reported on subsequent database requests because the database is locked. All open connections must be closed.)

The ulvalid utility can detect and provide information about some kinds of database corruption.

Historically we have seen many surprising problems with SD cards. It is probably worth trying a different card to see if it affects the error (if you are able to swap it on your devices).

permanent link

answered 08 Jun '16, 21:13

Tim%20McClements's gravatar image

Tim McClements
2.0k1830
accept rate: 35%

Mr McClements and Keating, thanks for your answers.

Actually, the application crashed due to a write error and then restarted. When it restarted, it crashed again due to a read error. We do not release all the connections when such a crash occurs. Just the concerned one. We will then try to do so and see if we can recover.

(09 Jun '16, 02:57) yan
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×371
×162

question asked: 08 Jun '16, 05:56

question was seen: 1,945 times

last updated: 09 Jun '16, 03:04