-
Notifications
You must be signed in to change notification settings - Fork 37
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
macOs Big Sur: ERROR: checkpoint request failed #140
Comments
Hit the same error on Big Sur. It looks like the wait for datasource isn't working: I had one setup with ~7 tests of which the first 3 where failing. Depending on timing, sometimes all worked, sometimes not. I created a git repo with a minimal setup for reproduction: https://github.com/dirkbolte/flyway_zonky |
@dirkbolte Thank you very much for the reproducer. I tried it and I'm really getting an error, but it's different from the one mentioned in this report. It fails with @GreteM2nd I guess that the error could probably be specific to your system. The |
@GreteM2nd Also make sure you have enough disk space. |
There is a similar issue, but without a solution: https://www.postgresql.org/message-id/f916d72a0605291223v3a5e1b9bwa57cc9eac96202a0%40mail.gmail.com |
@tomix26 thanks for the hint - the upgrade got me further as it showed additional log messages but didn't fix it for me yet. I now ended up with 13.1.
|
Clearing the I didn't have @tomix26 you mentioned earlier that some things were fixed with upgrading |
@dirkbolte The version 13.1 is not supported on macOS Big Sur at this moment, you have to use one of the latest supported versions ( @GreteM2nd It isn't neccesary to add Ok, since I can't reproduce the problem, I will need the complete logs of your tests and also the content of your |
@tomix26 I tried again with 12.1.0-1 and it still fails - is there anything beside the test logs I can provide? Unfortunately I cannot find any additional log files.
Should I keep adding it to this issue or move it to a new issue? |
This is an issue for me too. I'm happy to provide any details needed. I'm using |
As I wrote, I need more information:
|
Hi @tomix26, I have emailed you the details. |
Let me give more details I found:
I tailed the logfile and I found the followings. Note that Postgres is starting and cannot open pg_xact/0000 and goes into fixing the file after a time. Meanwhile tests are started and cannot connect to database and the first few test cases are failing with "ERROR: checkpoint request failed" message. Finally at the 3rd attempt pfycmsqjhjna database is created fine and you can see Liquibase is kicking in.
|
Hi @tomix26, did you get my email last week with the details you requested? Is there anything I can do to help? |
I got the same error. Below an extract from the log when starting my IT. First run after deleting the embedded-pg folder
second run after deleting folder
I can confirm that it works by adding the following dependency to the pom.
|
Hi @andywhite27, yes I got it, thank you very much. And thank you all for the provided details. The zipped postgres directory you sent is identical to my directory, so the binaries are not corrupted and the problem will probably be somewhere else. I also checked the logfile and it seems that all the errors are similar, however, the problem occurs when accessing different files.
So I guess the root cause is the So, are you using Eset or any other antivirus service? If so, please try to temporarily disable the service to see if the tests will be passing or not. If not, I will send further instructions to investigate the problem. |
I have an antivirus software installed which also offers real-time file system protection (bitdefender in my case). While isolating the error I also turned it off to eradicate side effects but maybe I missed something. Will try it again. |
I also have Eset and when real-time file system protection is disabled then the problem doesn't seem to appear - as soon as it's enabled then the issue occurs again. |
I have AVG. With 'File Shield' on it consistently fails with it off it consistently works! Thanks very much for your investigation and insight @tomix26! |
I am experiencing the same issue, but even with my 'Realtime Shield' off I continue to get the following error.
|
Maybe your antivirus performs some type of scan even after turning off the realtime shield. I'm just guessing, I can't verify, I couldn't reproduce the problem. Is there anyone who doesn't use antivirus at all and is facing with the same issues? |
Thank you for trying, I actually got it to build by just uninstalling my antivirus completely. 👍🏽 |
Have tried turning the real-time file protection off - still the same problem. In the logs I have the following:
I've also seen |
I tried putting a breakpoint after the migrations had been applied: managed to actually connect to the database using a client, saw all the migrations actually applied. Haven't tried any updates/inserts though. BTW, I had had |
@xCoBaLTz Thank you very much for the information 👍 @dc-up42 Please try the latest versions of postgres binaries mentioned here: zonkyio/embedded-postgres-binaries#21 (comment) |
@tomix26 Sadly, doesn't work. Tried several different versions between 10 and 13 with the suffix UPDATE: Got some log messages I haven't seen before, while running the test several times without cleaning the logs
|
@dc-up42 The error in the attached log file is the same one that is reported in this issue. So please try to temporarily uninstall the antivirus from your computer. Because for some reporters, turning off real-time protection was not enough, but a complete uninstall has always solved the problem. |
@tomix26 Thanks for responding here. On the corp laptop I'm not allowed to do that :( |
Sure, that's understandable. As a last resort, you can try to change the destination of the database data from the temp directory (java.io.tmpdir) to another directory. Maybe the antivirus will calm it down. This should be possible to change using system property: |
I have to add this row in application properties in my project ? |
No, it's a system property, so it needs to be passed at the start of the java process. If you are using Maven, you can set it in the configuration of Surefire or Failsafe plugin. Detailed instructions are here: https://maven.apache.org/surefire/maven-surefire-plugin/examples/system-properties.html. |
and what about gradle ? what would be the best practice ? |
In my opinion, the best practice is to use Google ... |
create or locate gradle.properties file in your project folder. Add this line.
Note that, I did not test this suggestion yet. You can find more description about gradle.properties here: https://docs.gradle.org/current/userguide/build_environment.html |
I added and app.prop and dependency following with your documentation and all work well. But it is a temporary solution. Will be waiting for updates |
do you have any results? |
Unfortunately this happens on me also. macOS 11.2.3. Setting Error was:
I cannot help with testing this though, since we decided to move on with Testcontainers to avoid similar issues in the future. |
@bfrggit If you want, you can also use this library together with Testcontainers using Docker provider. Note that since version 2.0.0 this will be the default settings. |
Here is my tested and working solution:
This is going to fix test running with embedded Postgres on your local. This will not impact your CI process because it will continue to use the default settings. Of course you have to take care of those settings if you have similar problems in that environment but definitely this will solve the problems transparently on your local development environment. |
@wilddog1979 Thanks for the info. My understanding is that this may impact your CI if your runner does not have Docker. For us, before seeing this workaround, we changed to use testcontainers directly. We noted that by using this proj we can probably avoid some setups needed to configure application properties for the container but this also means that we are adding one more dependency. |
I faced with the same issue after updating to MacOS Big Sur. I am using io.zonky.test:embedded-postgres to start Postgre before execution of integration tests and after updating from 1.2.6 to 1.3.0 I can confirm that everything working fine. |
Getting
Failed to load ApplicationContext
when running multiple tests together after macOS update to Big Sur. When running just one test then everything usually works the first time after restarting the computer, but later the error starts to occur even with running just one test.Caused by: org.postgresql.util.PSQLException: ERROR: checkpoint request failed at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2532) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2267) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:312) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:448) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:369) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:153) at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:142) at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$DatabaseInstance$DatabaseTemplate.executeStatement(ZonkyPostgresDatabaseProvider.java:163) at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider$DatabaseInstance$DatabaseTemplate.createDatabase(ZonkyPostgresDatabaseProvider.java:156) at io.zonky.test.db.provider.impl.ZonkyPostgresDatabaseProvider.getDatabase(ZonkyPostgresDatabaseProvider.java:94) at io.zonky.test.db.provider.impl.PrefetchingDatabaseProvider$PrefetchingTask.lambda$new$0(PrefetchingDatabaseProvider.java:252) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at io.zonky.test.db.provider.impl.PrefetchingDatabaseProvider$PrefetchingTask.run(PrefetchingDatabaseProvider.java:259) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ... 1 more
Updated to 1.6.1 to resolve a different issue on Big Sur, but this one still remains.
The text was updated successfully, but these errors were encountered: