GNU bug report logs - #10674
24.0.92; cmdproxy.exe fork-bomb

Previous Next

Packages: emacs, w32;

Reported by: sjm <at> spamcop.net

Date: Tue, 31 Jan 2012 03:50:01 UTC

Severity: important

Found in version 24.0.92

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10674 in the body.
You can then email your comments to 10674 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs. (Tue, 31 Jan 2012 03:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to sjm <at> spamcop.net:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 31 Jan 2012 03:50:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: sjm <at> spamcop.net
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.92; cmdproxy.exe fork-bomb
Date: Tue, 31 Jan 2012 03:12:37 +0000
How to fork-bomb Windows in 4 simple steps:

1. M-x customize-browse
2. Click "Programming"
3. Click "Languages"
4. Wait

Your process list should quickly get flooded with copies of cmdproxy.exe
and Windows should soon grind to a halt.


In GNU Emacs 24.0.92.1 (i386-mingw-nt6.1.7601)
 of 2012-01-23 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
configured using `configure --with-gcc (4.6) --no-opt --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include --ldflags -LD:/devel/emacs/libs/gnutls-3.0.9/lib'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENG
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x e m a c s - b u g <tab> <backspace> <backspace> 
<backspace> r e p o <tab> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> r e p o <tab> r <tab> <ret
urn>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr message format-spec rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug help-mode easymenu view time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer button faces cus-face files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Thu, 02 Feb 2012 17:31:01 GMT) Full text and rfc822 format available.

Message #8 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: sjm <at> spamcop.net
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Thu, 02 Feb 2012 19:27:43 +0200
> From: sjm <at> spamcop.net
> Date: Tue, 31 Jan 2012 03:12:37 +0000
> 
> How to fork-bomb Windows in 4 simple steps:
> 
> 1. M-x customize-browse
> 2. Click "Programming"
> 3. Click "Languages"
> 4. Wait
> 
> Your process list should quickly get flooded with copies of cmdproxy.exe
> and Windows should soon grind to a halt.

I cannot reproduce this, no matter how hard I try.  I tried half a
dozen of different Emacs binaries, including the very same you used:

> In GNU Emacs 24.0.92.1 (i386-mingw-nt6.1.7601)
>  of 2012-01-23 on MARVIN

which is the latest weekly snapshot of the development trunk, and also
several others.  I did that on 2 different machines.  None of these
flooded my system with copies of cmdproxy.  They all worked as
expected, showing the list of programming languages supported by Emacs
modes.

So something else is at work here that exists on your machine, but not
on mine.  One difference is that my machines run Windows XP, not
Windows 7.  But I don't think this is the first thing I'd suspect.

First, does this happen in "emacs -Q" for you?  If not, please look in
your .emacs for possible reasons.

If "emacs -Q" produces the problem, then the only invocation of
cmdproxy in the sequence you describe is in python.el, in the function
python-check-version, which invokes "python -V" and parses its
output.  Do you have Python installed, and if so, is python.exe on
your PATH?  Also, does the following command works as expected, or
does it also produce the same problem?

  M-: (shell-command-to-string "python -V") RET

Finally, please make sure Emacs picks up the correct binary of
cmdproxy.exe, the correct binary of python.exe (if it is installed),
and your python.elc is not corrupted (recompile it to be sure, or
manually load python.el before doing the sequence that triggered the
bug).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Fri, 03 Feb 2012 10:51:02 GMT) Full text and rfc822 format available.

Message #11 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Simon Morgan <sjm <at> spamcop.net>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Fri, 03 Feb 2012 12:47:26 +0200
[Please keep the bug tracker on the CC list, so this whole discussion
is archived in the bug database.  Thanks in advance.]

> Date: Fri, 03 Feb 2012 03:42:11 +0000
> From: Simon Morgan <sjm <at> spamcop.net>
> 
> It turns out that if I simply run cmdproxy.exe on its own it starts 
> forking like crazy, so it looks like the problem is in cmdproxy.exe.

Please see if all of the copies of cmdproxy are children of the same
progeny, i.e. the second one is the child of the first one and the
parent of the third one, etc.  (You could use Process Explorer to see
the processes as a tree.)

If indeed cmdproxy spawns itself endlessly, then the first suspect is
this code in cmdproxy.c:

  if (!SearchPath (NULL, argv[0], ".exe", sizeof (path), path, &progname)
      || !GetShortPathName (path, path, sizeof (path))
      || stricmp (modname, path) != 0)
    {
      /* We are being used as a helper to run a DOS app; just pass
	 command line to DOS app without change.  */
      /* TODO: fill in progname.  */
      if (spawn (NULL, GetCommandLine (), dir, &rc))
	return rc;
      fail ("Could not run %s\n", GetCommandLine ());
    }

Are you able to run cmdproxy under a debugger and see what is going on
here?  If so, please tell what are argv[0], path, and modname just
before the call to `spawn' (assuming my guess is correct, and cmdproxy
really calls `spawn' in this snippet).

If you cannot run cmdproxy under a debugger, please tell:

 . how exactly did you invoke cmdproxy from the command line to get
   the infinite spawning problem?

 . do you have other copies of cmdproxy.exe somewhere on your Path?

 . is this Windows 7 box a 32-bit or a 64-bit system?

 . what is the value of the following Registry key?

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SafeProcessSearchMode

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Sun, 05 Feb 2012 22:52:02 GMT) Full text and rfc822 format available.

Message #14 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Simon Morgan <sjm <at> spamcop.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Sun, 05 Feb 2012 22:50:10 +0000
[Message part 1 (text/plain, inline)]
On 03/02/2012 10:47 AM, Eli Zaretskii wrote:
> Please see if ... the second one is the child of the first one and
> the parent of the third one, etc.

This is the case.

> Are you able to run cmdproxy under a debugger and see what is going on
> here?

Not currently.

> If you cannot run cmdproxy under a debugger, please tell:
>
>   . how exactly did you invoke cmdproxy from the command line to get
>     the infinite spawning problem?

Just by executing "cmdproxy.exe" while in "C:\emacs-24.0.92\bin".

>   . do you have other copies of cmdproxy.exe somewhere on your Path?

Nope:

    C:\Users\Simon>where cmdproxy
    INFO: Could not find files for the given pattern(s).

>   . is this Windows 7 box a 32-bit or a 64-bit system?

64-bit.

>   . what is the value of the following Registry key?
>
>      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SafeProcessSearchMode

It doesn't exist.

-- 
The fundamental asymmetry of consciousness means triangulation is the 
only path to understanding.

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Mon, 06 Feb 2012 03:59:02 GMT) Full text and rfc822 format available.

Message #17 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Simon Morgan <sjm <at> spamcop.net>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Mon, 06 Feb 2012 05:57:18 +0200
> Date: Sun, 05 Feb 2012 22:50:10 +0000
> From: Simon Morgan <sjm <at> spamcop.net>
> CC: 10674 <at> debbugs.gnu.org
> 
> On 03/02/2012 10:47 AM, Eli Zaretskii wrote:
> > Please see if ... the second one is the child of the first one and
> > the parent of the third one, etc.
> 
> This is the case.
> 
> > Are you able to run cmdproxy under a debugger and see what is going on
> > here?
> 
> Not currently.
> 
> > If you cannot run cmdproxy under a debugger, please tell:
> >
> >   . how exactly did you invoke cmdproxy from the command line to get
> >     the infinite spawning problem?
> 
> Just by executing "cmdproxy.exe" while in "C:\emacs-24.0.92\bin".
> 
> >   . do you have other copies of cmdproxy.exe somewhere on your Path?
> 
> Nope:
> 
>      C:\Users\Simon>where cmdproxy
>      INFO: Could not find files for the given pattern(s).
> 
> >   . is this Windows 7 box a 32-bit or a 64-bit system?
> 
> 64-bit.
> 
> >   . what is the value of the following Registry key?
> >
> >      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SafeProcessSearchMode
> 
> It doesn't exist.

Then I'm out of ideas.  Unless someone can run cmdproxy under a
debugger on a system where this problem exists, I don't know how to
fix this problem.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Mon, 06 Feb 2012 12:55:02 GMT) Full text and rfc822 format available.

Message #20 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Simon Morgan <sjm <at> spamcop.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Mon, 06 Feb 2012 12:53:57 +0000
[Message part 1 (text/plain, inline)]
On 06/02/2012 03:57 AM, Eli Zaretskii wrote:
> Then I'm out of ideas.  Unless someone can run cmdproxy under a
> debugger on a system where this problem exists, I don't know how to
> fix this problem.

Can you recommend a debugger? Would I need a build with debugging 
symbols? Would this entail building it myself?

-- 
The fundamental asymmetry of consciousness means triangulation is the 
only path to understanding.

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Mon, 06 Feb 2012 15:31:02 GMT) Full text and rfc822 format available.

Message #23 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Simon Morgan <sjm <at> spamcop.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Mon, 06 Feb 2012 15:29:37 +0000
[Message part 1 (text/plain, inline)]
On 03/02/2012 10:47 AM, Eli Zaretskii wrote:
> If indeed cmdproxy spawns itself endlessly, then the first suspect is
> this code in cmdproxy.c:
>
>    if (!SearchPath (NULL, argv[0], ".exe", sizeof (path), path,&progname)
>        || !GetShortPathName (path, path, sizeof (path))
>        || stricmp (modname, path) != 0)
>      {
>        /* We are being used as a helper to run a DOS app; just pass
> 	 command line to DOS app without change.  */
>        /* TODO: fill in progname.  */
>        if (spawn (NULL, GetCommandLine (), dir,&rc))
> 	return rc;
>        fail ("Could not run %s\n", GetCommandLine ());
>      }
>
> Are you able to run cmdproxy under a debugger and see what is going on
> here?  If so, please tell what are argv[0], path, and modname just
> before the call to `spawn' (assuming my guess is correct, and cmdproxy
> really calls `spawn' in this snippet).

Okay so I managed to get cmdproxy running under gdb without much trouble 
so here is what you asked for:

http://pastie.org/3327496

I've also discovered that cmdproxy only seems to do the whole infinite 
respawn thing if I run it in the emacs bin directory.

-- 
The fundamental asymmetry of consciousness means triangulation is the 
only path to understanding.


[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Mon, 06 Feb 2012 15:50:01 GMT) Full text and rfc822 format available.

Message #26 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Simon Morgan <sjm <at> spamcop.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Mon, 6 Feb 2012 16:47:55 +0100
On Mon, Feb 6, 2012 at 16:29, Simon Morgan <sjm <at> spamcop.net> wrote:

> I've also discovered that cmdproxy only seems to do the whole infinite
> respawn thing if I run it in the emacs bin directory.

Shoots in the dark:

 - Do you have any .cmd or .bat in that directory?
 - What's the value of your COMSPEC env var?

Perhaps that will shed some light.

    Juanma




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Mon, 06 Feb 2012 16:59:02 GMT) Full text and rfc822 format available.

Message #29 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Simon Morgan <sjm <at> spamcop.net>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Mon, 06 Feb 2012 16:57:48 +0000
[Message part 1 (text/plain, inline)]
On 06/02/2012 03:47 PM, Juanma Barranquero wrote:
>   - Do you have any .cmd or .bat in that directory?

Nope. Just the stuff that's distributed with emacs.

>   - What's the value of your COMSPEC env var?

C:\Users\Simon>echo %COMSPEC%
C:\Windows\system32\cmd.exe

-- 
The fundamental asymmetry of consciousness means triangulation is the 
only path to understanding.

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Mon, 06 Feb 2012 17:52:02 GMT) Full text and rfc822 format available.

Message #32 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Simon Morgan <sjm <at> spamcop.net>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Mon, 06 Feb 2012 19:50:05 +0200
> Date: Mon, 06 Feb 2012 15:29:37 +0000
> From: Simon Morgan <sjm <at> spamcop.net>
> CC: 10674 <at> debbugs.gnu.org
> 
> > If indeed cmdproxy spawns itself endlessly, then the first suspect is
> > this code in cmdproxy.c:
> >
> >    if (!SearchPath (NULL, argv[0], ".exe", sizeof (path), path,&progname)
> >        || !GetShortPathName (path, path, sizeof (path))
> >        || stricmp (modname, path) != 0)
> >      {
> >        /* We are being used as a helper to run a DOS app; just pass
> > 	 command line to DOS app without change.  */
> >        /* TODO: fill in progname.  */
> >        if (spawn (NULL, GetCommandLine (), dir,&rc))
> > 	return rc;
> >        fail ("Could not run %s\n", GetCommandLine ());
> >      }
> >
> > Are you able to run cmdproxy under a debugger and see what is going on
> > here?  If so, please tell what are argv[0], path, and modname just
> > before the call to `spawn' (assuming my guess is correct, and cmdproxy
> > really calls `spawn' in this snippet).
> 
> Okay so I managed to get cmdproxy running under gdb without much trouble 
> so here is what you asked for:
> 
> http://pastie.org/3327496

Thanks.  For the record, I reproduce that here:

  C:\emacs-24.0.92\bin>gdb cmdproxy.exe
  GNU gdb (GDB) 7.3.1
  Copyright (C) 2011 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "mingw32".
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>...
  Reading symbols from c:\emacs-24.0.92\bin\cmdproxy.exe...done.
  (gdb) break 565
  Breakpoint 1 at 0x401f3f: file cmdproxy.c, line 565.
  (gdb) r
  Starting program: c:\emacs-24.0.92\bin\cmdproxy.exe
  [New Thread 4636.0x11e0]

  Breakpoint 1, main (argc=1, argv=0x5e2c18) at cmdproxy.c:565
  565           if (spawn (NULL, GetCommandLine (), dir, &rc))
  (gdb) p argv[0]
  $1 = 0x5e2b51 "c:\\emacs-24.0.92\\bin\\cmdproxy.exe"
  (gdb) p path
  $2 = "c:\\emacs-24.0.92\\bin\\cmdproxy.exe\000\000\000\000\000\000\000c\001\000\001\000\000\000\000\177\000\000\000ÕV\000\000\060ü(\000 <at> Wpwhý(\000\064ý(\000v\arw\000\000\210\000\000\000\000\000\000\000\210\000ð‡\210\000ʸgwð‡\210\000\000\000\210\000\000\000\210\000ʸgwð‡\210\000xý(\000 \027rw8\001\210\000\004\027rwÿ\003ew\000\000\210\000\000\000\210\000\000\000\000\000\000\000\210\000\000\000^\000\000\000\001\001Dý(\000\000\000^\000\\þ(\000Õqlw\027.*\000þÿÿÿ\004\027rwš«mw\000\000\210\000c\000\000P"...
  (gdb) p modname
  $3 = "c:\\emacs-24.0.92\\bin\\cmdproxy.exe\000^\000\000\000^\000¨\016^\000¨\016^\000\001\000\000\000\000\000^\000@þ(\000í\033rw8\001^\000Ñ\033rwÇ\000ew\000\000\000\000\000\000^\000¨\016^\000þÿÿÿ\200\000\000\000ú›m\001\fþ(\000a\000\000P\230þ(\000Õqlw·/*\000þÿÿÿÑ\033rwú›mw\000\000^\000a\000\000P¨\016^\000¨\016^\000¨þ(\000\200ôÊv\000\000^\000\000\000\000\000‰ôÊv–¨•\003\004\000\000\000¬\016^\000¨\016^\000Êúfw\"\020iwÿÿÿÿ$\000\000\000"...
  (gdb)

It sounds like SearchPath fails.  Does it help to add
c:\emacs-24.0.92\bin to your Path?

> I've also discovered that cmdproxy only seems to do the whole infinite 
> respawn thing if I run it in the emacs bin directory.

But then how come it happens for you in customize-browse?  Did you
invoke Emacs in the emacs bin directory?  If so, what happens if you
invoke it from a different directory?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Mon, 06 Feb 2012 18:02:02 GMT) Full text and rfc822 format available.

Message #35 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Simon Morgan <sjm <at> spamcop.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Mon, 06 Feb 2012 18:00:17 +0000
[Message part 1 (text/plain, inline)]
On 06/02/2012 05:50 PM, Eli Zaretskii wrote:
> It sounds like SearchPath fails.  Does it help to add
> c:\emacs-24.0.92\bin to your Path?

Nope.

> But then how come it happens for you in customize-browse?  Did you
> invoke Emacs in the emacs bin directory?

Yeah, I typically either double-click on runemacs.exe while in that 
directory or run it from a desktop shortcut which has "Start in" set to 
that directory.

> If so, what happens if you invoke it from a different directory?

Same problem. cmdproxy.exe only behaves if I copy it to another 
directory and run it from there.

-- 
The fundamental asymmetry of consciousness means triangulation is the 
only path to understanding.

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Mon, 06 Feb 2012 21:28:02 GMT) Full text and rfc822 format available.

Message #38 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Simon Morgan <sjm <at> spamcop.net>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Mon, 06 Feb 2012 23:26:46 +0200
[Message part 1 (text/plain, inline)]
> Date: Mon, 06 Feb 2012 18:00:17 +0000
> From: Simon Morgan <sjm <at> spamcop.net>
> CC: 10674 <at> debbugs.gnu.org
> 
> On 06/02/2012 05:50 PM, Eli Zaretskii wrote:
> > It sounds like SearchPath fails.  Does it help to add
> > c:\emacs-24.0.92\bin to your Path?
> 
> Nope.

I modified cmdproxy.c to pinpoint which of the 3 tests leading to the
recursive spawn fails, and also to report the error code explaining
the failure.  Attached please find the modified source and the
compiled executable.  After unzipping them in emacs's bin directory,
please start GDB ("gdb cmdproxy.exe"), type "dir ." (to let it pick up
the modified source), then run cmdproxy till the line where it calls
spawn, and see what the values of i, j, k tell you about which test
failed, and what the value of err says about the reason of the
failure.

TIA

[cmdproxy.zip (application/zip, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Mon, 06 Feb 2012 22:24:01 GMT) Full text and rfc822 format available.

Message #41 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Simon Morgan <sjm <at> spamcop.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Mon, 06 Feb 2012 22:22:22 +0000
[Message part 1 (text/plain, inline)]
On 06/02/2012 09:26 PM, Eli Zaretskii wrote:
> I modified cmdproxy.c to pinpoint which of the 3 tests leading to the
> recursive spawn fails, and also to report the error code explaining
> the failure.  Attached please find the modified source and the
> compiled executable.  After unzipping them in emacs's bin directory,
> please start GDB ("gdb cmdproxy.exe"), type "dir ." (to let it pick up
> the modified source), then run cmdproxy till the line where it calls
> spawn, and see what the values of i, j, k tell you about which test
> failed, and what the value of err says about the reason of the
> failure.

(gdb) p i
$1 = 33
(gdb) p j
$2 = 0
(gdb) p k
$3 = 0
(gdb) p err
$4 = 4885256

-- 
The fundamental asymmetry of consciousness means triangulation is the 
only path to understanding.

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Tue, 07 Feb 2012 03:56:02 GMT) Full text and rfc822 format available.

Message #44 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Simon Morgan <sjm <at> spamcop.net>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Tue, 07 Feb 2012 05:54:27 +0200
> Date: Mon, 06 Feb 2012 22:22:22 +0000
> From: Simon Morgan <sjm <at> spamcop.net>
> CC: 10674 <at> debbugs.gnu.org
> 
> (gdb) p i
> $1 = 33
> (gdb) p j
> $2 = 0
> (gdb) p k
> $3 = 0
> (gdb) p err
> $4 = 4885256

This means GetShortPathName fails, and the error code doesn't make any
sense.  Are you sure you stopped _after_ this line:

      DWORD err = GetLastError ();

?

Anyway, if GetShortPathName fails, I will try to come up with a fix
that works at least when path and module are either both short or both
long file names.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Tue, 07 Feb 2012 13:28:02 GMT) Full text and rfc822 format available.

Message #47 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Simon Morgan <sjm <at> spamcop.net>
To: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Tue, 07 Feb 2012 13:25:48 +0000
[Message part 1 (text/plain, inline)]
On 07/02/2012 03:54 AM, Eli Zaretskii wrote:
> This means GetShortPathName fails, and the error code doesn't make any
> sense.  Are you sure you stopped _after_ this line:
>
>        DWORD err = GetLastError ();
>
> ?

Sorry about that:

    Breakpoint 1, main (argc=1, argv=0x9f2c00) at cmdproxy.c:566
    566           DWORD err = GetLastError ();
    (gdb) n
    567           if (spawn (NULL, GetCommandLine (), dir, &rc))
    (gdb) p err
    $1 = 5

-- 
The fundamental asymmetry of consciousness means triangulation is the 
only path to understanding.

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Tue, 07 Feb 2012 17:16:02 GMT) Full text and rfc822 format available.

Message #50 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Simon Morgan <sjm <at> spamcop.net>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Tue, 07 Feb 2012 19:14:43 +0200
> Date: Tue, 07 Feb 2012 13:25:48 +0000
> From: Simon Morgan <sjm <at> spamcop.net>
> 
>      Breakpoint 1, main (argc=1, argv=0x9f2c00) at cmdproxy.c:566
>      566           DWORD err = GetLastError ();
>      (gdb) n
>      567           if (spawn (NULL, GetCommandLine (), dir, &rc))
>      (gdb) p err
>      $1 = 5

That's "Access denied".  The question is, why?

You said that copying cmdproxy.exe into a different directory made the
problem go away -- can you try to figure out what is it in this
particular directory that triggers the problem?  Is it the fact that
there are other executable files there? the particular location of the
directory in the directory tree hierarchy relative to the drive root?
or maybe the fact that there are sibling directories from the Emacs
distro? or does the directory have some special access rights (e.g.,
you unzipped the archive as a privileged user)?  If you unzip the
distribution again in another place, does the problem happen there as
well?

Btw, did you run addpm after unzipping the archive?  And which unzip
program did you use?

(I can program around "Access denied", but I'd like to try to
understand the cause before that.)

TIA




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Tue, 07 Feb 2012 18:33:02 GMT) Full text and rfc822 format available.

Message #53 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Simon Morgan <sjm <at> spamcop.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Tue, 07 Feb 2012 18:31:43 +0000
[Message part 1 (text/plain, inline)]
On 07/02/2012 05:14 PM, Eli Zaretskii wrote:
> You said that copying cmdproxy.exe into a different directory made the
> problem go away -- can you try to figure out what is it in this
> particular directory that triggers the problem?  Is it the fact that
> there are other executable files there? the particular location of the
> directory in the directory tree hierarchy relative to the drive root?
> or maybe the fact that there are sibling directories from the Emacs
> distro? or does the directory have some special access rights (e.g.,
> you unzipped the archive as a privileged user)?  If you unzip the
> distribution again in another place, does the problem happen there as
> well?
>
> Btw, did you run addpm after unzipping the archive?  And which unzip
> program did you use?
>
> (I can program around "Access denied", but I'd like to try to
> understand the cause before that.)

Pretty sure it's a permissions thing. When I unzip the emacs 
distribution to my desktop and run it from there, cmdproxy doesn't 
infinitely respawn and customize-browse works as it should.

-- 
The fundamental asymmetry of consciousness means triangulation is the 
only path to understanding.

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Tue, 07 Feb 2012 18:47:01 GMT) Full text and rfc822 format available.

Message #56 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Simon Morgan <sjm <at> spamcop.net>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Tue, 07 Feb 2012 20:45:35 +0200
> Date: Tue, 07 Feb 2012 18:31:43 +0000
> From: Simon Morgan <sjm <at> spamcop.net>
> CC: 10674 <at> debbugs.gnu.org
> 
> > (I can program around "Access denied", but I'd like to try to
> > understand the cause before that.)
> 
> Pretty sure it's a permissions thing. When I unzip the emacs 
> distribution to my desktop and run it from there, cmdproxy doesn't 
> infinitely respawn and customize-browse works as it should.

OK.  I guess there are some permission problems with C:\ or something.

I will come up with some work-around.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Sat, 11 Feb 2012 12:12:01 GMT) Full text and rfc822 format available.

Message #59 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: sjm <at> spamcop.net
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Sat, 11 Feb 2012 14:08:41 +0200
> Date: Tue, 07 Feb 2012 20:45:35 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 10674 <at> debbugs.gnu.org
> 
> > Date: Tue, 07 Feb 2012 18:31:43 +0000
> > From: Simon Morgan <sjm <at> spamcop.net>
> > CC: 10674 <at> debbugs.gnu.org
> > 
> > > (I can program around "Access denied", but I'd like to try to
> > > understand the cause before that.)
> > 
> > Pretty sure it's a permissions thing. When I unzip the emacs 
> > distribution to my desktop and run it from there, cmdproxy doesn't 
> > infinitely respawn and customize-browse works as it should.
> 
> OK.  I guess there are some permission problems with C:\ or something.
> 
> I will come up with some work-around.

A fixed trial version was sent off-list.

Simon, please tell here if it fixes the problem, and I will then
commit the changes to the development repo.

TIA




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Mon, 13 Feb 2012 19:27:02 GMT) Full text and rfc822 format available.

Message #62 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Simon Morgan <sjm <at> spamcop.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Mon, 13 Feb 2012 19:25:15 +0000
[Message part 1 (text/plain, inline)]
On 11/02/2012 12:08 PM, Eli Zaretskii wrote:
> A fixed trial version was sent off-list.
>
> Simon, please tell here if it fixes the problem, and I will then
> commit the changes to the development repo.

No, it doesn't. If I copy it to a directory by itself in the root of C 
then it doesn't fork-bomb when I run cmdproxy directly, but if I copy it 
to my emacs bin directory and do customize-browse, it still goes mental.

-- 
The tortoise lays on its back, its belly baking in the hot sun, beating 
its legs, trying to turn itself over but it can't. Not without your 
help. But you're not helping.

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Mon, 13 Feb 2012 20:49:02 GMT) Full text and rfc822 format available.

Message #65 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Simon Morgan <sjm <at> spamcop.net>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Mon, 13 Feb 2012 22:46:30 +0200
> Date: Mon, 13 Feb 2012 19:25:15 +0000
> From: Simon Morgan <sjm <at> spamcop.net>
> CC: 10674 <at> debbugs.gnu.org
> 
> > Simon, please tell here if it fixes the problem, and I will then
> > commit the changes to the development repo.
> 
> No, it doesn't. If I copy it to a directory by itself in the root of C 
> then it doesn't fork-bomb when I run cmdproxy directly, but if I copy it 
> to my emacs bin directory and do customize-browse, it still goes mental.

Then please step with a debugger starting at line 555 of cmdproxy.c,
print the values of the variables involved there, and tell me what I
missed.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Sun, 19 Feb 2012 19:11:01 GMT) Full text and rfc822 format available.

Message #68 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Simon Morgan <sjm <at> spamcop.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Sun, 19 Feb 2012 19:07:57 +0000
[Message part 1 (text/plain, inline)]
On 13/02/2012 08:46 PM, Eli Zaretskii wrote:
> Then please step with a debugger starting at line 555 of cmdproxy.c,
> print the values of the variables involved there, and tell me what I
> missed.

It seems to be working now. It's quite possible I messed up before and 
was extracting the fix to the wrong directory or something stupid like that.

-- 
The tortoise lays on its back, its belly baking in the hot sun, beating 
its legs, trying to turn itself over but it can't. Not without your 
help. But you're not helping.

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10674; Package emacs,w32. (Sun, 19 Feb 2012 21:22:01 GMT) Full text and rfc822 format available.

Message #71 received at 10674 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Simon Morgan <sjm <at> spamcop.net>
Cc: 10674 <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Sun, 19 Feb 2012 23:16:46 +0200
> Date: Sun, 19 Feb 2012 19:07:57 +0000
> From: Simon Morgan <sjm <at> spamcop.net>
> CC: 10674 <at> debbugs.gnu.org
> 
> On 13/02/2012 08:46 PM, Eli Zaretskii wrote:
> > Then please step with a debugger starting at line 555 of cmdproxy.c,
> > print the values of the variables involved there, and tell me what I
> > missed.
> 
> It seems to be working now.

Thanks, that's great news.  I will commit those changes in a day or
two.

Thanks again for your help in debugging this problem.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 24 Feb 2012 10:21:02 GMT) Full text and rfc822 format available.

Notification sent to sjm <at> spamcop.net:
bug acknowledged by developer. (Fri, 24 Feb 2012 10:21:02 GMT) Full text and rfc822 format available.

Message #76 received at 10674-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: sjm <at> spamcop.net
Cc: 10674-done <at> debbugs.gnu.org
Subject: Re: bug#10674: 24.0.92; cmdproxy.exe fork-bomb
Date: Fri, 24 Feb 2012 12:15:06 +0200
> Date: Sun, 19 Feb 2012 23:16:46 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 10674 <at> debbugs.gnu.org
> 
> > Date: Sun, 19 Feb 2012 19:07:57 +0000
> > From: Simon Morgan <sjm <at> spamcop.net>
> > CC: 10674 <at> debbugs.gnu.org
> > 
> > On 13/02/2012 08:46 PM, Eli Zaretskii wrote:
> > > Then please step with a debugger starting at line 555 of cmdproxy.c,
> > > print the values of the variables involved there, and tell me what I
> > > missed.
> > 
> > It seems to be working now.
> 
> Thanks, that's great news.  I will commit those changes in a day or
> two.

Done (revision 107405 on the trunk).




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 23 Mar 2012 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 59 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.