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

signal: killed error #735

Closed
alisterburt opened this issue Jun 27, 2021 · 19 comments
Closed

signal: killed error #735

alisterburt opened this issue Jun 27, 2021 · 19 comments

Comments

@alisterburt
Copy link

Thanks for xbar, such a fun app to play with!

I've been toying with a few custom plugins on an M1 macbook air running Big Sur (11.2.1) and keep running into a signal: killed error - I'm not sure exactly what causes it. If it helps, I also keep seeing #710.

image

@matryer
Copy link
Owner

matryer commented Jul 1, 2021

Hey @alisterburt thanks for reporting this. It looks like an issue with the plugin itself, can you link to it?

@alisterburt
Copy link
Author

Hi @matryer - it's a simple script I wrote myself which can be found at https://gist.github.com/alisterburt/15280eae3d03ccb28e45713c3e10aeed

Since restarting I've only seen this issue very rarely, usually after waking the mac up from sleep

@ghost
Copy link

ghost commented Jul 6, 2021

I got the same issue. It might be caused by plugin scripts, it's difficult to debug with this message...

@matryer
Copy link
Owner

matryer commented Jul 7, 2021

@leaanthony Do we think we know what was causing this?

@leaanthony
Copy link
Collaborator

No idea off the top of my head. If the app is still running then it would seem to me like context cancel is being called and the command killed.

@Cueball
Copy link

Cueball commented Jul 10, 2021

I get this regularly with my (changed-and-not-definitely-improved) Homebrew plugin. I'm also running 4 other plugins, which never have any issues. I can post the "WIP" plugin script if that's helpful.

I'd rewrite the plugin to be more robust in handling error conditions, but I'm not sure where the "signal: killed" is coming from - if there's a debug log somewhere for each plugin that I can read, that'd be great (I'm sure I looked in the doco ages ago for that but didn't see anything relevant then; I'll re-explore the doco when I get a spare moment this evening.)

@ghost
Copy link

ghost commented Jul 12, 2021

I get this regularly with my (changed-and-not-definitely-improved) Homebrew plugin. I'm also running 4 other plugins, which never have any issues. I can post the "WIP" plugin script if that's helpful.

I'd rewrite the plugin to be more robust in handling error conditions, but I'm not sure where the "signal: killed" is coming from - if there's a debug log somewhere for each plugin that I can read, that'd be great (I'm sure I looked in the doco ages ago for that but didn't see anything relevant then; I'll re-explore the doco when I get a spare moment this evening.)

Which language are you using in your Homebrew plugin? Any modules are you using in it?

@Cueball
Copy link

Cueball commented Jul 12, 2021

Plugin is currently written as a shell script; I think the original is a bash script and so I haven't altered the shebang from /bin/bash - but I don't think it's using any particular bashisms. Nothing fancy about it.

I noticed it was still using the bash= style rather than shell= so I fixed that just now; will post if that seems to make any difference (I don't expect it to tho'.)

TBC I'd planned to eventually rewrite it in Ruby and maybe publish that version, so I'd rather put more effort into the Ruby version than fix this one.

@zessx
Copy link

zessx commented Jul 12, 2021

Try to use response = requests.get(request_url, timeout=1), it seems requests it trying IPv6 first and if you don't specify a timeout your script will fail before IPv4 was tried.

@alisterburt
Copy link
Author

Thanks @zessx - will try that!

@matryer
Copy link
Owner

matryer commented Jul 14, 2021

@alisterburt did @zessx's approach work?

@alisterburt
Copy link
Author

@matryer - no errors so far but they were very intermittent anyway, will report back if it crops up again! 🙂

@Romack
Copy link

Romack commented Oct 27, 2021

Is anyone still having this issue? I have a script that fails most of the time via xbar, but runs successfully on the command line (return code of 0). It takes around 1 minute to complete so perhaps that is related to the issue?

Any ideas or thoughts on how to debug this issue?

@Cueball
Copy link

Cueball commented Oct 28, 2021

I still do, but it's also still inconsistent. Maybe once or twice a day? Same deal - literally never fails from CLI; only from within Xbar.

As mentioned before, I was planning to convert my shell-based script to Ruby, in the hope that it would be neater, faster and avoid any timeout issues. Haven't got to that yet though...

@matryer
Copy link
Owner

matryer commented Oct 29, 2021

There is currently a timeout of one minute for plugins to run. I'm going to set this to 2 minutes to see if that helps.

matryer pushed a commit that referenced this issue Oct 29, 2021
@matryer
Copy link
Owner

matryer commented Oct 29, 2021

Please try the latest release to see if this helps.

@TiagoRibeiroCA
Copy link

I don't know if this ship has sailed already but, @matryer any chance the timeout could be increased to 3 or 4 mins? I have a gitlab MR fetcher, but I'm fetching hundreds of groups, each with several hundred projects/repos, with dozens of MR's each, so I get the signal:killed error, although it works like a charm via terminal

@leaanthony
Copy link
Collaborator

leaanthony commented May 22, 2024

I think it might be possible to add a config for this, but it would affect all plugins.

@TiagoRibeiroCA
Copy link

TiagoRibeiroCA commented May 22, 2024

I consider 3 or 4 mins very acceptable. But ideally there would be a way to override this so anyone would use their desired timeout. Because on my specific case, 2 mins is just impossible, even using cache, the first request has to scan thousands of projects and MRs under them /:

EDIT: Actually, even if the base timeout on xbar source code is 4 or 5 mins even, anyone on their personal plugins can add a smaller timeout on their requests. So I don't imagine this would cause much hassle to current users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants