New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 686484 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Avira causes random I/O error when write to Web SQL

Reported by awcal...@gmail.com, Jan 28 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:51.0) Gecko/20100101 Firefox/51.0

Steps to reproduce the problem:
1. Enable Avira Real Time Protection
2. Do 100-200 sql insert queries to Web SQL
3. Some of the queries will fail with a SQL Error: could not execute statement (778 disk I/O error)

What is the expected behavior?
SQL Queries should not fail as with Avira Realtime Protection disabled.

What went wrong?
Avira Real Time protection negatively impacts on Web SQL writes causing random I/O errors, if Real Time protection is disabled queries run without errors.

Attaching a test addon to reproduce the issue.

Detailed video with the test addon work and disabling/enabling Real Time Protection is here: http://nimb.ws/yvNX8l

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 56.0.2924.76  Channel: n/a
OS Version: windows 10
Flash Version: Shockwave Flash 18.0 r0
 
test.zip
8.3 KB Download
Labels: Needs-Triage-M56
Labels: Prestable-56.0.2924.76
Cc: krajshree@chromium.org
Components: Platform>Extensions
Labels: Needs-Feedback
Tested this issue on Win-10 using chrome reported version #56.0.2924.76 and latest canary #58.0.2996.0.

Steps followed to reproduce this issue are as follows:

1. Downloaded the attached test.zip folder.
2. Added the avira test extension to chrome://extensions.
3. Disabled and enabled the avira test extension.
Note: Couldn't find the shortcut for avira test extension (to disable)  in the task bar after adding the extension.
4. Clicked on the background page link.
5. Didn't observe any random I/O errors.

awcalibr@ - Could you please verify the screencast and please let us know if anything missed from our side.

Thanks...!!
686484.mp4
2.5 MB View Download

Comment 4 by awcal...@gmail.com, Jan 30 2017

krajshree@, thanks for taking a look at that, but this issue is related to Avira antivirus itself, not a chrome extension. So you need to install Avira Antivirus and then enable Real Time protection. Avira Antivirus adds a small read icon with umbrella to the Windows Taskbar and if the umbrella is opened you have Real Time protection enabled and can start to run test.zip extension.
Project Member

Comment 5 by sheriffbot@chromium.org, Feb 6 2017

Labels: -Needs-Feedback Needs-Review
Owner: krajshree@chromium.org
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 6 by awcal...@gmail.com, Feb 22 2017

Any updates on this? I think some addons that use WebSQL might be affected if their users have Avira Antivirus with RealTime protection enabled. Perhaps the topic title is confusing, it should contain "Avira Antivirus" instead of just "Avira", I thought it was well known enough brand. To reproduce the issue the antivirus need to be installed, it can be downloaded from https://www.avira.com.
Cc: kkaluri@chromium.org
Labels: -Needs-Review -Needs-Triage-M56 M-58
Owner: ----
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on windows 10using chrome dev M56-56.0.2924.76 and earlier version of chrome M30-30.0.1549.0. This is a non-regression issue and marking it as untriaged.

Attaching the screen-shot for reference.

Issue 686484-M30.PNG
120 KB View Download

Comment 8 by awcal...@gmail.com, Mar 15 2017

not surprisingly, but this is also reproducible on a web page, I'm attaching a html page with reproduction example, just open it in Chrome browser and look at the console, Avira Antivirus real-time protection must be enabled at that time.
avira-rt.html
874 bytes View Download
Components: -Platform>Extensions Blink>Storage>WebSQL
Labels: Stability-ThirdParty
As comment #4 indicates, this is a problem with the full Avira client, not the extension.  Adjusting labels accordingly.
Owner: sh...@chromium.org
shess@ - I notice in the sqlite source that it has optional retry logic for working around antivirus behavior (SQLITE_FCNTL_WIN32_AV_RETRY) - 25ms retry on certain operations.

Can I assume this is not applicable given we provide our own VFS? Have we looked into this in the past?

Comment 11 by sh...@chromium.org, Apr 20 2017

jsbell@, sorry, I missed your comment at the time.

Looking at the code referenced, I am terrified that it exists, but AFAICT it already has appropriate defaults.  The VFS API has two levels, the outer VFS level handles things like open and delete, while the I/O level applies to open files.  Our WebSQL VFS layer uses the regular SQLite I/O code, not even wrapped, while replacing-and-injecting with the VFS code.  In this case, it _sounds_ like the open (which we mess with) is working fine, but the inserts (which we don't mess with) don't work.

But I suppose it could be a problem with the -journal file?  In case of failure, ChromiumOpen() in the VFS will return SQLITE_CANTOPEN, but since the -journal is used as part of implementing transactions, it's possible that is converted to some other error.  778 is SQLITE_IOERR_WRITE, which isn't super descriptive.  I guess it could be tested by wiring ChromiumOpen() to tests flags (to see if it's for a -journal file) and inject random failures.  Maybe.
Do we know if other consumers of sqlite within chrome (like history or cookies) are also experiencing IO errors with this AV scanner?

Comment 13 by sh...@chromium.org, Apr 25 2017

I circled back to check if my SQLITE_CANTOPEN hypothesis is plausible.  Basically, I had -journal open return SQLITE_CANTOPEN randomly.  The avira-rt.html file has the wrong signature for the executeSql() error function (transaction is the first parameter, apparently), and after that change it shows message "could not execute statement (14 unable to open database file)", which is SQLITE_CANTOPEN.  So that hypothesis is wrong.

If someone wants to dig into it further, look in os_win.c winIoerrCanRetry1(), which gives a list of the codes SQLite considers retry-able.  The list is pretty small.  I guess maybe it would make sense to instrument sqlite3.c to figure out exactly where it is happening.
eeek, there's a winIoerrCanRetry2 too apparently winIoerrCanRetry1 wasn't enough?

It looks like sqlite3_log()'ing could help find where what is happening. It might be worth plumbing that output to the devtools console to help debug this and other problems?

Comment 15 by sh...@chromium.org, Apr 25 2017

winIoerrCanRetry2 is not defined, you can define it to add additional cases.
Owner: pwnall@chromium.org
Sorry for the tangent, but has a bug been filed with Avira?
In case the question above is for me: We(Nimbus Web Inc.) tried to communicate with Avira via their support, however it looked like they didn't want to look into this issue. So I decided to submit a bug here to get more information, cause I had very superficial understanding of this issue and couldn't show them where the problem exactly is.
Cc: pwnall@chromium.org
Labels: -Pri-2 Pri-3
Owner: ----
Status: Available (was: Untriaged)
#18: Thank you for the quick response! 
Open
Project Member

Comment 21 by sheriffbot@chromium.org, May 3 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold
Status: Archived (was: Untriaged)

Sign in to add a comment