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

Lasim.exe process sometimes doesn't exit #39

Open
Tipoff4317 opened this issue Aug 19, 2023 · 8 comments
Open

Lasim.exe process sometimes doesn't exit #39

Tipoff4317 opened this issue Aug 19, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@Tipoff4317
Copy link

Tipoff4317 commented Aug 19, 2023

Describe the Bug
Lasim.exe process sometimes doesn't exit. Unfortunately, I can't find a common path that is completely reproducible, but would you keep an eye on it?

I have looked at the logs both when the process exits, and when it doesn't exit. I originally thought it only occurred when there was an error (on uploads), because it seemed to happen more, but later observations show that even when there is no error, sometimes the process doesn't exit.

The steps that sometimes produce it is:

  1. Upload
  2. Click the X button on the upper right of the windows.
  3. Observe that the windows disappears, but the process doesn't exit.

I have resorted to running a separate watcher process to close lasim.exe when it doesn't exit.

Information
LASIM Version: 0.2.2
LASIM Profile Version: 2
Lemmy Source Instance URL: https://lemm.ee/
Lemmy Source Instance Version: 0.18.4
Lemmy Target Instance URL: https://monyet.cc/
Lemmy Target Instance Version: 0.18.4
OS: Windows 11 Pro

I have 4 blocked users, 5 blocked communities, and 274 subscribed communities.

Output of LASIM

@Tipoff4317 Tipoff4317 added the bug Something isn't working label Aug 19, 2023
@CMahaff
Copy link
Owner

CMahaff commented Aug 19, 2023

Hmm yeah I tried it a handful of times and so far haven't seen it. Is this on Windows 10 or 11?

Also, for clarification, is this when you try to close it before the upload finishes? Or some time after the upload finishes?

I'll definitely keep an eye out for it regardless.

@Tipoff4317
Copy link
Author

It's a Windows 11 Pro.

The upload is fairly quick. I usually at least count the second that it says it takes to upload, and have to look for the process in the Process Explorer. And then I close the Windows and watch the process.

@CMahaff
Copy link
Owner

CMahaff commented Aug 20, 2023

But you are closing it after it says "upload finished", yes? Just making sure.

In any case, unfortunately don't have a Windows 11 PC at the moment so it might be hard to track down.

I'll maybe see if there is a Lemmy community that could do code review - I'm still new to Rust so it wouldn't surprise me if I'm doing async wrong or something - maybe it's wrong everywhere but only materializes on Windows 11 or something.

Sorry I don't have a better solution right now, but I'll keep this open until I figure it out.

@Tipoff4317
Copy link
Author

Well, you are right. I usually don't wait all that long because the estimated uploaded time appears to be shorter (1-2 secs) than realities (at least in tens of seconds). Maybe this is my problem (the process doesn't exit until it finishes uploading?). I'll let you know if I find a process that doesn't exit after it says it's finished.

Thanks for the response.

@CMahaff
Copy link
Owner

CMahaff commented Aug 22, 2023

Yeah the estimates are a bit rough because it's based on how fast the instance says it can accept connections, not how fast it does haha.

But good! Let me know what you see.

There's still something going at least slightly wrong because ideally it should stop uploading early if you close it early. And certainly if it does run forever if you close it early that's a bug too. But I can see why those two things would be happening at least.

@Tipoff4317
Copy link
Author

The good news is that for all the uploads that I waited to see "Finished", lasim pretty much exited immediately. I haven't tested any that I closed the window before it said finished, though.

@CMahaff
Copy link
Owner

CMahaff commented Sep 1, 2023

Fantastic! I'll leave the bug open because it should be stopping if you close the application, but I'm glad it's not an issue under normal usage.

@Tipoff4317
Copy link
Author

Tipoff4317 commented Sep 7, 2023

Also, it seems that when I close the window before "finished", the app ultimately closes; I guess when it finishes. The longest time it has taken so far is about 90 seconds.

You are right; it's sort of freaky if the app doesn't shut down after closing the windows. I would change this "bug" to an enhancement request of:

if window closed before finished => confirm shutting down (before finish) => hard exit

OR

if window closed before finished => say that the process won't exit until finish => close window => normal exit

I personally would prefer hard exit. Leaving the app hanging around regardless seems like a possible security issue. Imagine you ever turning this project over and the new person doing nefarious things with a background process (horror!), on Windows with no permission control / app isolation pretty much whatsoever! I have little confidence that even VirusTotal would catch this kind of behavior.

Thanks.

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
Development

No branches or pull requests

2 participants