Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] Invalid Memory Access Error (C0000005) at address 0x0 in coverallsapp/github-action on Python 3.10 and Windows with SQLite Limit Issue #187

Open
menouarazib opened this issue Jul 25, 2023 · 6 comments

Comments

@menouarazib
Copy link

Hi,

I encountered an issue while trying to run the coverallsapp/github-action in my GitHub workflow on Python 3.10 and the latest version of Windows. The action is failing with an "Invalid memory access (C0000005)" error at address 0x0, and it seems to be related to SQLite. Here are the additional details about the error:

Error Details:

Run coverallsapp/github-action@v2
Run mkdir -p ~/bin/
coveralls-windows.zip: OK
Run coveralls report

⠀⠀⠀⠀⠀⠀⣿
⠀⠀⠀⠀⠀⣼⣿⣧⠀⠀⠀⠀⠀⠀⠀ ⣠⣶⣾⣿⡇⢀⣴⣾⣿⣷⣆ ⣿⣿⠀⣰⣿⡟⢸⣿⣿⣿⡇ ⣿⣿⣿⣷⣦⠀⠀⢠⣿⣿⣿⠀⠀⣿⣿⠁⠀⣼⣿⡇⠀⢀⣴⣾⣿⡷
⠶⣶⣶⣶⣾⣿⣿⣿⣷⣶⣶⣶⠶ ⣸⣿⡟ ⠀⢠⣿⣿⠃⠈⣿⣿⠀⣿⣿⢠⣿⡿⠀⣿⣿⣧⣤⠀⢸⣿⡇⣠⣿⡿⠀⢠⣿⡟⣿⣿⠀⢸⣿⡿⠀⠀⣿⣿⠃⠀⢸⣿⣧⣄
⠀⠀⠙⢻⣿⣿⣿⣿⣿⡟⠋⠁⠀⠀ ⣿⣿⡇⠀ ⢸⣿⣿⠀⣸⣿⡟⠀⣿⣿⣾⡿⠁ ⣿⣿⠛⠛⠀⣿⣿⢿⣿⣏⠀⢀⣿⣿⣁⣿⣿⠀⣾⣿⡇⠀⢸⣿⡿⠀⠀⡀⠙⣿⣿⡆
⠀⠀⢠⣿⣿⣿⠿⣿⣿⣿⡄⠀⠀⠀ ⠙⢿⣿⣿⠇⠈⠿⣿⣿⡿⠋⠀⠀⢿⣿⡿⠁⠀⢸⣿⣿⣿⡇⢸⣿⣿⠀⣿⣿⣄⣾⣿⠛⠛⣿⣿⢠⣿⣿⣿ ⣼⣿⣿⣿ ⣿⣿⡿⠋⠀
⠀⢀⣾⠟⠋⠀⠀⠀⠙⠻⣷⡀⠀⠀

v0.6.4

🔍 Detected coverage file: coverage.xml
🔍 Detected coverage file: .coverage
Invalid memory access (C0000005) at address 0x0
[0x0] ???
[0x7ffd862c56e5] sqlite3_memory_highwater +245 in C:\Program Files\Amazon\AWSCLIV2\sqlite3.dll
[0x7ffd8637ff8c] sqlite3_limit +1980 in C:\Program Files\Amazon\AWSCLIV2\sqlite3.dll
[0x7ff7e84cf8bb] ???
[0x7ff7e84cff18] ???
[0x7ff7e84cff7b] ???
[0x7ff7e84cb918] ???
[0x7ff7e84a3bff] ???
[0x7ff7e84684b1] ???
[0x7ff7e83f20d0] ???
[0x7ff7e8408819] ???
[0x7ff7e8408d35] ???
[0x7ff7e88a429c] ???
[0x7ffda7e34de0] BaseThreadInitThunk +16 in C:\Windows\System32\KERNEL32.DLL
[0x7ffda905ec4b] RtlUserThreadStart +43 in C:\Windows\SYSTEM32\ntdll.dll
Error: Process completed with exit code 1.

@mrexox
Copy link
Contributor

mrexox commented Jul 25, 2023

Hey! Thank you for reporting this issue. I will be working on it soon, but just to not block you, I can suggest the following workaround:

  1. Run coverage xml before reporting the coverage. This should convert the .coverage file (which is an SQLite3 database file) into coverage.xml (which is a Cobertura XML report).
  2. Specify file: coverage.xml option for coverallsapp/github-action action.

I'll be glad to help if you have any questions.

@indiVar0508
Copy link

Hi @mrexox ,

I am doing a PoC in my python project to learn how to use coverall but it seems it keeps on giving me 0% coverage even if is convert .coverage file to coverage.xml, can you point me in the right direction on what i might be doing wrong here?

      - name: manually triggered tests
        run: |
          pytest tests/ --cov=indi_dummy --cov-report lcov
          coverage xml
      - name: Coveralls
        uses: coverallsapp/github-action@master
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          debug: true
          file: coverage.xml
          path-to-lcov: ./coverage.lcov

ref: indiVar0508/Dummy#23

even after push i merge and push event triggers on master branch coverage is still coming 0% :/

Thanks!

@mrexox
Copy link
Contributor

mrexox commented Jul 27, 2023

Hey! I've tried to run the tests locally but I see the same results - no hits for any line. Not sure why it is that. Maybe it is related to some configuration?

There is also a warning in the CI that No data was collected

tests/test_main.py ....                                                  [ 40%]
/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/coverage/control.py:801: CoverageWarning: No data was collected. (no-data-collected)
  self._warn("No data was collected.", slug="no-data-collected")
tests/test_math_code.py ......                                           [100%]

---------- coverage: platform linux, python 3.8.[17](https://github.com/indiVar0508/Dummy/actions/runs/5679087475/job/15390585034#step:5:18)-final-0 -----------
Coverage LCOV written to file coverage.lcov


============================== 10 passed in 0.10s ==============================
Wrote XML report to coverage.xml

Sorry, I am not familiar with Pytest, so I can't say why the results are so 😕

@indiVar0508
Copy link

Thanks @mrexox for pointing that out , in my local this was not happening turns out i needed to add a init.py in my test folder if i use pytest-cov plugin now it works thanks
thanks again for quick response and help!

@ZoranPandovski
Copy link

Any updates on this? We are having the same issue

@mrexox
Copy link
Contributor

mrexox commented Sep 7, 2023

@ZoranPandovski, we are still struggling with a fix for this bug. There is a workaround: https://github.com/coverallsapp/coverage-reporter#pytest-cov-test_tube-beta. Please, do the following:

  1. Convert the .coverage SQLite3 report into XML report with coverage xml command
  2. Specify the XML file with file: coverage.xml option

The problem is - we can't make Crystal link SQLite3 library statically for Windows binary. We are still looking for a solution. It may probably take a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants