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

Brim not exiting #1707

Closed
philrz opened this issue Jun 11, 2021 · 6 comments · Fixed by #1709, #1711 or #1713
Closed

Brim not exiting #1707

philrz opened this issue Jun 11, 2021 · 6 comments · Fixed by #1709, #1711 or #1713
Assignees
Labels
bug Something isn't working
Milestone

Comments

@philrz
Copy link
Contributor

philrz commented Jun 11, 2021

Repro is with Brim commit fd23d53 using nightly build https://storage.googleapis.com/brimsec-releases/brim/v0.25.0-prerelease-fd23d537.0/macos/Brim-0.25.0-prerelease-fd23d537.0.dmg.

I repro by starting from a clean app install with no prior state. As shown in the first attached video, on macOS when I hit Command-Q to quit, Brim does not exit. The dot remains below the app icon in the dock, right-clicking and selecting "Quit" seems to have no effect, and I ultimately need to enter the Activity Monitor and do a "Force Quit". In the video I'm also tail-ing both the "main" and "zlake" logs in the two windows open at the top, but there's no evidence of crashes or other logged errors.

fd23d53-Repro.mp4

Compare with the prior nightly build, which was at commit 6427467 and can be downloaded from https://storage.googleapis.com/brimsec-releases/brim/v0.25.0-prerelease-64274672.0/macos/Brim-0.25.0-prerelease-64274672.0.dmg. As shown in this next video, there the Command-Q quit triggered the immediate and expected full exit.

6427467-Works.mp4
@philrz philrz added the bug Something isn't working label Jun 11, 2021
@philrz philrz added this to the Data MVP0 milestone Jun 11, 2021
@mason-fish mason-fish self-assigned this Jun 11, 2021
@philrz
Copy link
Contributor Author

philrz commented Jun 14, 2021

Verified in Brim commit f452a2a via nightly build https://storage.googleapis.com/brimsec-releases/brim/v0.25.0-prerelease-f452a2a6.0/macos/Brim-0.25.0-prerelease-f452a2a6.0.dmg.

As shown in the attached video, now when I quit the app via Command-Q, the dot below the Brim icon in the dock disappears immediately, indicating the successful exit that was not happening before.

Verify.mp4

Thanks @mason-fish!

@philrz
Copy link
Contributor Author

philrz commented Jun 16, 2021

I'm reopening this one, as a beta user reported in a thread on public Slack that they observed a similar symptom on Linux. I just reproduced in on an Ubuntu 18.04 VM using Brim commit 381539c using nightly build https://storage.googleapis.com/brimsec-releases/brim/v0.25.0-prerelease-381539c8.0/linux/Brim-0.25.0-prerelease-381539c8.0.deb as shown in the attached video.

Repro.mp4

To confirm we're probably looking at the same root cause, I also doubled back and ran another test with nightly build https://storage.googleapis.com/brimsec-releases/brim/v0.25.0-prerelease-64274672.0/linux/Brim-0.25.0-prerelease-64274672.0.deb which was the last one before the changes in #1702 that I understand to be the root cause of what was fixed in the linked PR, and that did not exhibit the problem.

@philrz philrz reopened this Jun 16, 2021
@philrz
Copy link
Contributor Author

philrz commented Jun 16, 2021

For completeness, I also just double checked on Windows using https://storage.googleapis.com/brimsec-releases/brim/v0.25.0-prerelease-381539c8.0/windows/Brim-Setup-0.25.0-prerelease-381539c8.0.exe and thankfully the problem does not appear there. The entire Brim process hierarchy disappeared from Task Manager once I closed the app. 😅

@philrz
Copy link
Contributor Author

philrz commented Jun 16, 2021

I've verified the Linux fix in Brim commit 95581f9 using build https://storage.googleapis.com/brimsec-releases/brim/v0.25.0-prerelease-95581f92.0/linux/Brim-0.25.0-prerelease-95581f92.0.deb.

As shown in the attached video, now when exiting Brim, ps shows the processes are gone as would be expected.

Verify.mp4

Thanks @mason-fish!

@philrz
Copy link
Contributor Author

philrz commented Jun 18, 2021

Alas, it looks like I spoke too soon above when I said the problem didn't exist on Windows! While I did confirm at the time that the process hierarchy disappeared from Task Manager when I closed the app, what I did not notice is that once the hierarchy disappeared from the "Apps" section, a bunch of Brim processes then appeared in the "Background processes" section. As long as these are present, I can't successfully relaunch the app. It's only by killing a particular one in Task Manager that they all disappear and it's then possible to relaunch the app. See the attached video, which shows the repro with Brim commit 95581f9 using nightly build https://storage.googleapis.com/brimsec-releases/brim/v0.25.0-prerelease-95581f92.0/windows/Brim-Setup-0.25.0-prerelease-95581f92.0.exe.

Repro.mp4

I did also double back to run the same test with nightly build https://storage.googleapis.com/brimsec-releases/brim/v0.25.0-prerelease-64274672.0/windows/Brim-Setup-0.25.0-prerelease-64274672.0.exe which was the last one before the changes in #1702, and the problem did not show there. So, like the recent fix for Linux, perhaps we need some special handling to deal with the hidden window.

@philrz
Copy link
Contributor Author

philrz commented Jun 21, 2021

Verified in Brim commit 55390e8 using prerelease package https://storage.googleapis.com/brimsec-releases/brim/v0.25.0-prerelease-55390e81.0/windows/Brim-Setup-0.25.0-prerelease-55390e81.0.exe.

As shown in the attached video, now when I quit the app, there's no longer Brim "Background processes" shown in the Task Manager. Because of this I'm also able to open the app again.

Verify.mp4

Thanks again @mason-fish!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants