Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

[CASE 1107176] Building a version generate an unkillable unity process

Discussion in '2018.3 Beta' started by aurelien-morel-ubiant, Dec 5, 2018.

  1. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    Hello guys,
    one of our developper encounters a very odd behaviour on Unity 2018.3 since something like b6 or b8 (he doesn't rememeber the version).
    When he builds on its computer (and only on its computer) the build process succeed but after this, the Unity process becomes unkillable even with the task process from windows. If he wanna get rid of this, he must shutdown/restart its computer.

    It's computer is on : Windows 10
    Unity current version is 2018.3b12
    The build target that he tries to build is Android
    Editor.log contains nothing concerning an error.

    It's a really annoying one... Have you any hint on what we can do or where we can check a log that could explain this ?

    We can't create a repro step cause it seems to be computer related but hard to be sure of this.
     
    Last edited: Dec 5, 2018
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,135
    Could you please ask them to submit a bug report so we can look at their log files?
     
  3. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    mmm @LeonhardP What we can do ?
    I ask him to generate a build to have a buggy unity state then submit a bug ?
     
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    How to report a bug and what things to include is described in this document:
    https://unity3d.com/unity/beta/guide-to-beta-testing#tab-3

    After you submitted the bug-report, you receive a confirmation email with a bug-report Case number. Please post this Case number here (in this forum thread) for Unity staff to pick up.
     
  5. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    I know how to report it Peter :D

    My main issue is I think they will find nothing in those report cause we tried to analyze them (I mean the log) maybe we missed something (that could be).

    By the way, our developer will report it after an incriminated build and we gonna hope they will found something in it... Cause currently it's a really really annoying issue for him.
     
  6. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,135
    You could try to attach Visual Studio to the editor before building and then break the execution after the build succeeds/you tried to terminate the process, and attach the callstack to the report.
     
  7. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    @LeonhardP We just try to use this method :
    UnityEngine.StackTraceUtility.ExtractStackTrace()
    which display the same result than Visual Studio would to in stack trace window during a breakpoint.

    After a build and with the event throws by your engine we plug this :

    Code (CSharp):
    1.  
    2. StramWriter sw = File.CreateText("ExtractedStackTrace-Build.txt");
    3. sw.Write(StackTraceUtility.ExtractStackTrace());
    4. sw.Close();
    5.  
    6. //And in the EditaoApplication.quit event this :
    7.  
    8. StramWriter sw = File.CreateText("ExtractedStackTrace-Quit.txt");
    9. sw.Write(StackTraceUtility.ExtractStackTrace());
    10. sw.Close();
    11.  
    That create 2 stack traces files but I think you will do nothing with that.

    BUT

    After trying to close Unity after a build we create a dump file of the Unity.exe process (that did not respond) memory
    The dump is 1.9Go maybe this one could help you more thant those stack trace ?

    Or maybe we missed that you called stack trace ?
     

    Attached Files:

    LeonhardP likes this.
  8. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,135
    Yes, could you please upload it via the bug reporter?
     
  9. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    Ok, we will submit that. It will just take some time to upload even with fiber :)
    I'll update the thread title with the case number as soon as we have it.
     
    LeonhardP likes this.
  10. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    @LeonhardP bug report uploaded !
    The case is 1107176.

    And just an update, but it was obvious due to the file uploaded right above but the EditorApplication.quitting is called even if the application doesn't close.
     
    LeonhardP likes this.
  11. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    It seems Unity gets stuck in the kernel deleting "D:/Unity Projects/UnityRepos/SecondGitRep/unity-mobile-app/UnityProject/Temp/gradleOut/unity-android-resources/res/drawable-hdpi" file. Is that file open by something? Perhaps an anti virus software is looking at it?
     
  12. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    I'll check tomorrow morning with concerning developer.

    From my point of view :
    The file is open by nothing (as far as I know cause we all follow the same process to build).
    I will ask him if he has an antivirus software but as far as I know this issue doesn't exist prior b8 or b12 (he doesn't remember since when this happening exactly) so I don't think it's related to any third party software.
     
  13. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    aurelien-morel-ubiant likes this.
  14. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    Sure, if the antivirus track gives nothing. We gonna do that. Cause he always has a 100% repro on its computer ;)
     
  15. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    @LeonhardP maybe you know this, how can we add a new dump file to our ticket ?
    Cause we can't answer to this by mail cause a 2G dump file will not be send by Gmail :)
     
  16. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,135
    I'll send you a link via email to a cloud repository where you can upload it.
     
  17. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    Upload of 4Go of memory dump done !

    To be sure of what we send in the dump file.
    We started the recording when the gradle process start to build the final apk and we closed the recording 45seconds after we tried to close the Unity process.
     
    Last edited: Dec 7, 2018
    LeonhardP and Peter77 like this.
  18. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Here's the problem:

    upload_2018-12-7_8-45-4.png

    As I mentioned before, Unity gets stuck when closing a file. The trace allowed me to dig into why that happens. It seems that "mfehidk.sys" driver is hooking the file system, and some thing REALLY expensive inside (I can't tell what since I don't have its debug symbols) and it gets stuck in an infinite loop. IO operation never completes. It seems like it's part of McAfee antivirus suite. Can he try uninstalling it (and making sure that driver is fully removed) and seeing if it fixes Unity hanging? By the way, this explains why you can't kill it - it's stuck in the driver code.
     
    LeonhardP and Peter77 like this.
  19. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    Ok seems legit. The only interrogation we get this afternoon was, why this happening since Unity 2018.3 and not before (was on 2017.4 before this version).

    And that explains why this doesn't happen on all other developer computer because ours are newer and doesn't have any antivirus software installed by default.

    We gonna take some time on Monday to check this (we are currently in week-end). Just hope we could remove McAfee cause it installed by default on computer and I remembered that kind of Antivrus is quite a pain to remove :/
     
  20. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    @LeonhardP @Tautvydas-Zilys our developer removed mcAfee from his computer and the problem is gone !
    So I think the bug is closed, we just doesn't know why it started to be triggered after a specific 2018.3 beta version.

    But so far so good :)
     
    LeonhardP likes this.