BOINC / boinc

Open-source software for volunteer computing and grid computing.
https://boinc.berkeley.edu
GNU Lesser General Public License v3.0
2.02k stars 446 forks source link

"No protocol specified" message #2256

Open BryanQuigley opened 6 years ago

BryanQuigley commented 6 years ago

I seem to get an error "No protocol specified" when I'm not logged into them machine- locked or logged off. Doesn't seem to be 100% reproducible, but most of the time. I'm using my systemd unit file from #2255.

When it occurs it logs every second. This also happens if redirected to boinc error log (but then it has no timestamps..) - the default in Ubuntu/Debian.

I've also had it actually stop boinc from running, but that could be a separate issue.

The first occurrence is sometimes followed by this dir_open fail. Nov 22 15:57:36 desktop boinc[15002]: No protocol specified Nov 22 15:57:36 desktop boinc[15002]: dir_open: Could not open directory '/dev/input/mice' from '/var/lib/boinc-client'. Nov 22 15:57:37 desktop boinc[15002]: No protocol specified Nov 22 15:57:38 desktop boinc[15002]: No protocol specified

sudo systemctl status boinc-client.service ● boinc-client.service - Berkeley Open Infrastructure Network Computing Client Loaded: loaded (/lib/systemd/system/boinc-client.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2017-11-22 14:33:35 EST; 19h ago Docs: man:boinc(1) Process: 14972 ExecStopPost=/bin/rm -f /var/lib/boinc-client/lockfile (code=exited, status=0/SUCCESS) Process: 14971 ExecStop=/usr/bin/boinccmd --quit (code=exited, status=0/SUCCESS) Process: 14960 ExecReload=/usr/bin/boinccmd --read_cc_config (code=exited, status=0/SUCCESS) Main PID: 15002 (boinc) Tasks: 21 (limit: 4915) Memory: 467.4M CPU: 1w 5d 2h 48min 4.613s CGroup: /system.slice/boinc-client.service ├─15002 /usr/bin/boinc └─30949 ../../projects/sech.me_boinc_Amicable/amicable_v_2_03 /from 2^25^21715500813 /to 2^25^21715554447 /task_size 410954439845 --nthreads 16

Nov 23 10:15:04 desktop boinc[15002]: No protocol specified Nov 23 10:15:05 desktop boinc[15002]: No protocol specified Nov 23 10:15:06 desktop boinc[15002]: No protocol specified Nov 23 10:15:07 desktop boinc[15002]: No protocol specified Nov 23 10:15:08 desktop boinc[15002]: No protocol specified Nov 23 10:15:09 desktop boinc[15002]: No protocol specified Nov 23 10:15:10 desktop boinc[15002]: No protocol specified Nov 23 10:15:11 desktop boinc[15002]: 23-Nov-2017 10:15:11 [---] Suspending GPU computation - computer is in use Nov 23 10:16:40 desktop boinc[15002]: 23-Nov-2017 10:16:40 [---] Suspending computation - CPU is busy Nov 23 10:17:40 desktop boinc[15002]: 23-Nov-2017 10:17:40 [---] Resuming computation

BryanQuigley commented 6 years ago

It's definitely XSS related - I built it from source and couldn't reproduce it until I installed libxss-dev and reran configure.

I think using UTMP you could have it just return not-idle when their are no users logged in.

I also tried to reduce it from checking every second but wasn't successful.

aaronpuchert commented 6 years ago

I'm also observing this, it's pretty annoying. The X screen saver extension is used for idle detection. On both of our machines BOINC runs under a separate user which doesn't have access to the X server. I guess that's why we are getting the message: it doesn't seem to come from BOINC, but from the code connecting to X.

Now I'm not using any option relying on idle detection (partly because it doesn't work), so why is this still queried? I guess there are four possible solutions:

  1. Don't compile with XSS. Doesn't work for people using the distribution-provided packages though.
  2. If settings like "only use GPU if idle" are turned off, also turn off idle detection. Meaning: only do idle detection if necessary.
  3. Detect if we have the appropriate environment variables set, and if we don't, then don't even attempt calling XOpenDisplay.
  4. If XOpenDisplay fails, don't call it again or back off.
kaymio commented 6 years ago

Since the last update on Arch Linux to boinc 7.10.3 I also get these messages in the journal.

Please let me know if I can provide you with logs or something else.

BryanQuigley commented 6 years ago

My current theory of how to fix this: Use utmp to basically pull, the second field from 'who': bryan :0 :0 22:52 ?xdm? 4:32m 0.01s

Then use that instead of /tmp/.X11/* to find non-GDM sessions.

The big cause in my tests was GDM sessions, but they aren't consistent (even though both are Ubuntu 18.04).:

  1. Nvidia driver, real install ls -al /tmp/.X11-unix/ srwxrwxrwx 1 root root 0 Aug 30 20:14 X0 srwxrwxrwx 1 root root 0 Aug 30 20:14 X1

bryan :1 2018-08-30 20:14 (:1)

  1. VM install ls -al /tmp/.X11-unix/ srwxrwxrwx 1 bryan bryan 0 Aug 30 22:52 X0 srwxrwxr-x 1 gdm gdm 0 Aug 30 22:49 X1024 (this is actually gdm's wayland?)

who bryan :0 2018-08-30 22:52 (:0)

The other option is to try to use systemd's loginctl. Of course, then might as well re-implement it to just use systemd reported idle. Also afaict, this tries every option available for idle detection - maybe a bigger picture fix is needed... going to try to find a smaller fix to better learn how it works.

If anyone has this issue and different results for who or in X11-unix please let me know. Thanks!

JuhaSointusalo commented 5 years ago

There is a few XSS idle detection related tickets open. #2199, #2256 (this one) and #2265. I think there was one or two more but quick search didn't find them.

What is common with all of them is that were are trying to talk to the X server outside of X session and Xlib (or whatever it is that we use) isn't built for that. There's outputting unsolicited error messages, blocking waits and terminating process on errors that are not fatal to us.

I think the real fix for all of them is to move XSS idle detection to a separate process that is run inside X session for every logged in user, started in session startup script. The blocking wait and process termination are very hard to solve otherwise without using some really crazy hacks.

nethershaw commented 5 years ago

I have noticed that this message gets printed once a second even if I have specifically allowed my BOINC client to use the CPU and GPU while the computer is in use. The log messages still appear at the end of the value of the idle_time_to_run setting (Computing allowed / Only after computer has been idle for ... minutes) in my global preferences; if I change that setting to 0, the messages appear immediately after reloading global_prefs_override.xml.

For now it seems to be sufficient to set that value to a (very) large number to avoid the check entirely, but the client definitely should not be sensitive to this value at all if I have configured it to compute continuously. That might well be a separate issue.

wargreen commented 4 years ago

I got this issue on my two computers withe debian SID, one with Xserver, Nvidia driver and the other with Wayland. Otherwise, all seem work well.... boinc 7.16.5+dfsg-1

Say me if i can make some tests !

dkaparis commented 4 years ago

Also happening on Arch Linux with Xserver and Nvidia driver, boinc 7.16.6-1

All the time the boinc-client service is active, it logs No protocol specified about every second.

Log after starting service:

Apr 24 00:58:51 xxxxx systemd[1]: Started Berkeley Open Infrastructure Network Computing Client.
Apr 24 00:58:51 xxxxx boinc[678900]: 24-Apr-2020 00:58:51 [---] cc_config.xml not found - using defaults
Apr 24 00:59:57 xxxxx boinc[678900]: 24-Apr-2020 00:59:57 [---] Starting BOINC client version 7.17.0 for x86_64-pc-linux-gnu
Apr 24 00:59:57 xxxxx boinc[678900]: 24-Apr-2020 00:59:57 [---] Libraries: libcurl/7.69.1 OpenSSL/1.1.1f zlib/1.2.11 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh2/1.9.0 nghttp2/1.40.0
Apr 24 00:59:57 xxxxx boinc[678900]: 24-Apr-2020 00:59:57 [---] Data directory: /var/lib/boinc
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] CUDA: NVIDIA GPU 0: GeForce GTX 1070 (driver version 440.82, CUDA version 10.2, compute capability 6.1, 4096MB, 3972MB available, 6463 GFLOPS peak)
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] libc: GNU libc version 2.31
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] Host name: xxxxx
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] Processor: 16 GenuineIntel Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz [Family 6 Model 45 Stepping 7]
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm arat pln pts md_clear flush_l1d
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] OS: Linux Arch Linux: Arch Linux [5.6.5-arch3-1|libc 2.31 (GNU libc)]
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] Memory: 62.84 GB physical, 0 bytes virtual
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] Disk: 456.92 GB total, 86.88 GB free
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] xxxxxx
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] VirtualBox version: 6.1.6r137129
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] No general preferences found - using defaults
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] Preferences:
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---]    max memory usage when active: 32174.32 MB
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---]    max memory usage when idle: 57913.77 MB
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---]    max disk usage: 103.33 GB
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---]    don't use GPU while active
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---]    suspend work if non-BOINC CPU load exceeds 25%
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---]    (to change preferences, visit a project web site or select Preferences in the Manager)
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] Setting up project and slot directories
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] Checking active tasks
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [xxxxx] URL xxxxx; Computer ID xxxxx; resource share 100
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] Setting up GUI RPC socket
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 [---] Checking presence of 97 project files
Apr 24 00:59:58 xxxxx boinc[678900]: 24-Apr-2020 00:59:58 Initialization completed
Apr 24 00:59:58 xxxxx boinc[678900]: No protocol specified
Apr 24 00:59:59 xxxxx boinc[678900]: No protocol specified
Apr 24 00:59:59 xxxxx boinc[678900]: No protocol specified
...
aaronpuchert commented 4 years ago

Also happening on Arch Linux with Xserver and Nvidia driver, boinc 7.16.6-1

In openSUSE I eventually just dropped idle detection entirely by removing the libXScrnSaver-devel dependency. Maybe you can suggest the same to the Arch maintainers, if the configuration on Arch is to have a service under a separate user as well. With Wayland this is going to stop working anyway.

original-birdman commented 4 years ago

I was getting this message. It would arrive several times a second, but in bursts.

It appears to be related to an inability to connect to the X server.

I run BOINC on four systems. It runs as a service using the boinc account.

On two (very similar) systems that also do GPU computing, so boinc is in the renderer group (for Ubuntu 20.04 - was the video group before that) to let it use the graphics card. Neither of these produces the message. (Although I will also note that adding boinc to the system where I do see the message - see below - did not get rid of them).

On a Raspberry Pi, that is running in console-only mode, I do not see these messages.

On my desktop system I do see them. Or rather I did until a few days ago, as I was fed-up of them and decided to do something about it. My solution (really a workaround) is to run an ExecStart script (this is using systemd) to copy the -auth file used by sddm to the boinc account HOME and name it .Xauthority, and also set DISPLAY to :0. boinc now has access to the display. (This was actually how I enabled GPU computing until I discovered the video/renderer group setting.)

Will still fail if I log out and in again (as Xorg will restart, IIRC), but I don't usually do that - I shut-down the system.

mystiquewolf commented 3 years ago

This happens on my PC every second, but i AM logged in. PC is not locked, i just journalctl --follow the log.

dashs904 commented 3 years ago

Have one system with 2 graphics adapters.
I'm unable to stop this message a few methods. Not running boinc-client on that machine looks like my only option. 3 other machines with identical systems (either headless or single graphics adapter) fine.

ajgringo619 commented 3 years ago

[Linux Mint v20.1, boinc client v7.16.6] After adding this to my $HOME/.profile - xhost + SI:localuser:boinc > /dev/null - the mesages go away. But if I lock the screen they come back.

squid-f commented 3 years ago

[Linux Mint v20.1, boinc client v7.16.6] After adding this to my $HOME/.profile - xhost + SI:localuser:boinc > /dev/null - the mesages go away. But if I lock the screen they come back.

With other distribo, if $HOME/.bash_profle exists, you should add the above command into it instead. It works for me on Mageia 8 KDE and boinc-client v7.16.14

dashs904 commented 3 years ago

On Fri, 02 Apr 2021 01:44:28 -0700 squid-f @.***> wrote:

[Linux Mint v20.1, boinc client v7.16.6] After adding this to my $HOME/.profile - xhost + SI:localuser:boinc > /dev/null - the mesages go away. But if I lock the screen they come back.

With other distribo, if $HOME/.bash_profle exists, you should add the above command into it instead. It works for me on Mageia 8 KDE and boinc-client v7.16.14

This would be in the HOME directory of "boinc-client"? Or each X user?

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/BOINC/boinc/issues/2256#issuecomment-812421980

--


ajgringo619 commented 3 years ago

[Linux Mint v20.1, boinc client v7.16.6] After adding this to my $HOME/.profile - xhost + SI:localuser:boinc > /dev/null - the mesages go away. But if I lock the screen they come back.

With other distribo, if $HOME/.bash_profle exists, you should add the above command into it instead. It works for me on Mageia 8 KDE and boinc-client v7.16.14

I don't use bash, so this is the best place for it.

squid-f commented 3 years ago

On Fri, 02 Apr 2021 01:44:28 -0700 squid-f @.***> wrote: > [Linux Mint v20.1, boinc client v7.16.6] > After adding this to my $HOME/.profile - xhost + SI:localuser:boinc > /dev/null - the mesages go away. But if I lock the screen they come back. With other distribo, if $HOME/.bash_profle exists, you should add the above command into it instead. It works for me on Mageia 8 KDE and boinc-client v7.16.14 This would be in the HOME directory of "boinc-client"? Or each X user?

Your home user directory

davidak commented 2 years ago

I also see this message every second on NixOS 21.11.335443.e84444b14cc with BOINC 7.14.2.

I don't see it on a headless system with the same version.

dashs904 commented 2 years ago

Am running Xorg on the machine which exhibits the problem. The problem seems related to boinc's attempt to determine if a graphics adapter is "in use". This machine also has two graphics cards.

On 3/8/22 03:56, davidak wrote:

I also see this message every second on NixOS 21.11.335443.e84444b14cc with BOINC 7.14.2.

I don't see it on a headless system with the same version.

— Reply to this email directly, view it on GitHub https://github.com/BOINC/boinc/issues/2256#issuecomment-1061651858, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARZLQUII3X6UDHFZR23OMGDU64W5JANCNFSM4EFDUMWA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

--


Dantali0n commented 1 year ago

Am running Xorg on the machine which exhibits the problem. The problem seems related to boinc's attempt to determine if a graphics adapter is "in use". This machine also has two graphics cards.

I have this problem appear on Arch systems both with single dedicated graphics adapter or with both iGPU and dedicated graphics adapters.

imyxh commented 1 year ago

I'm running Wayland, and I have this equivalent(?) message in my journal every second:

Mar 13 20:37:22 hostname boinc[PID]: Authorization required, but no authorization protocol specified

I just created the file /etc/systemd/system/boinc-client.service.d/wayland-syslog-spam.conf with the contents

[Service]
LogFilterPatterns=~no authorization protocol specified

to filter it out for now. See also https://boinc.berkeley.edu/dev/forum_thread.php?id=14249

nethershaw commented 2 months ago

Irritating. Previous workarounds are no longer effective when using Wayland.

Filtering the log message is a Bad Idea. The application continues to silently do the wrong thing, wasting resources in the process.

Allow us to shut the bloody test off.