Again, those are not error messages, or they would be on level “ERROR”, not “DEBUG”.
They are debug messages, hence the level “DEBUG”.
They are signs of normal regular maintenance work that is done in the background while the daemon is running.
They are no sign of any unnormal behavior.
So no, I have no idea why your build might hang, as you did not share any relevant information.
If you do not see anything in the debug log, besides those normal messages that might tell you where it is hanging, you probably have to use a profiler, for example through GitHub - gradle/gradle-profiler: A tool for gathering profiling and benchmarking information for Gradle builds to investigate what is happening in your build, or maybe you can start with simply looking at a thread dump.