You are not logged in.

#1 2012-05-24 19:43:21

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

psd problems with chromium with systemd [solved]

Comment by: TastyPi on Wed, 23 May 2012 09:10:30 +0000 wrote:

profile-sync-daemon doesn't seem to start properly for me when using systemd. After booting, if I try to start chromium, I get the following message:
[951:951:19460957:FATAL:chrome_browser_main.cc(1157)] Check failed: PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_). Must be able to get user data directory!
Aborted (core dumped)

However, after restarting the daemon with systemctl restart psd.service, chromium works perfectly.

@TastyPi - never seen that one before and I'm using systemd w/ psd just fine. What is the status of psd.service in this state?

Last edited by graysky (2012-05-26 12:19:20)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2012-05-25 08:29:02

TastyPi
Member
Registered: 2011-12-24
Posts: 14

Re: psd problems with chromium with systemd [solved]

[graham@GladOS ~]$ chromium
[986:986:32092429:FATAL:chrome_browser_main.cc(1157)] Check failed: PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_). Must be able to get user data directory!
Aborted (core dumped)
$ sudo systemctl status psd.service 
psd.service - Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers
	  Loaded: loaded (/usr/lib/systemd/system/psd.service; enabled)
	  Active: active (exited) since Fri, 25 May 2012 09:23:06 +0100; 42s ago
	 Process: 323 ExecStart=/usr/bin/profile-sync-daemon sync (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/psd.service

May 25 09:23:06 GladOS su[326]: pam_unix(su:session): session opened for us...0)
$ sudo systemctl restart psd.service 
$ chromium
$ #Opens successfully
$ sudo systemctl status psd.service 
psd.service - Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers
	  Loaded: loaded (/usr/lib/systemd/system/psd.service; enabled)
	  Active: active (exited) since Fri, 25 May 2012 09:24:06 +0100; 32s ago
	 Process: 1029 ExecStop=/usr/bin/profile-sync-daemon unsync (code=exited, status=0/SUCCESS)
	 Process: 1039 ExecStart=/usr/bin/profile-sync-daemon sync (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/psd.service

Here's my psd.conf:

$ cat /etc/psd.conf 
#
# /etc/psd.conf
#
# For documentation, see: https://wiki.archlinux.org/index.php/Profile-sync-daemon

# List users separated by spaces whose browser(s) profile(s) will get symlinked 
# and sync'ed to tmpfs.
# Do NOT list a user twice!
USERS="TastyPi"

# List browsers separated by spaces to include in the sync. Useful if you do not
# wish to have all possible browser profiles sync'ed.
#
# Possible values:
#   chromium
#   google-chrome
#   mozilla
#   midori
#   opera
#   opera-next
#
# Note that mozilla is the correct value for the firefox browser!
#
# If the following is commented out (default), then all available/supported 
# browsers will be sync'ed.
BROWSERS="chromium"

# Define where browser profiles will reside in tmpfs 
# This location must be mounted to tmpfs and MUST have permissions of 777
# Use NO trailing backslash!
# If running a standard ARCH install the following default is fine
VOLATILE="/tmp"

I wonder whether systemd starts it too early, like before my home partition is mounted?

Offline

#3 2012-05-25 09:10:12

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: psd problems with chromium with systemd [solved]

Test that by disabling auto start of pad and reboot.  Once logged in, start it manually.  Please report back.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2012-05-25 09:35:38

TastyPi
Member
Registered: 2011-12-24
Posts: 14

Re: psd problems with chromium with systemd [solved]

So I disabled psd.service, rebooted and did the following:

$ sudo systemctl status psd.service
psd.service - Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers
	  Loaded: loaded (/usr/lib/systemd/system/psd.service; disabled)
	  Active: inactive (dead)
	  CGroup: name=systemd:/system/psd.service

$ chromium
$ # Starts with no errors
$ sudo systemctl enable psd.service 
ln -s '/usr/lib/systemd/system/psd.service' '/etc/systemd/system/multi-user.target.wants/psd.service'
$ sudo systemctl start psd.service 
$ sudo systemctl status psd.service 
psd.service - Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers
	  Loaded: loaded (/usr/lib/systemd/system/psd.service; enabled)
	  Active: active (exited) since Fri, 25 May 2012 10:29:29 +0100; 25s ago
	 Process: 1206 ExecStart=/usr/bin/profile-sync-daemon sync (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/psd.service

$ chromium
$ #Starts with no errors

So it looks like it is something to do with race conditions when booting. Here's my /etc/fstab, if that's useful:

# 
# /etc/fstab: static file system information
#
# <file system> <dir>                   <type>   <options>                <dump> <pass>

tmpfs           /tmp                    tmpfs    nodev,nosuid             0      0

LABEL=data      /data                   ext4     defaults                 0      1
LABEL=home      /home                   ext4     defaults,noatime,discard 0      1
LABEL=root      /                       ext4     defaults,noatime,discard 0      1
LABEL=var       /var                    reiserfs defaults                 0      1

tmpfs           /home/TastyPi/Downloads tmpfs    nodev,nosuid             0      0

/ and /home are on one drive, /data and /var on another. No idea if this helps at all.

Offline

#5 2012-05-25 09:56:17

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: psd problems with chromium with systemd [solved]

So it seems as though I need to add a requirement in the service file to wait for the filesystem.  I just need to figure out what service handles that.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2012-05-25 20:23:21

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: psd problems with chromium with systemd [solved]

I'm no systemd expert - can you insert the following line to the service file, reboot and report back?

/usr/lib/systemd/system/psd.service

After=local-fs.target

I don't think order matters but put it as the 2nd line (after 'description' and before 'wants').

Last edited by graysky (2012-05-25 20:23:42)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2012-05-26 00:10:37

TastyPi
Member
Registered: 2011-12-24
Posts: 14

Re: psd problems with chromium with systemd [solved]

$ sudo cat /usr/lib/systemd/system/psd.service 
[Unit]
Description=Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers
After=local-fs.target
Wants=local-fs.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/profile-sync-daemon sync
ExecStop=/usr/bin/profile-sync-daemon unsync

[Install]
WantedBy=multi-user.target
$ chromium
[1028:1028:49161587:FATAL:chrome_browser_main.cc(1157)] Check failed: PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_). Must be able to get user data directory!
Aborted (core dumped)
$ sudo systemctl restart psd.service
$ chromium
$ #Works

Seems that didn't work sad

Offline

#8 2012-05-26 00:12:24

TastyPi
Member
Registered: 2011-12-24
Posts: 14

Re: psd problems with chromium with systemd [solved]

I should probably mention that this daemon did work perfectly for me before, it broke around the most recent update (but I'm not sure if that is to blame).

Offline

#9 2012-05-26 11:23:04

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: psd problems with chromium with systemd [solved]

@TP - from v3.4 to v3.5?  Only change to the script itself should not have affected this: https://github.com/graysky2/profile-syn … 0d0727bc77

BUT... can you downgrade reboot and let me know?

PKGBUILD for v3.4: http://pkgbuild.com/git/aur-mirror.git/ … 4a19f35919


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#10 2012-05-26 12:17:24

TastyPi
Member
Registered: 2011-12-24
Posts: 14

Re: psd problems with chromium with systemd [solved]

Turns out I was using 3.4, I posted my error on the AUR the day before 3.5 was released. I've tested both 3.3-2 and 3.5, both still have the error, but I have found the problem. There was a .desktop file in my ~/.config/autostart which started chromium in the background (used for Google Docs offline mode I believe), when I removed that the problems disappeared. My boot time is very fast, so the problem was probably that I was logged in and chromium was started before psd finished setting up?

Offline

#11 2012-05-26 12:18:57

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: psd problems with chromium with systemd [solved]

Not sure.. Glad you solved it and that it wasn't caused by my stuff.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB