Issue 469065 in chromium: "Socket path too long" due to TMPDIR

46 views
Skip to first unread message

chro...@googlecode.com

unread,
Mar 20, 2015, 3:39:24 AM3/20/15
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: Stability-Crash Pri-2 Via-Wizard Type-Bug OS-Mac

New issue 469065 by ttij...@wikimedia.org: "Socket path too long" due to
TMPDIR
https://code.google.com/p/chromium/issues/detail?id=469065

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2338.2 Safari/537.36

Steps to reproduce the problem:
Start Chromium with an environment variable TMPDIR set to a path of 70
characters or more.

What is the expected behavior?

What went wrong?
stderr:

[17793:17793:0320/071732:FATAL:process_singleton_posix.cc(223)] Check
failed: path.length() < arraysize(addr->sun_path). Socket path too long:
/mnt/home/jenkins-deploy/tmpfs/jenkins-mediawiki-core-qunit-karma-1583/.org.chromium.Chromium.X5MvEz/SingletonSocket

On our Jenkins slaves, we use two factors:
* tmpfs instead of default /tmp (to improve performance).
* sharded subdirectories per-build (to avoid race conditions as often
things conflict here when running concurrent jobs; in the future these will
run in dedicated VMs for each build, but for simple programs we still use
multiple Jenkins executors on a single slave)

In this case, TMPDIR is set to:

TMPDIR:
/mnt/home/jenkins-deploy/tmpfs/jenkins-mediawiki-core-qunit-karma-1583

socket wanted by Chromium:
/mnt/home/jenkins-deploy/tmpfs/jenkins-mediawiki-core-qunit-karma-1583/.org.chromium.Chromium.X5MvEz/SingletonSocket

This worked fine until the build number got longer and made the resulting
path (including the directory name Chromium creates) too long.

Crashed report ID:

How much crashed? Whole browser

Is it a problem with a plugin? N/A

Did this work before? No

Chrome version: 43.0.2338.2 Channel: canary
OS Version: OS X 10.9.5
Flash Version: Shockwave Flash 17.0 r0

See also https://code.google.com/p/chromium/issues/detail?id=33097

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Mar 20, 2015, 3:54:24 AM3/20/15
to chromi...@chromium.org

Comment #1 on issue 469065 by ttij...@wikimedia.org: "Socket path too long"
One known workaround in openvswitch:

> UNIX socket paths have a limit in terms of length. On Linux
> this is 103 characters.

> This is a problem in Debian/Ubuntu builds which can generate
> quite long paths.

> This patch works around this issue by detecting when socket
> connection/binding fails due to this issue and accessing the
> socket path using a file descriptor path in /proc/self/fd.
– James Page, January 2013
http://openvswitch.org/pipermail/dev/2013-January/024528.html

Perhaps Chromium can do a similar thing.


For the time being, I've worked around this by limiting the tmpfs
subdirectory to "jenkins-{slave executor number}" instead of "jenkins-{job
name}-{build number}".

https://github.com/wikimedia/integration-jenkins/commit/afc1ef05ff1455ea3ddebd0a8cd39c3a4bf67ed3

chro...@googlecode.com

unread,
Apr 1, 2015, 7:15:33 AM4/1/15
to chromi...@chromium.org
Updates:
Labels: TE-NeedsFurtherTriage

Comment #2 on issue 469065 by rnimmaga...@chromium.org: "Socket path too
(No comment was entered for this change.)

chro...@googlecode.com

unread,
Apr 16, 2015, 6:17:20 PM4/16/15
to chromi...@chromium.org
Updates:
Labels: -TE-NeedsFurtherTriage Needs-Feedback

Comment #3 on issue 469065 by manoranj...@chromium.org: "Socket path too
ttijhof@, Thanks for filing. Could you please provide a crash id# from
chrome://crashes if possible?

chro...@googlecode.com

unread,
Apr 18, 2015, 2:57:20 PM4/18/15
to chromi...@chromium.org

Comment #4 on issue 469065 by ttij...@wikimedia.org: "Socket path too long"
As far as I know there is no crash ID because the browser crashes before
any sufficient interface has been established. Even
passing '--crash-dumps-dir /tmp/crcrash' on the command leaves no trace
because it crashes too early.

I can't reproduce this on my Mac with Chrome Canary and Chromium dev
because it defaults to writing the profile to ~/Library regardless of
$TMPDIR.

However on Linux I can still reproduce this easily. Using Ubuntu 14.04.2,
with the latest stable Chromium 41.0.2272.76 from aptitude, and an Xvfb
DISPLAY=:94

To reproduce this, run:

$ export
TMPDIR=/tmp/build-a-long-directory-name-afc1ef05ff1455ea3ddebd0a8cd39c3a4bf67ed3-example
$ mkdir $TMPDIR && chmod 777 $TMPDIR
$ chromium-browser 'https://example.org/foo'

Results in:

[16989:16989:0418/185131:FATAL:process_singleton_posix.cc(223)] Check
failed: path.length() < arraysize(addr->sun_path). Socket path too long:
/tmp/build-a-long-directory-name-afc1ef05ff1455ea3ddebd0a8cd39c3a4bf67ed3-example/.org.chromium.Chromium.CgUvY5/SingletonSocket
Aborted

Shell exit code: 134

$ tree -a $TMPDIR
.
├── .org.chromium.Chromium.CgUvY5
│   └── SingletonCookie -> 15948948485057009534
└── pulse-uifh0PKoolC4

As you can see the Chromium profile directory contains next to nothing.

chro...@googlecode.com

unread,
May 13, 2015, 7:48:32 PM5/13/15
to chromi...@chromium.org
Updates:
Status: Assigned
Owner: sad...@chromium.org

Comment #5 on issue 469065 by rjkr...@chromium.org: "Socket path too long"
sadrul: can you do me a favour and have a look at this?

chro...@googlecode.com

unread,
May 16, 2015, 3:20:42 PM5/16/15
to chromi...@chromium.org
Updates:
Cc: the...@chromium.org ma...@chromium.org

Comment #6 on issue 469065 by sad...@chromium.org: "Socket path too long"
(No comment was entered for this change.)

chro...@googlecode.com

unread,
Jun 18, 2015, 4:09:40 AM6/18/15
to chromi...@chromium.org

Comment #8 on issue 469065 by bzak...@gmail.com: "Socket path too long" due
to TMPDIR
https://code.google.com/p/chromium/issues/detail?id=469065

Just wanted to let you know that the issue is popping up in a signed and
sandboxed Node-Webkit application on OSX. Not sure about Linux, but looks
like it's possible.

https://github.com/alexeyst/node-webkit-macappstore/issues/4#issuecomment-113018671
Reply all
Reply to author
Forward
0 new messages