-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
MinGW fails with access violation writing error #1818
Comments
@StrikerRUS I am not sure about the root cause, maybe some build flags for mingw are wrong ? |
All tests are passed when diff --git a/.appveyor.yml b/.appveyor.yml
index 6ea6da0..6f8daf2 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -42,7 +42,7 @@ build_script:
python setup.py install)
test_script:
- - pytest %APPVEYOR_BUILD_FOLDER%\tests\python_package_test
+ - pytest %APPVEYOR_BUILD_FOLDER%\tests
- cd %APPVEYOR_BUILD_FOLDER%\examples\python-guide
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 057302b..1540cd4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -113,7 +113,7 @@ if(USE_HDFS)
endif(USE_HDFS)
if(UNIX OR MINGW OR CYGWIN)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -O3 -Wextra -Wall -Wno-ignored-attributes -Wno-unknown-pragmas -Wno-return-type")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -Wextra -Wall -Wno-ignored-attributes -Wno-unknown-pragmas -Wno-return-type")
endif() Log: https://ci.appveyor.com/project/guolinke/lightgbm/builds/20151191/job/5gi6ebjpevehk06n UPD: Log: https://ci.appveyor.com/project/guolinke/lightgbm/builds/20152421/job/vhauwfo88v7322gq UPD2: Log: https://ci.appveyor.com/project/guolinke/lightgbm/builds/20154024/job/38212pryi7mhwt2s |
Linking #1588. |
The flag which causes a crash is |
Thanks @StrikerRUS so much. is this problem solved ? |
@guolinke Happy to help! Unfortunately, I can't find any information about the |
I was wrong with the link above - it points to the latest master gcc. So, I installed MinGW-w64 with gcc version 8.1.0 locally and discovered that I'm able to reproduce the issue. UPD:
This produces the following file on my machine:
I replaced all |
@StrikerRUS |
@guolinke Yep! And it seems to me that it can be solved only by removing |
@StrikerRUS is this still happening? |
The last time we received a report that might be related was December 2021 (#4192), but that person never responded. I don't remember seeing it in LightGBM's CI in the last year. I think we could probably close this issue, but will let @StrikerRUS decide. |
Yeah, still happens occasionally. |
I don't recall seeing this in the last year, and the project still has pretty good CI coverage for Windows + MinGW across CLI, Python, and R jobs. I'm going to close this. |
This issue has been automatically locked since there has not been any recent activity since it was closed. |
Just moving my comment from old PR to a separate issue for the discussion and easier searching for users.
While working on that PR, I found weird bug under MinGW. The same symptoms were described in #1475. When I tried to run all examples by
pytest %APPVEYOR_BUILD_FOLDER%\tests
instead ofpytest %APPVEYOR_BUILD_FOLDER%\tests\python_package_test
, two C_API tests were passed succesfully, but all other tests failed withOSError: exception: access violation writing 0xFFFFFFFF93400000
. At present this bug is avoided by running only Python tests (without C_API). I suppose, it's somehow connected to that the samelib_lightgbm.dll
is loaded twice from different places (from installation directory for C_API tests and from python-package directory for Python tests).Environment info
Operating System: Windows
Compiler: any MinGW-w64
Error message
Full log: https://ci.appveyor.com/project/guolinke/lightgbm/builds/20010549/job/ewn044xw9dja8g9y
Steps to reproduce
.appveyor.yml
file:The text was updated successfully, but these errors were encountered: