Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Issue 2838034: Move the SingletonSocket to a temporary directory (Closed)

Created:
10 years, 5 months ago by davidben
Modified:
9 years, 6 months ago
Reviewers:
Evan Martin, mattm
CC:
chromium-reviews, Paweł Hajdan Jr., ben+cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Move the SingletonSocket to a temporary directory This is to workaround problems on certain network filesystems (notably AFS) which do not support Unix domain sockets. We move the sockets into a temporary folder and symlink. To avoid the possibility of a dangling link to a missing (and later intercepted) remote directory, we create and check cookie files and rely on the stickiness of /tmp/ to avoid a race condition in the check. R=mattm BUG=44606 TEST=ProcessSingletonLinuxTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57623

Patch Set 1 #

Total comments: 10

Patch Set 2 : Address mattm's comments #

Patch Set 3 : Rebase to trunk #

Patch Set 4 : Alternate implementation with cookies #

Total comments: 10

Patch Set 5 : Address mattm's comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+253 lines, -65 lines) Patch
M base/scoped_temp_dir.h View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M base/scoped_temp_dir.cc View 1 2 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/process_singleton.h View 1 2 3 4 2 chunks +9 lines, -0 lines 1 comment Download
M chrome/browser/process_singleton_linux.cc View 1 2 3 4 12 chunks +177 lines, -58 lines 0 comments Download
M chrome/browser/process_singleton_linux_uitest.cc View 1 2 3 4 4 chunks +54 lines, -2 lines 0 comments Download
M chrome/common/chrome_constants.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_constants.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
davidben
Not sure if the backwards compatibility path is necessary. (In retrospect, it probably isn't, given ...
10 years, 5 months ago (2010-06-30 03:09:59 UTC) #1
Evan Martin
I believe this is incorrect. Perhaps I misunderstand your change description; I didn't read the ...
10 years, 5 months ago (2010-06-30 18:30:43 UTC) #2
davidben
My understanding is that the symlink SingletonLock is what actually locks the profile. The existing ...
10 years, 5 months ago (2010-06-30 18:51:55 UTC) #3
davidben
On 2010/06/30 18:51:55, David Benjamin wrote: > [1] I'm not actually sure what NFS does ...
10 years, 5 months ago (2010-06-30 18:54:15 UTC) #4
davidben
evanm: ping? Is my understanding of the two files correct, or does SingletonSocket play a ...
10 years, 5 months ago (2010-07-08 21:50:14 UTC) #5
mattm
On 2010/07/08 21:50:14, David Benjamin wrote: > evanm: ping? Is my understanding of the two ...
10 years, 5 months ago (2010-07-08 22:15:53 UTC) #6
Evan Martin
On 2010/07/08 22:15:53, mattm wrote: > On 2010/07/08 21:50:14, David Benjamin wrote: > > evanm: ...
10 years, 5 months ago (2010-07-19 18:23:01 UTC) #7
mattm
On 2010/07/19 18:23:01, Evan Martin wrote: > On 2010/07/08 22:15:53, mattm wrote: > > On ...
10 years, 5 months ago (2010-07-19 22:39:40 UTC) #8
Evan Martin
On 2010/07/19 22:39:40, mattm wrote: > 1. Should it default to using /tmp or try ...
10 years, 5 months ago (2010-07-19 22:46:58 UTC) #9
davidben
On 2010/07/19 22:46:58, Evan Martin wrote: > On 2010/07/19 22:39:40, mattm wrote: > > 1. ...
10 years, 5 months ago (2010-07-19 22:58:30 UTC) #10
mattm
lgtm with some fixes http://codereview.chromium.org/2838034/diff/1/2 File base/scoped_temp_dir.cc (right): http://codereview.chromium.org/2838034/diff/1/2#newcode55 base/scoped_temp_dir.cc:55: LOG(ERROR) << "ScopedTempDir unable to ...
10 years, 5 months ago (2010-07-22 23:24:21 UTC) #11
mattm
On 2010/07/19 22:58:30, David Benjamin wrote: > On 2010/07/19 22:46:58, Evan Martin wrote: > > ...
10 years, 5 months ago (2010-07-22 23:24:53 UTC) #12
mattm
Oh yeah, I had one more concern. I think there may be other threads started ...
10 years, 5 months ago (2010-07-22 23:36:46 UTC) #13
davidben
Do you think it's worth keeping the compatibility code to support listening from the old ...
10 years, 5 months ago (2010-07-22 23:44:31 UTC) #14
mattm
On 2010/07/22 23:44:31, David Benjamin wrote: > Do you think it's worth keeping the compatibility ...
10 years, 5 months ago (2010-07-23 01:03:59 UTC) #15
davidben
On 2010/07/23 01:03:59, mattm wrote: > On 2010/07/22 23:44:31, David Benjamin wrote: > > Do ...
10 years, 5 months ago (2010-07-23 01:31:02 UTC) #16
mattm
On 2010/07/23 01:31:02, David Benjamin wrote: > On 2010/07/23 01:03:59, mattm wrote: > > On ...
10 years, 5 months ago (2010-07-23 02:21:17 UTC) #17
davidben
In the interest of not having this CL stagnate forever, what's the status? Evan: have ...
10 years, 4 months ago (2010-08-17 18:15:12 UTC) #18
Evan Martin
Is it waiting for my lgtm? I was waiting for Matt, and figured his opinion ...
10 years, 4 months ago (2010-08-18 17:35:24 UTC) #19
davidben
On 2010/08/18 17:35:24, Evan Martin wrote: > Is it waiting for my lgtm? I was ...
10 years, 4 months ago (2010-08-18 17:41:04 UTC) #20
davidben
On 2010/08/18 17:41:04, David Benjamin wrote: > And I've never been all too sure on ...
10 years, 4 months ago (2010-08-18 17:43:33 UTC) #21
mattm
On 2010/08/17 18:15:12, David Benjamin wrote: > In the interest of not having this CL ...
10 years, 4 months ago (2010-08-18 19:57:16 UTC) #22
davidben
Aargh. I had this nice long reply and then it disappeared because I got an ...
10 years, 4 months ago (2010-08-18 23:35:54 UTC) #23
davidben
Alright, well I just uploaded two new versions. The first was to rebase and address ...
10 years, 4 months ago (2010-08-19 17:56:02 UTC) #24
mattm
Hm, I just had a thought. If the socket in tmp contains the cookie as ...
10 years, 4 months ago (2010-08-19 21:30:27 UTC) #25
davidben
On 2010/08/19 21:30:27, mattm wrote: > Hm, I just had a thought. If the socket ...
10 years, 4 months ago (2010-08-19 21:43:16 UTC) #26
mattm
I guess I'm happy enough with this approach. On 2010/08/19 21:43:16, David Benjamin wrote: > ...
10 years, 4 months ago (2010-08-20 22:40:09 UTC) #27
davidben
Sent revised version off to try bots (as I no longer have easy access to ...
10 years, 4 months ago (2010-08-21 08:35:51 UTC) #28
davidben
And now that I'm back in the land of screwy AFS home directories and set ...
10 years, 4 months ago (2010-08-23 23:31:06 UTC) #29
mattm
10 years, 4 months ago (2010-08-24 02:54:12 UTC) #30
lgtm

http://codereview.chromium.org/2838034/diff/46001/47003
File chrome/browser/process_singleton.h (right):

http://codereview.chromium.org/2838034/diff/46001/47003#newcode23
chrome/browser/process_singleton.h:23: #if defined(OS_LINUX)
looks like this file was recently changed to use defined(USE_X11) for the
"linux" branch, so I guess this ifdef should be USE_X11 also.

Powered by Google App Engine
This is Rietveld 408576698