Thread overview
[Issue 11313] New: std.process.ProcessException: Not an executable file on running unittests when /tmp is mounted noexec
Oct 21, 2013
Iain Buclaw
Oct 21, 2013
Iain Buclaw
Oct 21, 2013
Vladimir Panteleev
Oct 21, 2013
David Nadlinger
Oct 21, 2013
Iain Buclaw
Oct 21, 2013
David Nadlinger
Oct 21, 2013
David Nadlinger
Oct 21, 2013
Vladimir Panteleev
Oct 21, 2013
Iain Buclaw
October 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11313

           Summary: std.process.ProcessException: Not an executable file
                    on running unittests when /tmp is mounted noexec
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: ibuclaw@ubuntu.com


--- Comment #0 from Iain Buclaw <ibuclaw@ubuntu.com> 2013-10-21 04:45:40 PDT ---
As per summary, to reproduce run (assumes you have a line in /etc/fstab for
/tmp):

mount -o remount,noexec /tmp


Then run the phobos unittests.


Unittests should *really* be creating the temp file on the same filesystem as where you are running ./unittest from for phobos.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11313


Iain Buclaw <ibuclaw@ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw@ubuntu.com


--- Comment #1 from Iain Buclaw <ibuclaw@ubuntu.com> 2013-10-21 04:46:38 PDT ---
s/ the temp file / any temp file /

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11313


Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow@gmail.com


--- Comment #2 from Vladimir Panteleev <thecybershadow@gmail.com> 2013-10-21 14:59:54 EEST ---
Possibly unrelated, but wouldn't a noexec /tmp completely break rdmd?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11313


David Nadlinger <code@klickverbot.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code@klickverbot.at


--- Comment #3 from David Nadlinger <code@klickverbot.at> 2013-10-21 05:05:34 PDT ---
Yes, it would also break RDMD.

Frankly, I don't think it is worth making active efforts to support such non-standard configurations. And if I remember correctly, having a noexec /tmp also breaks the installation scripts of random packages, so it's not like you could expect it to work without problems in other situations.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11313



--- Comment #4 from Iain Buclaw <ibuclaw@ubuntu.com> 2013-10-21 05:20:35 PDT ---
/tmp as noexec is a standard in general workplace environments.

The only packages that break because of noexec are typically third party packages or .bin installers, and is not the norm for packages through your standard distribution.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11313


Alex Rønne Petersen <alex@lycus.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alex@lycus.org


--- Comment #5 from Alex Rønne Petersen <alex@lycus.org> 2013-10-21 14:23:49 CEST ---
Ubuntu:

tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)

Debian:

tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=718340k)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11313



--- Comment #6 from David Nadlinger <code@klickverbot.at> 2013-10-21 05:35:43 PDT ---
(In reply to comment #5)
> Ubuntu:
> 
> tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
> 
> Debian:
> 
> tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=718340k)

That's only /run resp. /run/shm, not /tmp. I actually checked the last couple of official Ubuntu EC2 images, none of them mounts /tmp noexec by default. And neither do the Debian instances on two of my boxes.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11313



--- Comment #7 from David Nadlinger <code@klickverbot.at> 2013-10-21 05:40:05 PDT ---
(In reply to comment #4)
> /tmp as noexec is a standard in general workplace environments.

It might be common in hardened server environments, but I'd argue that's not where people usually do software development, or at least where they are supposed to. ;)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11313



--- Comment #8 from Vladimir Panteleev <thecybershadow@gmail.com> 2013-10-21 15:48:46 EEST ---
Would setting the TMP environment variable qualify as a workaround? Looking at the implementation of tempDir (which is used in uniqueTempPath, used by std.process), that would work.

rdmd doesn't use tempDir, which is probably a bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11313



--- Comment #9 from Iain Buclaw <ibuclaw@ubuntu.com> 2013-10-21 06:14:43 PDT ---
(In reply to comment #6)
> (In reply to comment #5)
> > Ubuntu:
> > 
> > tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
> > 
> > Debian:
> > 
> > tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=718340k)
> 
> That's only /run resp. /run/shm, not /tmp. I actually checked the last couple of official Ubuntu EC2 images, none of them mounts /tmp noexec by default. And neither do the Debian instances on two of my boxes.

David has bots and rootkits running on his systems.  :o)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------