radicle-dev / radicle-upstream

Desktop client for Radicle.
Other
616 stars 51 forks source link

Crash while laggy, trying to switch to a different view #2010

Closed tmakarios closed 3 years ago

tmakarios commented 3 years ago

I got an error message in Upstream shortly after I had tried switching to another view. I'd been trying to hover over the icon to find out how many peers I was connected to (but it didn't show me), and I might have clicked the icon in the top left that takes me to my home view (which might have succeeded), and I might have pressed Ctrl+1, too.

I've attached the segment of log that Upstream presented me with when the crash happened. upstream-crash.txt

geigerzaehler commented 3 years ago

@tmakarios: From the crash log I gather that something went wrong accessing your data directory. This might be due to the directory being removed while the app is running or there not being enough space on your hard drive. Is this a possibility?

Could you also expand what you mean by “laggy”? Might be related to #1975.

tmakarios commented 3 years ago

I'm pretty sure I had at least 9 GB of free space at all times, and I don't think I moved the directory or anything at any time.

Could you also expand what you mean by “laggy”? Might be related to #1975.

The original description of bug #1975 sounds very similar to what I meant by "laggy". I've also noticed that Radicle was using a significant proportion of my physical RAM, and thus causing a lot of swapping, which might be part or all of the cause of the slowness. Unfortunately, I can't now tell you how much RAM was being used, because when I try to start Radicle now, I get this error (twice at once, it seems, according to what flashes up on the UI before disappearing):

{
  "stack": "Error: Failed to load the session\n    at mn (file:///tmp/.mount_radiclkdIUUy/resources/app.asar/public/bundle.js:2:1872342)\n    at async file:///tmp/.mount_radiclkdIUUy/resources/app.asar/public/bundle.js:2:2411429",
  "message": "Failed to load the session",
  "code": "SessionFetchFailure",
  "source": {
    "stack": "TypeError: Failed to fetch",
    "message": "Failed to fetch",
    "code": "UnknownException",
    "details": {
      "name": "TypeError"
    }
  }
}
geigerzaehler commented 3 years ago

Thanks for the details. The error seems to indicate that the background process that we’re trying to get the data from fails. To get more information it would be great if you could start the app from the terminal ($ ./radicle-upstream-0.2.6.AppImage) and capture the output. In the app itself you can press Ctrl+Shift+i to open the developer console. Select the “Network” tab and then refresh the app with Ctrl+r. Then you should be able to see more information about the failed requests that you can share with me.

tmakarios commented 3 years ago

So, today, when I tried to reproduce the problems we've discussed, with Radicle's terminal output being redirected to a file, most of the problems disappeared. It started up fine (more than once), seldom showed any delay between clicking things and showing the expected result, didn't crash, and even propagated a new project (circulex-site — rad:git:hnrkpirwhs7bessptiyty3ybgiqh3x679khsy) to the seeds it was connected to! The previous (smaller) project (circulex-planning — rad:git:hnrkn11zynp463gi56y5zjm3agxo67pibpxzo) I think didn't reach the seeds until I pushed another commit to it in the same successful session (then it appeared at sprout.radicle.xyz); I don't know about the patch I submitted earlier to radicle-docs.

Interestingly, on one run of Radicle, where I didn't do much, the redirected stdout and stderr grew at about 1 MB/minute, but the second recorded run, where I created the new project, and pushed to the old one, resulted in a much smaller console log. I've attached the second, but the first seems to cause GitHub problems, being 30 MB in size. Would you like a sample of the first? If so, how much, and do you want it from the start of the log, the end, somewhere else, or all three? 2021-06-24-radicle-2.txt

tmakarios commented 3 years ago

Oh, and I forgot to say: It didn't look like it was using excessive RAM today, either.

tmakarios commented 3 years ago

I caught another run where it was very slow to respond. At the start of the run it was very responsive, but then it started getting slower, appearing to do nothing (except bring up the pre-filled search box) when I clicked on a link to a project I was already following (because I had created it). I saw no sign of RAM exhaustion or swap space thrashing, but the terminal output that I captured was growing at over 2 MB/minute before I quit the application. I've attached the start and end of that output, in case it's helpful for you to compare; let me know if you want any more of that output. 2021-06-25-radicle-start.txt 2021-06-25-radicle-end.txt

geigerzaehler commented 3 years ago

Thanks for providing this information. While the growing log is not necessarily an issue it looks to me like it grows because you get unsolicited network messages from a peer. The protocol doesn’t seem to disconnect from the peer that sends the unsolicited messages. I’ve created an issue for this: https://github.com/radicle-dev/radicle-link/issues/715.

Between that issue an #1975 the problems you described should be covered so I’ll close this for now. If anything else pops up feel free to reopen or create another issue.

tmakarios commented 3 years ago

OK, thanks; I've subscribed to those issues now.